Dennis Heuer <[EMAIL PROTECTED]> writes:

> Today I installed a new i386 linux system from source with linux 2.6.16,
> gcc 4.1.0, glibc 2.4, and binutils 2.16. The problem I have is that ld
> refuses to detect libraries at other locations than /lib and /usr/lib
> though ld.so.conf and (LD_)LIBRARY_PATH are set correctly. ld can
> link a lib correctly if the path is specified with -L. ldconfig -p
> prints out the correct paths to the problematic libs, and recreating
> the cache doesn't change the situation. I installed binutils 2.17 (from
> ftp.kernel.org) and the newest libtool (for the case that it is somehow
> related to ld's internals) but nothing changed. If it's not the usual
> configuration issues, what else can be missing?

I know this is confusing, but ld (not ld.so) does not use ld.so.conf
or LD_LIBRARY_PATH to find libraries specified on the command line.
It only uses the -L option.  When invoked from gcc, the gcc driver
itself will convert the environment variable LIBRARY_PATH (not
LD_LIBRARY_PATH) to -L options to pass to the linker.  The linker
itself ignores LIBRARY_PATH.

ldconfig tells you what ld.so will do, not what ld will do.

Ian


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to