libtool
[Top][All Lists]
Advanced

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

Re: Why is "setting LD_LIBRARY_PATH very bad"?


From: Bob Friesenhahn
Subject: Re: Why is "setting LD_LIBRARY_PATH very bad"?
Date: Wed, 24 Oct 2007 18:41:19 -0500 (CDT)

On Wed, 24 Oct 2007, Tom Treadway wrote:

Hi,
I've seen very frequent references to "LD_LIBRARY_PATH bad".
Is there a reference that summaries this badness?

LD_LIBRARY_PATH is not always bad. It has valid uses and is useful in controlled situations. Imposing management of LD_LIBRARY_PATH on the user of your software is evil. However, if you provide a wrapper script which hides this detail from the user then it is much less evil.

In times past I have observed a very evil problem with LD_LIBRARY_PATH in which the user required several different 3rd party applications, each of which used a somewhat different version of the same shared library. Applications would end up using the wrong shared library and either fail due to a missing symbol, or crash. Once again, providing a shell script wrapper which sets up LD_LIBRARY_PATH for only your application helps considerably to avoid such conflicts.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

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