Some libraries are not found without LD_LIBRARY_PATH mangling

Thiago Macieira thiago at kde.org
Mon Oct 29 15:28:33 GMT 2007


Em Monday 29 October 2007 15:27:42 Alexander Neundorf escreveu:
> On Monday 29 October 2007, Alexander Neundorf wrote:
> > On Monday 29 October 2007, Thiago Macieira wrote:
> > > Em Sunday 28 October 2007 21:46:48 Alexander Neundorf escreveu:
> > > > > -DKDE4_USE_ALWAYS_FULL_RPATH=ON
> > > >
> > > > Objections against making this the default behaviour and removing the
> > > > option ?
> > >
> > > No and yes.
> > >
> > > I have no objections to making it the default. But turning RPATH off is
> > > a requested/required feature for some distributions.
> >
> > No, no !
> >
> > I meant just removing the option "FULL_RPATH" (because this is the
> > default then) but of course keeping the option to build without any
> > RPATH.
>
> Ok. If we build libraries always with RPATH, this means all libraries have
> to be built always with the RPATH for the build tree and then need to be
> linked again when installing with the RPATH for the install tree.
> This will make "make install" slower.
>
> If we don't do this, then programs which are intended to run from the build
> tree will find the libraries from their own RPATH (pointing into the build
> tree), e.g. kdeui, but kdeui would already have the RPATH for the install
> tree, which would be e.g. /opt/kde4/lib, so it might pick up an older
> version of libkdecore.
> So, it seems all libraries need to be relinked.
>
> Did I miss something ?

No, you're not.

But can't we use the installed libraries for the commands used during 
installation?

Another option: build those tools only with RPATH to the build tree, then 
relink them (and only them) during installation. This requires a full library 
list during linking: e.g., "-lkio -lkdeui -lkdecore", not just "-lkio". 
Doesn't CMake already do that?

Maybe an even better option: set LD_LIBRARY_PATH when running uninstalled. 
That variable overrides RUNPATH and any distribution not using that (read: 
using RPATH only) should be shot in the head. DT_RUNPATH has been available 
for more than 5 years.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071029/b40ed6eb/attachment.sig>


More information about the kde-core-devel mailing list