Can't build a 32-bit GTK2 app on a 64-bit system

Bug #1624610 reported by Iouri Kloubakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Description: Ubuntu 16.04.1 LTS
Release: 16.04

gcc-multilib:
  Installed: 4:5.3.1-1ubuntu1
  Candidate: 4:5.3.1-1ubuntu1

apt install build-essential gcc-multilib libgtk2.0-dev

The build fails because there is only 64-bit version of glibconfig.h is installed:
/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h

Running gcc -m32 gives an error:
/usr/include/glib-2.0/glib/gtypes.h:422:3: error: '_GStaticAssertCompileTimeAssertion_0' declared as an array with a negative size
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
because guint64 is defined as (unsigned long) on a 64-bit platform.

Also, there is no 32-bit version of the "pkgconfig" files, so you can't use:
$(pkg-config --cflags gtk+-2.0) with, for example, PKG_CONFIG_PATH=/usr/lib32/pkgconfig.

Revision history for this message
Matthias Klose (doko) wrote :

you should install crossbuild-essential-i386 and try to build with dpkg-buildpackage -a i386

Changed in gcc-defaults (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.