RPATH for installed binaries ?

Nicolas Goutte nicolasg at snafu.de
Fri Feb 17 22:11:29 GMT 2006


On Friday 17 February 2006 21:32, David Faure wrote:
> 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.

There is a difference however.

As far as I know, some distributions (at least in the past) have disabled the 
$LD_LIBRARY_PATH functionality, for security reasons.

In such a case, you could set it to what you want, but the run-time linker 
would not listen.


>
> 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.

Have a nice day!





More information about the kde-core-devel mailing list