Some libraries are not found without LD_LIBRARY_PATH mangling

Thiago Macieira thiago at kde.org
Tue Oct 30 08:57:18 GMT 2007


Em Monday 29 October 2007 16:46:50 Alexander Neundorf escreveu:
> On Monday 29 October 2007, Thiago Macieira wrote:
> > Em Monday 29 October 2007 16:28:33 Thiago Macieira escreveu:
> > > 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.
> >
> > Or we can turn the flag on by ourselves: -Wl,--enable-new-dtags.
>
> Which effect does this have exacty have ?

It enables the new ELF dtags in binutils.

According to the binutils mailing list 
(http://sourceware.org/ml/binutils/2005-04/msg00060.html), the only two dtags 
enabled by this flag are DT_RUNPATH and DT_FLAGS. I might add also an excerpt 
from this message: http://www.cygwin.com/ml/binutils/2005-04/msg00049.html

"I don't mind DT_RUNPATH because support for this was added to glibc in
1999, which is old enough that I think most of my users have upgraded by
now"

I could not find any side effects of having DT_FLAGS turned on.

As for DT_RUNTIME, the only "side-effect" it can have is to make 
LD_LIBRARY_PATH work properly: i.e., be given preference. So, if you're 
relying on the 10-year-old broken behaviour of DT_RPATH vs LD_LIBRARY_PATH, 
you should be shot in the head. I don't think we have to support those 
people.

One more note: sometimes people are afraid of --enable-new-dtags because in 
KDE 3 we had a configure-time option --enable-new-ldflags which did two 
things:

	1) enabled --enable-new-dtags
	2) enabled --as-needed

I still think we should build with --as-needed, but that has side-effects, 
like libraries not being found at link-time (another linker option has to be 
given for linking to work properly).

-- 
  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/20071030/6ae22229/attachment.sig>


More information about the kde-core-devel mailing list