Due to bug 449944 of autoconf the glib2 macros to convert the LE/BE endiannes to internal representation are broken on all big endian architectures - most notably PPC/PPC64. That means that all packages which use these macros from glib2 are badly broken on big endian machines and they will have to be rebuilt after the fixed glib2 is in.
Tomas, do you have a workaround that I can use in glib until autoconf is fixed ?
Does this look like it will work ? --- configure.in.endian 2008-07-02 11:43:44.000000000 -0400 +++ configure.in 2008-07-02 11:46:20.000000000 -0400 @@ -3159,18 +3159,21 @@ g_have_gnuc_visibility=$g_have_gnuc_visibility g_have_sunstudio_visibility=$g_have_sunstudio_visibility -case xyes in -x$ac_cv_c_bigendian) +if test x$ac_cv_c_bigendian = xyes; then g_byte_order=G_BIG_ENDIAN g_bs_native=BE g_bs_alien=LE - ;; -*) - g_byte_order=G_LITTLE_ENDIAN - g_bs_native=LE - g_bs_alien=BE - ;; -esac +else + if test x$ac_cv_c_bigendian = xuniversal then + g_byte_order=G_BIG_ENDIAN + g_bs_native=BE + g_bs_alien=LE + else + g_byte_order=G_LITTLE_ENDIAN + g_bs_native=LE + g_bs_alien=BE + fi +fi g_pollin=$glib_cv_value_POLLIN g_pollout=$glib_cv_value_POLLOUT
No, that would make it break on little endian machines, because the ac_cv_c_bigendian contains always universal with this autoconf version. You can try to add something like this after the AC_C_BIGENDIAN: if test x$ac_cv_c_bigendian = xuniversal ; then AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __BIG_ENDIAN. #else. #error Not a big endian. #endif],. ac_cv_c_bigendian=yes ,AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __LITTLE_ENDIAN. #else. #error Not a little endian. #endif],. ac_cv_c_bigendian=no ,AC_MSG_WARN([Could not determine endianness.]))) fi
I've added these workarounds in 2.17.3-1.fc10