libraries: satart / stop daemons
Nicolas.Williams at wdr.com
Fri Jan 21 19:50:16 GMT 2000
On Sat Jan 22 2000 - 07:28:32 EST, Cole, Timothy D. wrote:
> > nothing loads!
> > any suggestions anyone?
> Write wrapper shell scripts for each executable; use them to set
> LD_LIBRARY_PATH appropriately before exec-ing the binaries.
> So, smbd would become smbd.bin, and you'd have an smbd.in in the
> source tree something like:
> export LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
> exec $0.bin "$@"
> It should get substituted by autoconf, and the resulting script
> installed in the binaries directory.
Or build correctly. Meaning: use the -R linker flag to hardcode a list
of paths to search for at load time for the libraries.
ld ... -R/usr/local/lib:/opt/samba/lib ... -lsamba ...
I know libtool supports this, somehow, but I haven't touched libtool in
some time. Hmmm. Looking at the info files that come with libtool it
seems that the way to set the library paths is via the -rpath and or -R
argument to libtool.
LD_LIBRARY_PATH is a debug tool. :)
On Solaris 7 and higher you can reference '$ORIGIN' in the -R paths and
the linker will substitute the bin dir of the binary for '$ORIGIN'. This
feature makes binaries easily relocatable without having to resort to
wrappers and should be available on all Unixen, IMNSHO.
ld ... -R\$ORIGIN/../lib:/usr/local/lib ...
Hmmm. I like that $ORIGIN feature.
-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
More information about the samba-technical