[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Some libraries are not found without LD_LIBRARY_PATH mangling
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2007-10-30 9:22:59
Message-ID: 200710301023.00206.neundorf () kde ! org
[Download RAW message or body]

On Tuesday 30 October 2007, Thiago Macieira wrote:
> 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.

Hmmm.
Currently cmake generates -Wl,-rpath arguments which set the RPATH (and I 
think the RUNPATH too). If we simply add -Wl,--enable-new-dtags to the link 
flags, will this magically change the meaning of -Wl,-rpath to set the 
RUNPATH only ?

I see, the "-Wl,-rpath" is defined via the cmake variable 
CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. So maybe we could change this to set the 
RUNPATH instead. How must the command line look then ?

Alex
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic