[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why am I linking to an installed library?
From: |
Bruce Korb |
Subject: |
Why am I linking to an installed library? |
Date: |
Sat, 10 Sep 2005 08:17:15 -0700 |
User-agent: |
KMail/1.7.1 |
Hi,
On x86 Linux: i686-pc-linux-gnu
I just made an extension to the shared library in my pet project.
The older version has been installed in /usr/lib via rpm and
in /usr/local/lib via "make install". /etc/ld.so.conf seems a
bit over the top, but looks like this:
> /usr/X11R6/lib/Xaw95
> /usr/X11R6/lib/Xaw3d
> /usr/X11R6/lib
> /usr/i486-linux/lib
> /usr/i486-linux-libc5/lib=libc5
> /usr/i486-linux-libc6/lib=libc6
> /usr/i486-linuxaout/lib
> /usr/i386-suse-linux/lib
> /usr/local/lib
> /usr/openwin/lib
> /opt/kde/lib
> /opt/kde2/lib
> /opt/kde3/lib
> /opt/gnome/lib
> /opt/gnome2/lib
When I rebuild autogen, .libs/lt-autogen winds up pulling
/usr/lib/libopts.so.25.0.1 despite the fact the current
project has a .libs/libopts.so.25.1.0 version. So, here's
the stuff from the Makefiles:
Makefile (configured values):
> LIBGUILE_CFLAGS =
> LIBGUILE_LIBS = -lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm
> DYNAMIC_AG = -export-dynamic
Makefile.am:
> GEN_CSRC = opts.h directive.h expr.ini expr.h proto.h pseudo-fsm.h
> nodist_autogen_SOURCES = ag.c
> autogen_SOURCES = $(GEN_CSRC)
> autogen_LDADD = $(top_builddir)/autoopts/libopts.la $(LIBGUILE_LIBS)
> autogen_LDFLAGS = $(DYNAMIC_AG)
> autogen_CFLAGS = $(LIBGUILE_CFLAGS)
If I hand edit the script "autogen" to contain:
> LD_LIBRARY_PATH=#{top_builddir}/autoopts/.libs
> export LD_LIBRARY_PATH
then it works correctly. If I do not do that, it binds to the previous
library version in /usr/lib. Everything is also fine if I:
# rpm --erase autogen
What's wrong? :-) Thank you! Regards, Bruce
- Why am I linking to an installed library?,
Bruce Korb <=