[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] export of LD_LIBRARY_PATH in e_start_main.c

On Mon, 18 Dec 2006 13:29:34 -0500 Mike Frysinger <vapier@gentoo.org> babbled:

> On Monday 18 December 2006 03:47, Carsten Haitzler wrote:
> > and what is $ORIGIN?
> it's a special keyword recognized by the ldso:
> If the name is ``ORIGIN'', then the substitution sequence is replaced by the 
> dynamic linker with the absolute pathname of the directory in which the 
> object containing the substitution sequence originated.
> in other words, if you execute "/usr/bin/foo", $ORIGIN will be replaced 
> with "/usr/bin"
> so if you utilize -rpath '$ORIGIN/../lib' in the linker flags when linking
> the e binary, then the ldso will automatically search /usr/bin/../lib/ when 
> searching for libraries for the e application only ... thus the environment 
> of e will not be polluted and applications launched inside of e should work 
> just fine
> -mike

hmm - actually this will work - often, but not all the time. if prefix/bin is a
symlink to for example prefix/.exec/i386/ (which i actually have seen for
multi-arch shared nfs filesystems) this breaks down - the prefix funding code
literally has code to try handle this. also is this ldso feature something
that exists outside of linux's ldso? as it's not documented... i'm wary of
jumping on it. 

i think a more portable solution might be for e to "revert" its ld_lib_path
changes e_start did (as its only really needed on app runtime link) or to
remove it on exec of anything.

------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
Tokyo, Japan (東京 日本)