RPATH for installed binaries ?
David Faure
faure at kde.org
Fri Feb 17 20:32:08 GMT 2006
On Friday 17 February 2006 20:33, Leo Savernik wrote:
> Am Freitag, 17. Februar 2006 18:56 schrieb Alexander Neundorf:
> > do we need RPATH for installed binaries ?
> > Or in other words, do we expect that KDE libraries are installed in a
> > directory which is searched by the linker (e.g. via LD_LIBRARY_PATH or
> > DYLD_LIBRARY_PATH or PATH or ld.so.conf) ?
>
> For KDE3, we have required neither ld.so.conf nor LD_LIBRARY_PATH. I see no
> compelling cause to change that now.
The reason is obvious enough IMHO. No relinking to run uninstalled binaries (see how slow "make check" is,
and how many people get confused by "gdb ./kfoo doesn't work"),
no strange rpath breaking the link in some weird cases depending on the order of -L arguments,
no broken kde when moving the installation dir (just adjust the vars that you set initially),
and no more wondering why LD_LIBRARY_PATH doesn't seem to have any effect
due to RPATH having priority over it...
All this to save setting one env var, when the user needs to set a few anyway
if installing KDE into a custom prefix? (PATH, KDEDIRS, maybe even KDEHOME,
XDG_DATA_DIRS, XDG_CONFIG_DIRS......). Too much trouble for so little gain.
The utopia of "it works out of the box", which was the idea of using RPATH,
is clearly an utopia; a custom prefix does not work out of the box anyway.
--
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