Page 1 of 1

6.6.9-10 and newer does not build with uclibc

Posted: 2011-05-25T01:52:32-07:00
by ncopa
Hi,

Releases after 6.6.9-9 no longer build on Alpine Linux (using uclibc) due to locale_t typedef is missing.

The global c_locale variable, AcquireCLocale() and DestroyCLocale() is only used if vsnprintf_l is available so it is possible #ifdef MAGICKCORE_HAVE_VFPRINTF_L out those based. (Except DestroyCLocale which is always called)

This patch works around the issue but could probably have been done nicer:
http://git.alpinelinux.org/cgit/aports. ... 6ce9e59730

Ping me if you want test better solutions. Thanks!

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-05-25T05:02:34-07:00
by magick
Thanks for the problem report and patch. We'll apply it to ImageMagick 6.7.0-0 Beta by sometime tomorrow.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-14T21:14:58-07:00
by IMUser
I have tried to build MT static library on Windows and encountered the exact same problem.

Both ImageMagick-6.7.0-7.7z and ImageMagick-6.6.9-10.7z failed to build due to the same issue described by the OP.

After reading this thread, tried ImageMagick-6.6.8-10.7z, and viola, it builds fine.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-15T06:11:18-07:00
by magick
Locale support is conditionally compiled in ImageMagick. For Windows we check the compiler version #. What compiler and version # are you using to compile ImageMagick under Windows?

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-15T11:18:45-07:00
by IMUser
(straight off the "About Microsoft Visual C++" dialog window)

Microsoft Development Environment 2003 Version 7.1.3088
Visual C++ .NET


An old Visual C++, but still slightly newer than 7.0 used in VisualMagick. I got the "must update all projects to current version" notification.

I did not compile a new configure.exe for VisualMagick. I just used the one already included in the source .7z package.

To me, locale.c file seemed to be corrupted in the aforementioned source distribution packages. They contained some weird symbols and such and the compiler didn't recognize certain expressions.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-15T11:53:55-07:00
by magick
Edit magick-config.h and change '>= 1300' to '>= 1400'. See if that permits ImageMagick to compile.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-15T11:58:36-07:00
by IMUser
Here's detailed info. I went back and tried compiling ImageMagick-6.7.0-7.7z again.
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(128): error C2059: syntax error : ';'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(95): error C2059: syntax error : ';'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(128): error C2059: syntax error : 'type'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(128): error C2061: syntax error : identifier 'AcquireCLocale'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(95): error C2061: syntax error : identifier 'c_locale'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(95): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(167): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(170): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(249): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(340): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(888): error C2064: term does not evaluate to a function taking 10248200 arguments
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(95): error C2065: '_locale_t' : undeclared identifier
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(167): error C2065: 'c_locale' : undeclared identifier
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(246): error C2065: 'locale' : undeclared identifier
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(337): error C2143: syntax error : missing ';' before 'identifier'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(885): error C2143: syntax error : missing ';' before 'identifier'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(246): error C2143: syntax error : missing ';' before 'identifier'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(885): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(246): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(337): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(246): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(337): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(885): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(337): error C2146: syntax error : missing ';' before identifier 'locale'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(885): error C2146: syntax error : missing ';' before identifier 'locale'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(246): error C2146: syntax error : missing ';' before identifier 'locale'
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(95): error C2513: '/*global*/ ' : no variable declared before '='
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\utility.c(1531): warning C4013: '_access_s' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(168): warning C4013: '_free_locale' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\blob.c(3519): warning C4013: '_fseek' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\blob.c(3858): warning C4013: '_ftell' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(891): warning C4013: '_strtod_l' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(253): warning C4013: '_vfprintf_l' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(344): warning C4013: '_vsnprintf_l' undefined; assuming extern returning int
C:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\locale.c(248): warning C4013: 'AcquireCLocale' undefined; assuming extern returning int

And this are the trouble spots in locale.c:

line 128:
static locale_t AcquireCLocale(void)
{
#if defined(MAGICKCORE_HAVE_NEWLOCALE)
if (c_locale == (locale_t) NULL)
c_locale=newlocale(LC_ALL_MASK,"C",(locale_t) 0);
#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
if (c_locale == (locale_t) NULL)
c_locale=_create_locale(LC_ALL,"C");
#endif
return(c_locale);
}
#endif

#if defined(MAGICKCORE_HAVE_STRTOD_L)
line 95:
#if defined(MAGICKCORE_HAVE_STRTOD_L)
static volatile locale_t
c_locale = (locale_t) NULL;
#endif

