Subject: Re: dynamic linking
To: None <tech-userlevel@netbsd.org>
From: Lucio De Re <lucio@proxima.alt.za>
List: tech-userlevel
Date: 03/19/2003 17:31:52
On Wed, Mar 19, 2003 at 09:22:01AM -0600, Frederick Bruckman wrote:
> >
> > ld.elf_so needs a hint on where to find libraries. You can add hints in
> > /etc/ld.so.conf (adding /usr/X11R6/lib here is fine),
> 
> That's not supposed to work on NetBSD. The file installed with the
> system by default has a different format (and a different purpose).
> 
It's good to see that my confusion isn't unique :-)

> > or add it in the
> > linked file it's self, it's called a RPATH entry.
> >
> > -Wl,-R ld/gcc option adds the convenient hint entry into the resulting
> > binary. Usually you will prefer the later solution, but then you have to
> > modify the clinking options to add the correct one.
> 
> A simpler way is to set LD_RUN_PATH in the build environment. That
> only works, however, if there are no "Wl,-R" or "-Wl,-rpath" options
> at all.
> 
Fixing it is of course a priority, but I'm curious as to why it
doesn't work out of the box.  Shall I post the compilation output?
I didn't notice anything out of place in it, so I'm baffled as I'd
expect no such problem from such a trivial exercise.

And, yes, I do admit that I have not studied the problem to any
depth because I really believe it _shouldn't_ happen.

++L

PS: rdesktop _is_ in the 'pkg' collection, but I was in a hurry to
use the most recent release, so I used the released version (1.2.0).
It's probably a little thing in the configuration that's inconsistent
with NetBSD's way of doing things...