Linker library search path
Nils.Dehn@t-online.de
Nils.Dehn@t-online.de
Fri Aug 27 15:14:00 GMT 2004
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
More information about the Gcc-help
mailing list