Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Aug 1998 23:20:47 -0400
From:      Jim Bloom <bloom@acm.org>
To:        "Matthew N. Dodd" <winter@jurai.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: ELF problems to occur
Message-ID:  <35D6500F.7F1149BA@acm.org>
References:  <Pine.BSF.4.02.9808152250550.5813-100000@sasami.jurai.net>

next in thread | previous in thread | raw e-mail | index | archive | help
'-R' is nice when you have source.  If you are software vendor distributing
binaries only, your example show why LD_LIBRARY_PATH is nice.  The system
administrator can configure the loading to match the local environment without
requiring supporting libraries to be installed in one precise place.
The exact same problem arises when one buys a binary only package.

I agree that editting a binaries search list is one of the better solutions, but
I don't believe it is feasible on Solaris.

Jim Bloom
bloom@acm.org


Matthew N. Dodd wrote:
> 
> Exactly.  '-R' is the easy way for us to keep track of dependancies on
> libraries; the binary keeps track of its search path, not the
> administrator of the system.
> 
> If the administrator wants to move things from their default locations, he
> should be able to recompile the binary, edit the search path in the binary
> (is this possiable?  I've not been able to find a way to do this in
> Solaris.) or at last resort, use LD_LIBRARY_PATH.
> 
> Its too easy for users to subvert LD_LIBRARY_PATH and dig themselves
> gopher holes to trip up in.  In addition, relying on LD_LIBRARY_PATH
> complicates the use of multiple versions of a library with different
> binaries.  At the site I work at, we use a commercial version of Kerberos,
> installed in say /usr/kerberos/{bin,lib,etc}.  I compile and install MIT
> kerberos in $HOME/opt/krb5/{bin,lib,etc}.  I neglect to modify the build
> process to add the proper '-R' and decide to use LD_LIBRARY_PATH; both the
> commercial and the MIT versions of kerberos call their libraries the same
> thing (libkrb5.so for short.).  Running the original binaries out of
> /usr/kerberos/bin results in an error as the LD_LIBRARY_PATH lets the
> binary load the wrong library.
> 
> Long winded but this is one of the reasons I dislike relying on
> LD_LIBRARY_PATH.  Using it for temporary situations is fine; installed
> programs have no business using it.
> 
> If anyone knows if it is feasible to modify the compiled in search paths
> I'd like to know about it.  This is the best solution for the desire to
> allow libraries to be moved.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35D6500F.7F1149BA>