gabriel rosenkoetter on Sat, 5 Jan 2002 20:10:15 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

LD_LIBRARY_PATH (was: Re: [PLUG] Update on My Debian Progress)


On Sat, Jan 05, 2002 at 02:59:14PM +0100, Jeff Abrahamson wrote:
> LD_LIBRARY_PATH get /usr/local

If you've got software in production that requires LD_LIBRARY_PATH,
you have (or whoever wrote the Makefile has) done something horribly
wrong in the building process.

LD_LIBRARY_PATH is a *really* evil hack designed to make life easier
for library developers. It should NEVER be used in the real world.
It's a security risk, and it *really* makes the linker do dumb
things. What's more, if you have it set in your build environment,
it WILL break your software so it cannot work without it set (and
set exactly the same way).

If you think LD_LIBRARY_PATH is necessay for anything you compiled
from source, you're wrong. Go learn how to use ld (you'll be
interested in -R and -l, probably). If you think it's necessary for
certain third-party, closed source software, you're probably right.
But that should be set in a wrapper script and never, ever included
in your shell's environment.

For more background about this, have a look at David Barr's article
on the subject at http://www.visi.com/~barr/ldpath.html.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgp6tz6ugBkyS.pgp
Description: PGP signature