This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linker library search path
- From: Nils dot Dehn at t-online dot de
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 27 Aug 2004 17:03:44 +0200
- Subject: Linker library search path
SuSE Linux 2.4.21-215-smp
gcc-3.4.0
My machines comes with a kerberos pre-installed (
/usr/lib/libkrb5.so.17 ).
I have a self compiled kerberos at
/db/opt/krb5-1.3.4/lib/libkrb5.so.3.2).
I'd like to compile an apache module shared library against
my kerberos libkrb5.so.3.2 version.
Using linker options -L /db/opt/krb5-1.3.4/lib/libkrb5.so.3.2 -l krb5
and libkrb5.so.3.2 being in LD_LIBRARY_PATH I still find (using ldd)
that
my module is linked against BOTH libkrb5.so.17 AND libkrb5.so.3.2
Obviously the linker first tries to resolve the symbols using it's
default
path /usr/lib and then looks for the remaining symbols in the -L path.
How can I get the linker from looking is /usr/lib first ?
For security reasons:
I cannot alter the contents of /usr/lib.
I cannot refresh the library cache using ldconfig.
Thank you in advance
Nils