Alex Sayle alexs at alphacomplex.info
Wed Aug 9 14:54:34 BST 2006

On Tue, 08 Aug 2006, David Alban <extasia at extasia.org> wrote...

 > cow-orker:  I just realized that some users hardcode LD_LIBRARY_PATH
 > to "". Looks like the linker defines the standard /usr/lib in the
 > absence of the variable being expanded.  So if you wanted to clobber
 > it, then /usr/lib is probably the best value.
 > ---------------------------------------------------
 > Anyone here give $ENV{ LD_LIBRARY_PATH } an explicit default value?
 > Anyone have an opinion on doing so?

 LD_LIBRARY_PATH by default is empty on most systems (at least not in
 any majour Linux, or *BSDs) and should remain that way in most cases.

 ld considers /lib/ and /usr/lib/ to be trusted and will always
 include them in the search path. system wide you can extend the
 search path by tossing an entry into /etc/ld.so.conf, ( which is
 where stuff like /usr/X11/lib or the likes are put)

 global LD_LIBRARY_PATH should be considered a dirty hack, but I think
 its very acceptable to set it in wrapper scripts to beat and app in
 to submission but that's about it. 

 The other method is to set an rpath to the executable.


 "No animals where harmed during the creation of this email."
 Alex Sayle                                          alexs at alphacomplex.info

More information about the london.pm mailing list