GNOME Bugzilla – Bug 634249
g-ir-scanner doesn't handle installed libraries outside of /usr correctly
Last modified: 2015-02-07 17:03:58 UTC
currently, when gobject-introspection builds Gio-2.0.gir, it generates at some point the line: g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC --silent gcc -o /home/danw/jhbuild/gobject-introspection/gir/tmp-introspectL0ivT2/Gio-2.0 -export-dynamic -fno-strict-aliasing -Wsign-compare -Wcast-align -Wpointer-arith -Wnested-externs -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wall -g -L. -lgio-2.0 -pthread -L/opt/jhbuild/lib -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 /home/danw/jhbuild/gobject-introspection/gir/tmp-introspectL0ivT2/Gio-2.0.o Note that "-lgio-2.0" appears before "-L/opt/jhbuild/lib"; this is because the "-lgio-2.0" generated by "Gio_2_0_gir_LIBS = $(GIO_LIBRARY)" is output before the "-L..." generated by "Gio_2_0_gir_PACKAGES = gio-2.0". As a result, it ends up linking in the *system* libgio, which then causes problems because it had scanned the jhbuild libgio (assuming the jhbuild libgio has symbols in it that the system one doesn't). I'm not sure if this is Makefile.introspection's fault or if g-ir-scanner always outputs the arguments that way regardless of what order you give them in...
(In reply to comment #0) > I'm not sure if this is Makefile.introspection's fault or if g-ir-scanner > always outputs the arguments that way regardless of what order you give them > in... it looks like it's g-ir-scanner; adding a "-L /opt/jhbuild/lib" earlier in the g-ir-scanner command line doesn't help
Should point to build-dir .la file, which libtool knows to give priority to, rather than relying on local -L flags and searching for -l lib.
..or did I completely misread where it's supposed to be looking, and the intended target is /opt/jhbuild/lib/libgio (i.e., gio is already "make install"ed into the jhbuild prefix, rather than still as part of the builddir of the package being built at the moment)? This makefile and g-ir-scanner confuse the heck out of me!
yes, this is about the gobject-introspection package trying to scan the installed libgio. Specifically, if you jhbuild the "tls" branch of glib, and then try to jhbuild gobject-introspection, it will fail
*** This bug has been marked as a duplicate of bug 632701 ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]