LD_LIBRARY_PATH not being honoured (Re: Crash on launch with no X error message)

Michael Matz matz at kde.org
Mon Feb 23 19:52:21 GMT 2004


Hi,

On Mon, 23 Feb 2004, David Faure wrote:

> You can compile _all_ of KDE with --disable-rpath to disable that
> feature, but it doesn't work if e.g. kdelibs's .la file use rpath,
> because in that case you'll still get the kde dir in the -L flags, even
> if you disable rpath for e.g. kdenetwork. I had the same problem
> recently.

Also, libtool encodes the install dir of a lib as rpath for depending 
libs.  This is not configurable (and in fact it is correct for most use 
cases).

> I certainly wish that LD_LIBRARY_PATH could override rpath, but
> apparently that's not the way ld.so works. Anyone who knows more about
> this: any other env. var that would override rpath? Or should we file a
> wishlist with the ld.so developers? :)

DT_RUNPATH would be searched after LD_LIBRARY_PATH, but unfortunately ld 
encodes the rpath info with the DT_RPATH tag (which is deprecated and 
searched before LD_LIBRARY_PATH).  But linux ld.so supports an 
--inhibit-rpath BLA:BLUBB argument, which makes it ignore any such tags in 
the objects BLA and BLUBB (which is not very usable I admit, as you would 
have to add all objects which have these tags to ignore it for the whole 
process).


Ciao,
Michael.




More information about the kde-core-devel mailing list