static volatile MagickBooleanType
instantiate_locale = MagickFalse;

/*
Forward declarations.
*/
static MagickBooleanType
InitializeLocaleList(ExceptionInfo *),
LoadLocaleLists(const char *,const char *,ExceptionInfo *);

#if defined(MAGICKCORE_HAVE_STRTOD_L)

I don't know why, but I see the female symbol (♀) littered throughout the locale.c in my Visual C++ editor. I've never seen that before. They disappear in copied-and-pasted text, however, as in the codes above.

-----------------------------------------------------------
"Edit magick-config.h and change '>= 1300' to '>= 1400'. See if that permits ImageMagick to compile."

Just saw that while writing this post. Will do now and post the result.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2011-06-15T12:08:33-07:00
by IMUser
Changed 1300 to 1400 in three places...
/* Define to 1 if you have the `strtod_l' function. */
#if defined(_VISUALC_) && (_MSC_VER >= 1400)
#define MAGICKCORE_HAVE_STRTOD_L 1
#endif

...

/* Define to 1 if you have the `vfprintf_l' function. */
#if defined(_VISUALC_) && (_MSC_VER >= 1400)
#define MAGICKCORE_HAVE_VFPRINTF_L 1
#endif

...


/* Define to 1 if you have the `vsnprintf_' function. */
#if defined(_VISUALC_) && (_MSC_VER >= 1400)
#define MAGICKCORE_HAVE_VSNPRINTF_L 1
#endif
And it compiles!
------ Build started: Project: CORE_magick, Configuration: Debug Win32 ------

