[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld unwilling to find libs in configured paths
From: |
Ian Lance Taylor |
Subject: |
Re: ld unwilling to find libs in configured paths |
Date: |
19 May 2006 13:54:30 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Dennis Heuer <address@hidden> 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