Hi,
I've got some trouble compiling gir-repository as per current SVN and
was wondering if anybody else encountered the same problem. If this is
helpful, feel free to add it to the wiki.
Description of the problem
==========================
During 'make' in git-repository-0.6.5 and having
GNOME_PREFIX=/opt/gnome, in the directory gir-repository-0.6.5/gir the
command
/usr/bin/g-ir-scanner -v --namespace GConf --nsversion=2.0
--add-include-path=. --add-include-path=. \
--include=GObject-2.0 \
--library=gconf-2 \
--libtool="/bin/sh ../libtool" \
--output GConf-2.0.gir \
--pkg gconf-2.0 \
`pkg-config --variable=includedir gconf-2.0`/gconf/2/gconf/*.h
returns (amongst other stuff):
/usr/bin/ld: cannot find -lgconf-2
and
subprocess.CalledProcessError: Command '['/bin/sh', '../libtool',
'--mode=link', '--tag=CC', '--silent', 'gcc', '-o',
'/home/bambi/build/blfs/gir-repository-0.6.5/gir/tmp-introspect6Bxd_B/GConf-2.0',
'-L.', '-lgconf-2', '-pthread', '-Wl,--export-dynamic', '-lgio-2.0',
'-lgirepository-1.0', '-lgobject-2.0', '-lgmodule-2.0', '-lgthread-2.0',
'-lrt', '-lglib-2.0',
'/home/bambi/build/blfs/gir-repository-0.6.5/gir/tmp-introspect6Bxd_B/GConf-2.0.o']'
returned non-zero exit status 1
Apparently, ld can't find libgconf-2.so, which lives in /opt/gnome/lib.
What I checked and tried
========================
gconf-2.0.pc has the correct prefix set and can be found with
PKG_CONFIG_PATH.
Explicitly setting setting LDFLAGS to -L/opt/gnome/lib didn't remedy the
problem.
I've modified the 'g-ir-scanner' invocation to include
'--library-path=/opt/gnome/lib', no effect.
Manually running the libtool command fails. It will however complete
without error if '-L.' is substituted with '-L/opt/gnome/lib'.
After that, a make will still fail in the same spot.
Workaround
==========
I made a softlink from libgconf-2.0.so to the current directory. Turns
out, this process has to be repeated several times for various libs in
/opt/gnome/lib.
What I think is the problem
===========================
If GNOME_PREFIX is anything other than the usual system-paths, the build
mechanism passes incorrect arguments to libtool which can't find the
libs. Runing the whole autoconf stack (aclocal, autoheader, automake,
autoconf, configure, make) didn't help.
Bye,
Lars
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page