Compiling...
xwindow.c
MagickCore lib static interface
MagickCore module static interface
xml-tree.c
MagickCore lib static interface
MagickCore module static interface
widget.c
MagickCore lib static interface
MagickCore module static interface
version.c
MagickCore lib static interface
MagickCore module static interface
utility.c
MagickCore lib static interface
MagickCore module static interface
\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\utility.c(1531) : warning C4013: '_access_s' undefined; assuming extern returning int
type.c
MagickCore lib static interface
MagickCore module static interface
transform.c
MagickCore lib static interface
MagickCore module static interface
token.c
MagickCore lib static interface
MagickCore module static interface
timer.c
MagickCore lib static interface
MagickCore module static interface
threshold.c
MagickCore lib static interface
MagickCore module static interface
thread.c
MagickCore lib static interface
MagickCore module static interface
string.c
MagickCore lib static interface
MagickCore module static interface
stream.c
MagickCore lib static interface
MagickCore module static interface
statistic.c
MagickCore lib static interface
MagickCore module static interface
static.c
MagickCore lib static interface
MagickCore module static interface
splay-tree.c
MagickCore lib static interface
MagickCore module static interface
signature.c
MagickCore lib static interface
MagickCore module static interface
shear.c
MagickCore lib static interface
MagickCore module static interface
semaphore.c
MagickCore lib static interface
MagickCore module static interface
segment.c
MagickCore lib static interface
MagickCore module static interface
Generating Code...
Compiling...
resource.c
MagickCore lib static interface
MagickCore module static interface
resize.c
MagickCore lib static interface
MagickCore module static interface
resample.c
MagickCore lib static interface
MagickCore module static interface
registry.c
MagickCore lib static interface
MagickCore module static interface
random.c
MagickCore lib static interface
MagickCore module static interface
quantum.c
MagickCore lib static interface
MagickCore module static interface
quantum-import.c
MagickCore lib static interface
MagickCore module static interface
quantum-export.c
MagickCore lib static interface
MagickCore module static interface
quantize.c
MagickCore lib static interface
MagickCore module static interface
property.c
MagickCore lib static interface
MagickCore module static interface
profile.c
MagickCore lib static interface
MagickCore module static interface
PreRvIcccm.c
MagickCore lib static interface
MagickCore module static interface
prepress.c
MagickCore lib static interface
MagickCore module static interface
policy.c
MagickCore lib static interface
MagickCore module static interface
pixel.c
MagickCore lib static interface
MagickCore module static interface
paint.c
MagickCore lib static interface
MagickCore module static interface
option.c
MagickCore lib static interface
MagickCore module static interface
nt-feature.c
MagickCore lib static interface
MagickCore module static interface
nt-base.c
MagickCore lib static interface
MagickCore module static interface
morphology.c
MagickCore lib static interface
MagickCore module static interface
Generating Code...
Compiling...
montage.c
MagickCore lib static interface
MagickCore module static interface
monitor.c
MagickCore lib static interface
MagickCore module static interface
module.c
MagickCore lib static interface
MagickCore module static interface
mime.c
MagickCore lib static interface
MagickCore module static interface
memory.c
MagickCore lib static interface
MagickCore module static interface
matrix.c
MagickCore lib static interface
MagickCore module static interface
magick.c
MagickCore lib static interface
MagickCore module static interface
magic.c
MagickCore lib static interface
MagickCore module static interface
log.c
MagickCore lib static interface
MagickCore module static interface
locale.c
MagickCore lib static interface
MagickCore module static interface
list.c
MagickCore lib static interface
MagickCore module static interface
layer.c
MagickCore lib static interface
MagickCore module static interface
image.c
MagickCore lib static interface
MagickCore module static interface
image-view.c
MagickCore lib static interface
MagickCore module static interface
Magick lib static interface
Magick module static interface
identify.c
MagickCore lib static interface
MagickCore module static interface
histogram.c
MagickCore lib static interface
MagickCore module static interface
hashmap.c
MagickCore lib static interface
MagickCore module static interface
geometry.c
MagickCore lib static interface
MagickCore module static interface
gem.c
MagickCore lib static interface
MagickCore module static interface
fx.c
MagickCore lib static interface
MagickCore module static interface
Generating Code...
Compiling...
fourier.c
MagickCore lib static interface
MagickCore module static interface
feature.c
MagickCore lib static interface
MagickCore module static interface
exception.c
MagickCore lib static interface
MagickCore module static interface
enhance.c
MagickCore lib static interface
MagickCore module static interface
effect.c
MagickCore lib static interface
MagickCore module static interface
draw.c
MagickCore lib static interface
MagickCore module static interface
distort.c
MagickCore lib static interface
MagickCore module static interface
display.c
MagickCore lib static interface
MagickCore module static interface
deprecate.c
MagickCore lib static interface
MagickCore module static interface
delegate.c
MagickCore lib static interface
MagickCore module static interface
decorate.c
MagickCore lib static interface
MagickCore module static interface
constitute.c
MagickCore lib static interface
MagickCore module static interface
configure.c
MagickCore lib static interface
MagickCore module static interface
compress.c
MagickCore lib static interface
MagickCore module static interface
composite.c
MagickCore lib static interface
MagickCore module static interface
compare.c
MagickCore lib static interface
MagickCore module static interface
colorspace.c
MagickCore lib static interface
MagickCore module static interface
colormap.c
MagickCore lib static interface
MagickCore module static interface
color.c
MagickCore lib static interface
MagickCore module static interface
coder.c
MagickCore lib static interface
MagickCore module static interface
Generating Code...
Compiling...
client.c
MagickCore lib static interface
MagickCore module static interface
cipher.c
MagickCore lib static interface
MagickCore module static interface
cache.c
MagickCore lib static interface
MagickCore module static interface
cache-view.c
MagickCore lib static interface
MagickCore module static interface
blob.c
MagickCore lib static interface
MagickCore module static interface
BZIP compiling as library
\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\blob.c(3519) : warning C4013: '_fseek' undefined; assuming extern returning int
\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\magick\blob.c(3858) : warning C4013: '_ftell' undefined; assuming extern returning int
attribute.c
MagickCore lib static interface
MagickCore module static interface
artifact.c
MagickCore lib static interface
MagickCore module static interface
annotate.c
MagickCore lib static interface
MagickCore module static interface
animate.c
MagickCore lib static interface
MagickCore module static interface
accelerate.c
MagickCore lib static interface
MagickCore module static interface
Generating Code...
Compiling resources...
Creating library...
ImageMagick.res : warning LNK4221: no public symbols found; archive member will be inaccessible

Build log was saved at "file://c:\Documents and Settings\Allen\My Documents\Visual Studio Projects\ImageMagick-6.7.0\VisualMagick\Debug\CORE_magick\BuildLog.htm"
CORE_magick - 0 error(s), 4 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped
The female symbols are still there though.

Re: 6.6.9-10 and newer does not build with uclibc

Posted: 2012-05-13T02:18:06-07:00
by yar3333
I have the same problem with static version of MagickWand:

Code: Select all

wand.res : warning LNK4221: no public symbols found; archive member will be inaccessible
As a result, I have link errors in my project, which uses CORE_wand.lib.
Anybody may help?