configure: Disable gstreamer support if headers are not compatible with build environment. (try 2)

Alex Villací­s Lasso a_villacis at
Fri Aug 5 16:08:17 CDT 2011

El 02/08/11 17:38, Octavian Voicu escribió:
> When building a 32-bit wine in a 64-bit build environment with
> default glib headers (gstreamer uses glib.h), glib 64-bit types
> (such as gint64 and guint64) are not properly defined, causing
> many compiler warnings and most likely a broken winegstreamer.dll.
> Although both gstreamer and glib are included in the ia32-libs
> package (on Ubuntu, and possibly others), the lack of a proper
> glibconfig.h makes the gstreamer headers unusable for 32-bit
> builds.
My build system is a Fedora 14 x86_64, and I am affected by this.

What is really happening is that, on my 64-bit system, both glib2-devel.i686 and glib2-devel.x86_64 are installed:

[alex at srv64 wine-build]$ rpm -qf /usr/lib64/glib-2.0/include/glibconfig.h
[alex at srv64 wine-build]$ rpm -qf /usr/lib/glib-2.0/include/glibconfig.h
[alex at srv64 wine-build]$

Instead of shipping a single header file that uses compiler or preprocessor defines, like /usr/include/stdint.h, glib2 ships two include files, one for each architecture. The pkg-config --cflags option does not handle the concept of an 
architecture-dependent include file correctly (or at all), so it ends up reporting the 64-bit header even for the 32-bit build. The 32-bit header defined gint64 as signed long long, but it is defined as signed long in the 64 bit header. Therefore the bug.

A workaround I am testing is to force PKG_CONFIG_PATH to the 32-bit directory for the configure and make steps:

[alex at srv64 wine-build]$ pkg-config --cflags gstreamer-app-0.10
-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2
[alex at srv64 wine-build]$ PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --cflags gstreamer-app-0.10
-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
[alex at srv64 wine-build]$

Is there any standard/known way of automating this?

More information about the wine-devel mailing list