symlink app lib to common libs

Jonas Sundström jonas at
Thu Apr 28 15:20:59 PDT 2005

Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxx> wrote:
> > About including the libs. If app/lib was supported, how is it
> > any harder to replace an old or insecure "libfoo" in all your
> > app/lib folders than it is to replace it in one shared lib folder?
> THAT'S NOT THE PROBLEM. The problem is storing a _relative_ rpath
> in the executable, which can create a lot of *very* nasty problems.
> Google a bit, e.g. for the -L handling of SunOS and AIX (IIRC).


This looks relevant:

I found the last paragraph interesting:
Solaris 7 has a neat idea. There you can can specify a run time path 
which is also evaluated at run time. You link with an rpath of $ORIGIN/
. ./lib. Here, $ORIGIN evaluates at run time to be the installation path 
of the binary. Now you can move the installation tree to another 
location entirely and everything will still work. We need this in other 
OS's! Unfortunately, at least in Solaris 7, $ORIGIN is considered a 
"relative" path (you can subvert it if you have a writable directory on 
the same filesystem because UNIX lets you hard link even a setuid 
executable) so it is ignored on setuid/setgid binaries. Sun has fixed 
this in Solaris 8. You can specify with crle(1) paths that are 

/Jonas Sundström.      

More information about the Users mailing list