Re: Shared libs on Solaris (was: Re: [Exim] LD/Exim errors)

Góra strony
Delete this message
Reply to this message
Autor: Peter Radcliffe
Data:  
Dla: Exim Users
Temat: Re: Shared libs on Solaris (was: Re: [Exim] LD/Exim errors)
Jim Knoble <jmknoble@???> probably said:
> Solaris doesn't really have an equivalent to ldconfig or /etc/ld.so.conf.
> There are two ways for a program to find its dynamic libraries under
> Solaris (and similar OSes):


As of Solaris 8 and later this is no longer true. crle lets you
configure the runtime linking enviroment. You can use this instead of
hacks involving LD_* to work around when you cannot re-link a program,
but it's still recommended to use -R to provide the correct library
search locations.

>   (1) The Easy Way:  Set the 'LD_RUN_PATH' environment variable to the
>       colon-separated list of directories in which the runtime linker
>       should look for shared libraries.  This isn't really so easy:


"The evil hack way", and you probably meant LD_LIBRARY_PATH, not
LD_RUN_PATH.

>   (2) The Right Way(TM): When linking the program, use the '-R <path>'
>       switch to specify each directory in which the runtime linker
>       should look for shared libraries.  If done right, this actually
>       turns out to be easier than The Easy Way, if you have control of
>       the linking stage of the binary, for several reasons:


Which is what I suggested earlier.

> Software that requires CDE or BrokenWindows gets a bit more complicated.


Not really, I build them all the time with no problems. I have a good
site.def so xmkmf things Just Work, otherwise it's a few more -R
settings.

P.

-- 
pir                pir-sig@???                 pir-sig@???