James Hawtin <[EMAIL PROTECTED]> writes:
> If this is no a linux box, why not add /usr/local/ssl/lib to your
> /etc/ld.so.conf and run ldconfig if you use /usr/local/lib add that
> insted.
Yeah, it's nice that Linux makes this easy, but as I said, lots of UNIXes
don't.
> If that all fails try setting LD_RUN_PATH=/usr/local/ssl/lib before
> compile or LD_LIBRARY_PATH=/usr/local/ssl/lib after compile
>
> Generally it is GOOD practace not to set -R as this ends up with compiled
> in library paths, which cause problems later when you what your libraries
> in a different place, HPUX is a real sucker for this.
Most of the reading I've done on this says that depending on the environment
variable is non-recommended practice, though I'd have to do some re-reading
to remember all the reasons why.
> LD_LIBRARY_PATH works on all SVR4 unixs, and the only times when you
> cannot use it is when the executable is setuid, (to stop library spoofing)
And that extremely important case is one reason you need a cross-platform
way to do the library directory hardcoding.
On AIX, if you don't use -Wl,-blibpath when linking, you get a program with
a library search path of ".:/usr/lib:/lib". That's right, "." is first.
MAJOR problem for setuid programs, as you bring up, but also a big problem
when root might be running the program in directories (say /tmp for
instance) that potentially malicious users have write-access to.
> Not finding a dynamically linked library is not "instability", its
> incorrect OS configuration. If you don't like any of those options sim
> link the .so into /usr/lib which will be in your global run path
It's a bad idea on almost any OS to put local additions in directories that
the OS thinks it controls. You can get conflicts with the OS's software
packaging system, integrity checks, and have issues if a formerly 3rd-party
piece of software gains an official port in the OS.
---------------------------------------------------------------
Dan Harkless | To help prevent SPAM contamination,
GNU Wget co-maintainer | please do not mention this email
http://sunsite.dk/wget/ | address in Usenet posts -- thank you.