Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need LD_LIBRARY64_PATH set before init scripts

0 views
Skip to first unread message

Adam Mikulic

unread,
May 24, 2002, 6:16:20 AM5/24/02
to
Hi all,

I have some programs compiled myself as 64-bit (with 64-bit libraries)
installed in /usr/local. When I started some of this program (e.g.
sshd) rld reports it cannot find some 64-libraries sshd depends on.

rld[783]: 783:/usr/local/sbin/sshd: rld: Fatal Error: Cannot
Successfully map soname 'libkrb.so.2' under any of the filenames
/usr/freeware/lib64/libkrb.so.2:/usr/lib64/libkrb.so.2:/usr/lib64/internal/libkrb.so.2:
/lib64/libkrb.so.2:/opt/lib64/libkrb.so.2:/usr/freeware/lib64/libkrb.so.2.2:
/usr/lib64/libkrb.so.2.2:/usr/lib64/internal/libkrb.so.2.2:/lib64/libkrb.so.2.2:
/opt/lib64/libkrb.so.2.2: (I built ssh with krb4 support, which I
need)

So I set LD_LIBRARY64_PATH in /etc/profile to point to my own
64-libraries (/usr/athena/lib:/usr/local/lib). After this path set,
sshd can be start OK. But the problem is, /etc/profile is proceeded
after init scripts.

Is there any way to set path to user 64-bit libraries internally to
rld??

I've read man rld, but only LD_LIBRARY64_PATH is the only way to do
it, but it should be possible, because after I install sgi freeware
package tcp_wrappers with swmgr, from that time in rld error log path
/usr/freeware/lib64 appeared (thats the tcp_wrappers 64bit libs were
installed).

Thanks for any suggestions

Adam Mikulic

David Anderson

unread,
May 24, 2002, 12:23:52 PM5/24/02
to
In article <66daee68.0205...@posting.google.com>,

Adam Mikulic <mik...@natur.cuni.cz> wrote:
>Hi all,
>
>I have some programs compiled myself as 64-bit (with 64-bit libraries)
>installed in /usr/local. When I started some of this program (e.g.
>sshd) rld reports it cannot find some 64-libraries sshd depends on.
>
>rld[783]: 783:/usr/local/sbin/sshd: rld: Fatal Error: Cannot
>Successfully map soname 'libkrb.so.2' under any of the filenames
>/usr/freeware/lib64/libkrb.so.2:/usr/lib64/libkrb.so.2:/usr/lib64/internal/libkrb.so.2:
[ ]

>So I set LD_LIBRARY64_PATH in /etc/profile to point to my own
>64-libraries (/usr/athena/lib:/usr/local/lib). After this path set,
>sshd can be start OK. But the problem is, /etc/profile is proceeded
>after init scripts.
[ ]
>Is there any way to set path to user 64-bit libraries internally to
>rld??

What the freeware executables do is to set DT_RPATH to
/usr/freeware/lib
Using the static-linker (ld) -rpath option..

In your case set -rpath to /usr/local/lib or /usr/local/lib64
(lib64 I like better, but it's personal taste and whether you think
you might also have an n32 version on the same system)
when you build the executable. For initial testing
the -rpath may not do any good for you,( LD_LIBRARY64_PATH
is useful) but once installed the dynamic section DT_RPATH
entry will do what you want.

To see the dynamic section entry:
elfdump -L <executable> | grep RPATH

Regards,
David B. Anderson da...@sgi.com http://reality.sgiweb.org/davea

of...@sgi.com

unread,
May 24, 2002, 12:30:21 PM5/24/02
to
$ from mik...@natur.cuni.cz -#107402 | sed "1,$s/^/> /"


I'd recompile sshd and add a -Wl,-rpath,/usr/athena/lib
-Wl,-rpath,/usr/local/lib to the link line.


>
>Thanks for any suggestions
>
>Adam Mikulic


richard.

--

-----------------------------------------------------------------------
Richard Offer Technical Lead, Trust Technology.
"Specialization is for insects"
__________________________________________http://reality.sgi.com/offer/

Damian Menscher

unread,
May 24, 2002, 12:46:57 PM5/24/02
to
Adam Mikulic <mik...@natur.cuni.cz> wrote:

> So I set LD_LIBRARY64_PATH in /etc/profile to point to my own
> 64-libraries (/usr/athena/lib:/usr/local/lib). After this path set,
> sshd can be start OK. But the problem is, /etc/profile is proceeded
> after init scripts.

Random idea:

LD_LIBRARY64_PATH=/usr/athena/lib:/usr/local/lib /usr/local/sbin/sshd

Damian Menscher
--
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 1429 DCL, Workstation Services Group, CITES Ofc:(217)244-3862 |#=-
-=#| <mens...@uiuc.edu> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-

0 new messages