Subject: Re: dumb g++ linker question
To: Kent Polk <kent@tiamat.goathill.org>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: port-i386
Date: 02/08/2001 10:43:21
On Wed, Feb 07, 2001 at 06:31:09PM +0000, Kent Polk wrote:
> Now I've never had to set my LD_LIBRARY_PATH on NetBSD before and
> everything works fine until this. Actually, that's always puzzled
> me...  I've always had to set that on unix systems. How does NetBSD
> deal with this?

Because NetBSD typically does the Right Thing with regard to shared
libraries. I've deleted the beginning of this... are you building
software out of pkgsrc, or is this third party stuff you're trying
to make behave? (If the latter, see if you can't find a way to link
it that does not make use of LD_LIBRARY_PATH, then make a package
out of it. :^>)

LD_LIBRARY_PATH should NEVER have been necessary just to get
software to run; it should be used only for development of new
shared libraries or by a sysadmin when moving shared libraries
around to ease the process. Unfortunately, large companies producing
binary-only software for unices ignore that fact, and require you to
set LD_LIBRARY_PATH to get their software to run on a regular basis.

Reading how ld.so deals with LD_LIBRARY_PATH in the former's man
page, as proposed by by Rex McMaster, is probably a good idea. But
if you want to know why you hate having to set it, go read
<http://www.visi.com/~barr/ldpath.html>.

Cheers...

       ~ g r @ eclipsed.net