Subject: Re: How does a ELF system find libs at runtime?
To: None <tech-pkg@netbsd.org>
From: Todd Vierling <tv@pobox.com>
List: tech-pkg
Date: 01/04/1999 08:02:01
On Mon, 4 Jan 1999, Thorsten Frueauf wrote:

: How does the system determine where to look for libs at runtime?

cc -Wl,-R/path/to/libraries -o file ...

This is known as `rpath'.

: I did build/install pkgsrc/x11/xlockmore, but if I start it, it
: complains about not finding libXpm.so.4 - but of course its
: in /usr/X11R6/lib - same goes with the Mesa libs. They are
: installed in /usr/X11R6/lib with the appropriate links
: (e.g. libXpm.so.4.11 linked to libXpm.so.4 and libXpm.so).

Then there's something wrong with the X11R6 imake configuration.  It should
certainly know to use rpath (whether -R or -rpath, both are the same).  This
works for Alpha; it seemingly needs fixing for mips.  Is your X11R6 up to
date from the 1.3.3 distribution, as well?

: If so, I would propose to add /usr/X11R6/lib and /usr/pkg/lib there
: too, since /urs/local/lib is already there...

This is reinventing ld.so.conf, which we are trying to avoid.  The intent is
to make X11 and pkgsrc completely nondependent on such crutches.  ;)

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)