libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debugging Libtool's Insistence on Sourcing a Library from /usr/lib Rathe


From: Grant Erickson
Subject: Debugging Libtool's Insistence on Sourcing a Library from /usr/lib Rather Than LDFLAGS
Date: Wed, 06 Feb 2008 10:04:36 -0800
User-agent: Microsoft-Entourage/11.3.6.070618

I am attempting to debug an issue involving libtool from the avahi-0.6.22 package sourcing the local (i686-unknown-linux-gnu) version of libexpat (-lexpat) rather than the I one I direct it to find via LDFLAGS.

The configure invocation:

   cd $(objdir) && \
    $(CURDIR)/$(srcdir)/configure \
    CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \
    CPPFLAGS="-I$(resultdir)../expat/usr/include \
    -I$(resultdir)../gdbm/usr/include \
    -I$(resultdir)../libcap/usr/include" \
    LDFLAGS="-L$(resultdir)../expat/usr/lib \
    -L$(resultdir)../gdbm/usr/lib \
    -L$(resultdir)../libcap/usr/lib" \
    LIBDAEMON_CFLAGS=-I$(resultdir)../libdaemon/usr/include \
    LIBDAEMON_LIBS=-L$(resultdir)../libdaemon/usr/lib \
    --build=$(build) \
    --host=$(host) \
    --disable-dbus \
    --disable-glib \
    --disable-gobject \
    --disable-gtk \
    --disable-manpages \
    --disable-monodoc \
    --disable-python \
    --disable-qt3 \
    --disable-qt4 \
    --with-distro=none \
    --with-xml=expat \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var

Failing build line:

   Making all in avahi-daemon
    make[3]: Entering directory `/tmp/src/avahi/.build/avahi-daemon'
    /bin/bash ../libtool --tag=CC --mode=link ppc_4xx-gcc -I/tmp/src/avahi/avahi-0.6.22 '-DDEBUG_TRAP=__asm__("int $3")' -DAVAHI_DAEMON_RUNTIME_DIR=\"/var/run/avahi-daemon/\" -DAVAHI_SOCKET=\"/var/run/avahi-daemon/socket\" -DAVAHI_SERVICE_DIR=\"/etc/avahi/services\" -DAVAHI_CONFIG_FILE=\"/etc/avahi/avahi-daemon.conf\" -DAVAHI_HOSTS_FILE=\"/etc/avahi/hosts\" -DAVAHI_DBUS_INTROSPECTION_DIR=\"/usr/share/avahi/introspection\" -DAVAHI_CONFIG_DIR=\"/etc/avahi\" -g -O2 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -fPIC -D_XOPEN_SOURCE=500 -D__EXTENSIONS__  -L/tmp/src/results/avahi/../expat/usr/lib -L/tmp/src/results/avahi/../gdbm/usr/lib -L/tmp/src/results/avahi/../libcap/usr/lib -o avahi-daemon  avahi_daemon-main.o avahi_daemon-simple-protocol.o avahi_daemon-static-services.o avahi_daemon-static-hosts.o avahi_daemon-ini-file-parser.o avahi_daemon-setproctitle.o avahi_daemon-check-nss.o avahi_daemon-chroot.o avahi_daemon-caps.o   ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la -L/tmp/src/results/avahi/../libdaemon/usr/lib -lexpat -lcap -ldl  
    ppc_4xx-gcc -I/tmp/src/avahi/avahi-0.6.22 "-DDEBUG_TRAP=__asm__(\"int \$3\")" -DAVAHI_DAEMON_RUNTIME_DIR=\"/var/run/avahi-daemon/\" -DAVAHI_SOCKET=\"/var/run/avahi-daemon/socket\" -DAVAHI_SERVICE_DIR=\"/etc/avahi/services\" -DAVAHI_CONFIG_FILE=\"/etc/avahi/avahi-daemon.conf\" -DAVAHI_HOSTS_FILE=\"/etc/avahi/hosts\" -DAVAHI_DBUS_INTROSPECTION_DIR=\"/usr/share/avahi/introspection\" -DAVAHI_CONFIG_DIR=\"/etc/avahi\" -g -O2 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -fPIC -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -o .libs/avahi-daemon avahi_daemon-main.o avahi_daemon-simple-protocol.o avahi_daemon-static-services.o avahi_daemon-static-hosts.o avahi_daemon-ini-file-parser.o avahi_daemon-setproctitle.o avahi_daemon-check-nss.o avahi_daemon-chroot.o avahi_daemon-caps.o  -L/tmp/src/results/avahi/../expat/usr/lib -L/tmp/src/results/avahi/../gdbm/usr/lib -L/tmp/src/results/avahi/../libcap/usr/lib ../avahi-common/.libs/libavahi-common.so ../avahi-core/.libs/libavahi-core.so -L/tmp/src/results/avahi/../libdaemon/usr/lib /usr/lib/libexpat.so -lcap -ldl
    /usr/lib/libexpat.so: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    make[3]: *** [avahi-daemon] Error 1
    make[3]: Leaving directory `/tmp/src/avahi/.build/avahi-daemon'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/tmp/src/avahi/.build'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/tmp/src/avahi/.build'
    make: *** [build] Error 2

