One of the most annoying things to me in installing many pieces of software, including many Perl modules, is that often the maintainers seem to not understand the concepts expressed here (here until recently ... what in the world happened?). Usually, there is no readily apparent means of setting LD_RUN_PATH and/or -R options in the compilation path, although often the software authors are happy to tell you that you'll probably need to set LD_LIBRARY_PATH in order to get their software to run.
This is one of the most common issues I run into when installing software where the libraries are someplace other than
Any suggestions on what to do besides LD_LIBRARY_PATH when you need to link against a library in an oddball place like
Re:This is a common problem
jdavidb on 2006-10-02T13:03:18
The best solution I've found (at least on distros that support it) is to add the library path to
/etc/ld.so.conf I've just discovered the document I linked to is not the same as the original. If you can hunt down the original (try Internet archive, I can't as I'm at work and it's blocked
:P ), it's a must read, and it talks about ld.so.conf and why it's a bad idea. In short, what about when you need something linked against one specially compiled version of libjunk.so in /usr/local/junk and something else linked against a differently compiled version of libjunk.so in /opt/apps/junk? Theoretically, when you run the linker, you can use a -R option or the LD_RUN_PATH environment variable to hardwire the proper location for libraries into the executable. In practice, what you really need is something to pass to configure or Makefile.PL or what have you -- and it's just not there! The people who set up these config scripts don't understand the need. It's a mess. (Also, when you get a lot of library-related options on the gcc or linker line, it seems to get really confused. I'm sure that the truth is that I get really confused and the linker does just what it's supposed to do -- but it's very order-dependent in a strange way, and I don't understand it, yet.)