[Top][All Lists]

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

Re: removing rpath from libtool

From: Russ Allbery
Subject: Re: removing rpath from libtool
Date: Sun, 04 Nov 2007 20:56:31 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"BRIAND, Michel M" <address@hidden> writes:

> I would like to know why LD_LIBRARY_PATH is evil.

There are many reasons, but one of the biggest ones is that it's a giant
hammer that affects every binary that you run with it set.  Even if you
only set it in a wrapper script, it affects every program run by that
program.  So you end up having it affect programs that you don't expect,
which as soon as you have multiple copies of libraries installed in
different places can cause serious problems.

It's very common for people using LD_LIBRARY_PATH with some libraries
installed in one of those paths (such as new SSL libraries) to have
system-provided binaries start failing in weird ways because
LD_LIBRARY_PATH overrides the default search path for those binaries as
well and points them at shared libraries that you aren't expecting.

rpath is specific to one executable or library, and hence is much more
targetted and doesn't have the same far-reaching effect.

LD_LIBRARY_PATH can be used safely and many large installations do use it
safely, but it's dangerous and tricky.

Russ Allbery (address@hidden)             <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]