The most obvious potential problem was that "/tmp/src/results/avahi/../expat/usr/lib" did not exist or contain the desired libraries at the time of build or configuration; however, I have verified that the directory and libraries are, in fact, there.

Another potential issue would be ‘-L/usr/lib’ getting in the argument list ahead of ‘-L/tmp/src/results/avahi/../expat/usr/lib’. However, that doesn’t seem to be the case either.

If I pass ‘--debug’ to libtool, it seems to find the correct ‘/tmp/src/results/avahi/../expat/usr/lib/libexpat.la’ file; however, it latter seems to ignore that and pick-up ‘/usr/lib/libexpat.so’ anyway:

+ deplibs='-L/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/k
ilauea/denx/eldk/4.1/release/sw/tps/avahi/../libdaemon/usr/lib ../avahi-core/lib
avahi-core.la ../avahi-common/libavahi-common.la -L/home/gerickson/src/clients/n
etapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/
../libcap/usr/lib -L/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/re
sults/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../gdbm/usr/lib -L/home/gericks
on/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/relea
se/sw/tps/avahi/../expat/usr/lib '
+ continue
+ for deplib in '$libs'
+ lib=
+ found=no
+ case $deplib in
+ test prog '!=' lib
+ test prog '!=' prog
++ echo X-lexpat
++ /bin/sed -e '1s/^X//' -e 's/^-l//'
+ name=expat
+ for searchdir in '$newlib_search_path' '$lib_search_path' '$sys_lib_search_pat
h' '$shlib_search_path'
+ for search_ext in .la '$std_shrext' .so .a
+ lib=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.la
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.la
+ for search_ext in .la '$std_shrext' .so .a
+ lib=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.so
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.so
+ for search_ext in .la '$std_shrext' .so .a
+ lib=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.so
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.so
+ for search_ext in .la '$std_shrext' .so .a
+ lib=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.a
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.a
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/sw/tps/avahi/.build/Makefile/kilauea/denx/eldk/4.1/release/avahi-daemon/libexpat.a
+ for searchdir in '$newlib_search_path' '$lib_search_path' '$sys_lib_search_path' '$shlib_search_path'
+ for search_ext in .la '$std_shrext' .so .a
+ lib=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib/libexpat.la
+ test -f /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib/libexpat.la
+ test .la = .la
+ found=yes
+ break 2
+ test yes '!=' yes
+ test Xno = Xyes
+ test yes = yes
+ :
+ :
++ echo X/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib/libexpat.la
++ /bin/sed -e '1s/^X//' -e 's%/[^/]*$%%'
+ ladir=/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib
+ test X/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib = X/home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib/libexpat.la
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+ case $lib in
+ . /home/gerickson/src/clients/netapp/yours/p4/prod/oob/main/results/kilauea/denx/eldk/4.1/release/sw/tps/avahi/../expat/usr/lib/libexpat.la
++ dlname=libexpat.so.1
++ library_names='libexpat.so.1.5.2 libexpat.so.1 libexpat.so'
++ old_library=libexpat.a
++ dependency_libs=
++ current=6
++ age=5
++ revision=2
++ installed=yes
++ shouldnotlink=no
++ dlopen=
++ dlpreopen=
++ libdir=/usr/lib

Any insights or pointers would be appreciated. I’ve posted to the Avahi mailing list as well as I have not established if this is an Avahi bug, user error or a libtool issue.

Regards,

Grant Erickson
Principal
Nuovation System Designs, LLC

998 Alpine Terrace Suite 3
Sunnyvale, CA 94086-2469
US

T +1-408-749-0495
F +1-205-449-0495
M +1-408-489-5710

address@hidden
http://www.nuovations.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]