on AIX 7.1 I'm encountering this linker error with ImageMagick-6.8.8:
Code: Select all
ld: 0711-317 ERROR: Undefined symbol: .AcquireCLocale
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
Makefile:6457: recipe for target 'magick/libMagickCore-6.Q16.la' failed
make[3]: *** [magick/libMagickCore-6.Q16.la] Error 1
So I'm proposing this patch for current trunk, including the reversion of r16685:
Code: Select all
Index: MagickCore/locale.c
===================================================================
--- MagickCore/locale.c (revision 18390)
+++ MagickCore/locale.c (working copy)
@@ -97,7 +97,7 @@
static SplayTreeInfo
*locale_cache = (SplayTreeInfo *) NULL;
-#if defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_STRTOD_L) || defined(MAGICKCORE_HAVE_USELOCALE)
static volatile locale_t
c_locale = (locale_t) NULL;
#endif
@@ -110,7 +110,7 @@
LoadLocaleCache(SplayTreeInfo *,const char *,const char *,const char *,
const size_t,ExceptionInfo *);
-#if defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_STRTOD_L) || defined(MAGICKCORE_HAVE_USELOCALE)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -240,7 +240,7 @@
return(locale_cache);
}
-#if defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_STRTOD_L) || defined(MAGICKCORE_HAVE_USELOCALE)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -358,7 +358,7 @@
#endif
}
#else
-#if defined(MAGICKCORE_HAVE_USELOCALE) && defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_USELOCALE)
{
locale_t
locale,
@@ -449,7 +449,7 @@
#endif
}
#elif defined(MAGICKCORE_HAVE_VSNPRINTF)
-#if defined(MAGICKCORE_HAVE_USELOCALE) && defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_USELOCALE)
{
locale_t
locale,
@@ -1429,7 +1429,7 @@
LockSemaphoreInfo(locale_semaphore);
if (locale_cache != (SplayTreeInfo *) NULL)
locale_cache=DestroySplayTree(locale_cache);
-#if defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_HAVE_STRTOD_L) || defined(MAGICKCORE_HAVE_USELOCALE)
DestroyCLocale();
#endif
UnlockSemaphoreInfo(locale_semaphore);
/haubi/