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

David Faure faure at kde.org
Mon Feb 23 17:44:37 GMT 2004


On Monday 23 February 2004 18:36, Martijn Klingens wrote:
> Sounds like a problem with the KDE build system, because it should never 
> hardcode paths in the .so files.

It does so, and on purpose. Your problem is called rpath...
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.

Basically, rpath makes life easier for people running a single version
of KDE, or at least "all of KDE inside the same prefix" (even if there are
multiple such prefixes, used completely independently, e.g. like konstruct does).

For (the few) people who want to install several versions of the same 
KDE application (or cvs module), it makes life harder. One would have
to know in advance that he's going to do that, and compile everything
with --disable-rpath...

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? :)

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list