Errors Compiling 32 bit wxWidgets 3.1 Libraries on 64 bit Linux

427 views
Skip to first unread message

Logan

unread,
Oct 20, 2017, 10:08:57 PM10/20/17
to wx-users

I am trying to compile static wxWidgets 3.1 Libraries for 32 bit Linux on a 64 bit Linux machine.

My configuration is the following:

../configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-shared --enable-unicode
make

The library starts to build but then halfway through I get this error:

In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0,
             from /usr/include/glib-2.0/glib/gtypes.h:32,
             from /usr/include/glib-2.0/glib/galloca.h:32,
             from /usr/include/glib-2.0/glib.h:30,
             from /usr/include/glib-2.0/gobject/gbinding.h:28,
             from /usr/include/glib-2.0/glib-object.h:23,
             from /usr/include/glib-2.0/gio/gioenums.h:28,
             from /usr/include/glib-2.0/gio/giotypes.h:28,
             from /usr/include/glib-2.0/gio/gio.h:26,
             from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
             from /usr/include/gtk-2.0/gdk/gdk.h:32,
             from /usr/include/gtk-2.0/gtk/gtk.h:32,
             from ../src/common/utilscmn.cpp:92:
/usr/include/glib-2.0/glib/gtypes.h: In function gboolean 
_GLIB_CHECKED_ADD_U64(guint64*, guint64, guint64)’:
/usr/include/glib-2.0/glib/gmacros.h:142:29: error: size of array _GStaticAssertCompileTimeAssertion_0 is negative
   __attribute__((__unused__))
                         ^
/usr/include/glib-2.0/glib/gmacros.h:232:120: note: in expansion of macro G_GNUC_UNUSED
#define G_STATIC_ASSERT(expr) typedef char G_PASTE 
(_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] 
G_GNUC_UNUSED

^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro 
G_STATIC_ASSERT
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^~~~~~~~~~~~~~~
make: *** [Makefile:29632: corelib_utilscmn.o] Error 1

I notice that the error mentions glib and gtk-2.0. Am I missing a variant of these packages or is my configuration wrong? I believe that my configuration should be correct. Is there special wxWidgets specific options that I am missing in my configure?


I have posted this question at https://stackoverflow.com/questions/46849654/wxwidgets-compile-error-size-of-array-gstaticassertcompiletimeassertion-0 and https://forums.wxwidgets.org/viewtopic.php?f=19&t=43957.

Vadim Zeitlin

unread,
Oct 21, 2017, 10:57:24 AM10/21/17
to wx-u...@googlegroups.com
On Fri, 20 Oct 2017 18:11:43 -0700 (PDT) Logan wrote:

L> I am trying to compile static wxWidgets 3.1 Libraries for 32 bit Linux on a
L> 64 bit Linux machine.
L>
L> My configuration is the following:
L>
L> ../configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-shared --enable-unicode

This is not enough because it would still use 64 bit libraries. You either
need to set up C[XX]FLAGS and LDFLAGS manually or, my preferred solution by
far, to create a 32 bit chroot and just build there.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages