On Tue, Jan 13, 2009 at 11:34 AM, Steve Nash <Steve.Nash at sun.com> wrote: > Nicolas Williams wrote: >> On Tue, Jan 13, 2009 at 09:08:03AM -0800, Steve Nash wrote: >>>> I think it should be a TCR: you MUST build your applications such that >>>> $LD_LIBRARY_PATH does not be set. >>>> >>> This is reasonable, if we rebuild everything with -R, and always install >>> the software in the same location. We had historically let users >>> install the software wherever they wanted. >> >> That's what the $ORIGIN token is for: >> >> ld ... -R '$ORIGIN/../lib':... >> >> That says that ld.so.1 should look for dependencies in ../lib relative >> to the directory that contains the executable in question. >> >> Nico > > Great, does this also work on Linux?
As of RHEL 4.x (at least -- that's where I tested it for a previous project), it does. I do seem to recall from my testing that it required a few extra linker options, but it does work.