[Gllug] library includes and compiling

Nix nix at esperi.demon.co.uk
Mon Jan 14 08:16:40 UTC 2002


On Sat, 12 Jan 2002, Vincent AE Scott uttered the following:
> Nix(nix at esperi.demon.co.uk)@Sat, Jan 12, 2002 at 08:28:50PM +0000:
>> -rpath is a bad idea on systems running the GNU libc, because it bans
>> you from moving those shared libraries around. If you leave out the
>> -rpath, the ld.so.cache and ld.so.conf are consulted, so the libraries
>> can move freely as long as the ld.so.conf is kept up to date; if you
>> include -rpath, the program simply breaks if the X libraries ever move,
>> and you must relink.
> 
> hmm, i've never moved my X libs arround, as they are part of the system
> install, i see little or no reason to move them about.  for a start it'd
> break my systems package database.

But it wouldn't require a relink of every X application on the system!

Using -rpath introduces a failure mode that isn't there otherwise and
that is hard to fix :(

> also, at least on solaris2, SUID binaries linked against non system
> shared objects wouldnt IIRC run unless they were compiled with the run
> time link path specified.

Er, I said `using the GNU libc'. Solaris doesn't use it; IIRC, Solaris
gives you the wide choice of LD_LIBRARY_PATH or -rpath, and has no
dynamically changeable system-wide search path for shared libraries. So
Solaris binaries are basically all linked with -rpath, leading to the
lossage you mention.

>                           It was not possible to install the libs
> anywhere else than where they were intended to be installed, as
> corporate/IT policy of the company using the software denied this.

... and this was denied because it doesn't work. (Honestly, saying `I'll
do something in a broken way because the policy restricts me so I don't
notice the brokenness' is silly; what happens if the policy changes?
Every binary on your system is unnecessarily locking you in place.)

-- 
`Perhaps you should have asked Santa for your program as a Christmas
present.' --- Terran Melconian

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list