GNOME Bugzilla – Bug 685298
cross compilation issue
Last modified: 2015-02-07 17:01:39 UTC
Hi, I am lost in cross compilation , can you help me ? I try : ./configure --host=$$($(CC) -dumpmachine) --target=$$($(CC) -dumpmachine) --prefix=$(STAGINGDIR)/usr PKG_CONFIG_PATH=$(STAGINGDIR)/usr/lib/pkgconfig PKG_CONFIG_LIBDIR=$(STAGINGDIR)/usr/lib/pkgconfig --disable-tests --disable-dependency-tracking --includedir=$(STAGINGDIR)/usr/include --oldincludedir=$(STAGINGDIR)/usr/include CC=$(CC) LDFLAGS=-L$(STAGINGDIR)/usr/lib LIBS="-lffi -lz -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lfl" or many others similar commands, It seems the pkg config is corrupt I need to force the GLIB_INCLUDEDIR , ( but badly ... , do you have a better fix ? ) diff -rupN gobject-introspection-1.32.1/Makefile-gir.am gobject-introspection-1.32.1.patch2/Makefile-gir.am --- gobject-introspection-1.32.1/Makefile-gir.am 2011-09-03 20:36:47.000000000 +0200 +++ gobject-introspection-1.32.1.patch2/Makefile-gir.am 2012-09-27 18:00:44.530519822 +0200 @@ -53,8 +53,8 @@ else endif # glib -GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0 -GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0) +GLIB_INCLUDEDIR=$(STAGINGDIR)/usr/include/glib-2.0/ +GLIB_LIBDIR=$(STAGINGDIR)/usr/lib/ if OS_WIN32 GLIB_LIBRARY=libglib-2.0-0 diff -rupN gobject-introspection-1.32.1/Makefile.in gobject-introspection-1.32.1.patch2/Makefile.in --- gobject-introspection-1.32.1/Makefile.in 2012-04-17 20:28:14.000000000 +0200 +++ gobject-introspection-1.32.1.patch2/Makefile.in 2012-09-27 18:00:36.746519826 +0200 @@ -921,8 +921,8 @@ STATIC_GIRSOURCES = \ @WITH_GLIBSRC_TRUE@Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c # glib -GLIB_INCLUDEDIR = $(shell pkg-config --variable=includedir glib-2.0)/glib-2.0 -GLIB_LIBDIR = $(shell pkg-config --variable=libdir glib-2.0) +GLIB_INCLUDEDIR=$(STAGINGDIR)/usr/include/glib-2.0/ +GLIB_LIBDIR=$(STAGINGDIR)/usr/lib/ @OS_WIN32_FALSE@GLIB_LIBRARY = glib-2.0 @OS_WIN32_TRUE@GLIB_LIBRARY = libglib-2.0-0 GLib_2_0_gir_LIBS = $(GLIB_LIBRARY) $(GOBJECT_LIBRARY) I have a error of link about libffi et libz, I need also to force (badly ) --- gobject-introspection-1.33.14/giscanner/dumper.py 2012-06-05 15:35:12.000000000 +0200 +++ gobject-introspection-1.34.0.bck/giscanner/dumper.py 2012-09-28 17:08:54.554481498 +0200 @@ -231,10 +231,32 @@ class DumpCompiler(object): cflags = os.environ.get('CFLAGS', '') for cflag in cflags.split(): args.append(cflag) + + ccflags = os.environ.get('CPPFLAGS', '') + for ccflag in ccflags.split(): + args.append(ccflag) + ccflags = os.environ.get('CPPFLAGS', '') + for ccflag in ccflags.split(): + args.append(ccflag) + ldflags = os.environ.get('LDFLAGS', '') for ldflag in ldflags.split(): args.append(ldflag) + args.append('-Wl,-rpath,/opt/workspace/output/staging/usr/lib') +# args.append('-lgobject-2.0') +# args.append('-lgio-2.0') + # Make sure to list the library to be introspected first since it's # likely to be uninstalled yet and we want the uninstalled RPATHs have # priority (or we might run with installed library that is older) In parallel, in my env, I have several LDFLGAS, but it seems only the first only is catched ? Environment variables: CC ccache CC /home/sah0027/worksets/core/hardco/toolchain/intel/REL/2012-05-15_V1.2.3/bin/i686-cm-linux-gcc CXX ccache CXX /home/sah0027/worksets/core/hardco/toolchain/intel/REL/2012-05-15_V1.2.3/bin/i686-cm-linux-g++ CPPFLAGS -isystem CPPFLAGS /home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/include CPPFLAGS -isystem CPPFLAGS /home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/include CPPFLAGS -fPIC CPPFLAGS -D_LARGEFILE64_SOURCE CPPFLAGS -D_FILE_OFFSET_BITS=64 CFLAGS -fgnu89-inline CFLAGS -O0 CFLAGS -ggdb3 CXXFLAGS -O0 CXXFLAGS -ggdb3 LDFLAGS -L/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/lib LDFLAGS -L/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib LDFLAGS -Wl,-rpath-link,/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/lib LDFLAGS -Wl,-rpath-link,/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib For the moment, I block on g-ir-scanner: compile: ccache /home/sah0027/worksets/core/hardco/toolchain/intel/REL/2012-05-15_V1.2.3/bin/i686-cm-linux-gcc -pthread -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/include/glib-2.0 -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib/glib-2.0/include -I. -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/include/glib-2.0 -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/lib/glib-2.0/include -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/include/glib-2.0 -I/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib/glib-2.0/include -c -o /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0.o /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0.c g-ir-scanner: link: /bin/sh ./libtool --mode=link --tag=CC ccache /home/sah0027/worksets/core/hardco/toolchain/intel/REL/2012-05-15_V1.2.3/bin/i686-cm-linux-gcc -o /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0 -export-dynamic -Wl,-rpath,/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0.o -Wl,--export-dynamic -pthread -L/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib -lgio-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 -lgobject-2.0 libtool: link: ccache /home/sah0027/worksets/core/hardco/toolchain/intel/REL/2012-05-15_V1.2.3/bin/i686-cm-linux-gcc -o /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0 -Wl,-rpath -Wl,/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib /home/sah0027/worksets/core/opensource/GPL/gobject-introspection/vendor/pygtk.org/MAIN/gobject-introspection-1.34.0/tmp-introspectuk1mEw/GObject-2.0.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -L/home/sah0027/worksets/buildsystem/build/DEV/STB/output/staging/usr/lib -lgio-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lgobject-2.0 -pthread <unknown>:: Fatal: GObject: Namespace is empty; likely causes are: * Not including .h files to be scanned * Broken --identifier-prefix <unknown>:: Fatal: GObject: Namespace is empty; likely causes are: * Not including .h files to be scanned * Broken --identifier-prefix I hope you have some idea ? Best Regards, Frédéric
gobject-introspection can't be cross compiled "normally" at the moment. *** This bug has been marked as a duplicate of bug 592311 ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]