Subject: Re: Trouble intalling teTeX
To: Dave Uhring <duhring@charter.net>
From: john heasley <heas@shrubbery.net>
List: port-i386
Date: 05/16/2003 16:55:52
Fri, May 16, 2003 at 06:22:44PM -0500, Dave Uhring:
> On Friday 16 May 2003 06:08 pm, john heasley wrote:
> > Sat, May 17, 2003 at 12:07:39AM +0200, Manuel Bouyer:
> > > On Fri, May 16, 2003 at 11:57:17AM -0400, Yasir Malik wrote:
> > > > Thank you very much!  I put LD_LIBRARY_PATH=/usr/X11R6/lib in
> > > > .profile.
> > >
> > > But this isn't a good solution. It means your programs were
> > > compiled with innapropriate flags.
> > > Try adding
> > > -Wl,-R/usr/X11R6/lib to the linker flags (adding it near
> > > -L/usr/X11R6/lib should be enouth).
> >
> > -Wl,-rpath=/usr/X11R6/lib ?
> >
> > out of curiosity, why isnt the rpath (LD_RUN_PATH) automatically
> > updated by the linker?  every dynamic-linked binary will need to find
> > it's libs. iirc, sunos did/does this.
> 
> SunOS (Solaris) requires that the libraries be linked with the 
> -R/usr/whatever/lib LDFLAG at compile time.  There is no automatic 
> LD_RUN_PATH installed in any user's environment, nor should there be; 
> same as NetBSD.

i thought (may have bit rot) the sunos (ie: 4.1.2) linker added the
the -L paths to the ELF headers.

anyway, "nor should there be"...i agree it should not alter one's
environment, but why not executable's headers?  according to ld.elf_so(1)

     The linker will search for libraries in three lists of paths:

     1.   A user defined list of paths as specified in LD_LIBRARY_PATH and
          ld.so.conf(5).

          The use of ld.so.conf should be avoided as the setting of a global
          search path can present a security risk.

     2.   A list of paths specified within a shared object using a DT_RPATH
          entry in the dynamic section.  This is defined at shared object link
          time.

     3.   The list of default paths which is set to /usr/lib.

so, even if DT_RPATH is populated by the linker, it can be over-ridden by
the user.

just trying to understand...