Subject: Re: phantom X11 lib
To: John Franklin <franklin@elfie.org>
From: Todd Vierling <tv@pobox.com>
List: port-alpha
Date: 06/10/1999 07:52:57
On Thu, 10 Jun 1999, John Franklin wrote:

: > But note that if you make your xterm setuid, it will STILL find that library.
: > That's because xterm is linked with the magic ELF -rpath directive.
: 
: I'm pretty sure I've built other things that use shared libraries and
: don't run into this.  I suppose xosview is one of the few programs
: that bothers to micromanage its libraries?

/usr/lib is always searched, and any program that uses Imakefiles (xmkmf)
will gain the rpath options automagically.

: That did it.  Thanks for the tip.  (I think you meant 
: -rpath=/usr/X11R6/lib, BTW.)

There's half a dozen ways to say it on the cc command line.  The -Wl, part
means `pass to the linker'; pkgsrc uses "-Wl,-R/path/name" because that is
compatible with ELF, a.out, 1.3.x, and 1.4 uniformly.

(a.out 1.4 packages have been built such that you don't have to edit
ld.so.conf and add /usr/pkg/lib or /usr/X11R6/lib *at all* anymore -- a.out
can use rpath, too!)

: That was the other thing that was bothering me.  A NetBSD-1.4/mac68k
: system built and ran it just fine (well, after I added -DUVM to the 
: CXXFLAGS.)

Because you have /usr/X11R6/lib in /etc/ld.so.conf.  This is, as of 1.4, a
`taboo' way of doing this.

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