Global runtime library search path setting

Ari Pollak ari@ccs.neu.edu
Tue Jun 3 19:23:00 GMT 2003


[NOTE: Please CC me on all replies]

Hi, I am responsible for the gcc & GNU binutils installation on a 100+ 
Sun Solaris workstation network.
Both binutils and gcc are installed to nonstandard paths (/arch/gnu, not 
/usr/local) and this causes problems for programs where -R/arch/gnu/lib 
is not specified on the command line - e.g. a simple g++ compilation 
with no arguments except for the input file creates runtime dependencies 
on libstdc++ and libgcc, which are not usually found if LD_LIBRARY_PATH 
is not set because it is not currently feasible to put /arch/gnu/lib 
into the default library search path in Solaris.

So, the following two possibilities have come up:
- Make a wrapper script for ld to set LD_RUN_PATH before calling ld if 
it is not already set
- Set LD_RUN_PATH for everyone by default

Which brings me to my question - are both of those acceptable, meaning 
would they not cause any negative impact on programs?
Also, is it at all possible to specify a default library search path at 
compile-time? If so, how?

Thanks in advance for any input.



More information about the Binutils mailing list