Subject: Re: X library path, etc.
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 01/15/2002 10:45:29
> The main problem is that many, many, programs assume that "-L" is enough,
> so I spend a lot of time editing files.

In my experience many programmers don't know what is going on. 
Typically they will say something like 'you need to add xxx to
LD_LIBRARY_PATH' to run this.....

Building programs is all a matter of getting the corrent 'RPATH' and
'NEEDED' enties into  their ELF headers.  I have been known to build a
library (no source) with a specific SONAME just so I could link a
program against it in order to pick up a specific NEEDED line (I didn't
want the real library to contain the same SONAME).

On solaris (and Unixware) the command:

dsl@teepee:-ksh$ dump -Lv /usr/lib/libnsl.so

/usr/lib/libnsl.so:

  **** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag         Value
[1]     NEEDED          libdl.so.1
[2]     NEEDED          libc.so.1
[3]     NEEDED          libmp.so.2
[4]     INIT            0x7d3b4
[5]     FINI            0x7d40c
[6]     SONAME          libnsl.so.1

Gives you the info you want - dunno which command gives thesame info on
netbsd.

	David