After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634249 - g-ir-scanner doesn't handle installed libraries outside of /usr correctly
g-ir-scanner doesn't handle installed libraries outside of /usr correctly
Status: RESOLVED DUPLICATE of bug 632701
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-11-07 20:49 UTC by Dan Winship
Modified: 2015-02-07 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2010-11-07 20:49:01 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...
Comment 1 Dan Winship 2010-11-07 20:53:33 UTC
(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
Comment 2 Daniel Macks 2010-11-07 22:57:13 UTC
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.
Comment 3 Daniel Macks 2010-11-08 01:40:50 UTC
..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!
Comment 4 Dan Winship 2010-11-08 11:47:50 UTC
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
Comment 5 Dan Winship 2010-11-11 22:12:47 UTC

*** This bug has been marked as a duplicate of bug 632701 ***
Comment 6 André Klapper 2015-02-07 17:03:58 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]