On Wed, 12 Mar 2003, bunnadik wrote:

> When I had the same library in /usr/lib and /usr/local/lib in MDK-7.0
> and ran 'ldconfig -p | grep <libname>' I got my /usr/local/lib/<libname>
> first and /usr/lib/<libname> second, and this made ./configure use my
> lib instead of the system default one. This is changed when I ldconfig
> MDK-8.0, often resulting in errors since the compilation tries to use
> the headers from /usr/local/include with the lib from /usr/lib.

The run-time is different from the compile-time! You are mixing both. I 
told you that standard system library search is always used first by the 
compiler/linker unless the user tells otherwise with extra -I (for 
includes) or -L (for libraries) flags.

Then you have the run-time library search path which by default is also 
standard, thus in /lib or /usr/lib. But that's implicit, i.e. that doesn't 
appear in /etc/ld.so.conf. The order is indeed: LD_LIBRARY_PATH, 
candidates listed in the cache file /etc/ld.so.cache, then default for 
/lib and /usr/lib.

If this is not the case please fill in a proper bug report for "glibc".

> And programs should honour user defined paths before built-ins.

Default behavior is system paths first, or user-defined paths *if* they
tell so...


Reply via email to