Subject: Re: Kerberos not linked with proper libs on ELF? [was: Re: qpopper
To: Aidan Cully <>
From: Frederick Bruckman <>
List: tech-userlevel
Date: 08/26/2001 09:39:20
On Sat, 25 Aug 2001, Aidan Cully wrote:
> On Sat, Aug 25, 2001 at 11:14:08AM -0400, Todd Vierling wrote:
> >
> > However, in order to make sure that programs properly link in all needed
> > system libraries (even for NOPIC platforms, where shared objects do not
> > exist), we avoid using dependencies on libraries in /usr/lib.  This forces
> > programs to link in all necessary libraries from /usr/lib, so even
> > statically-linked NOPIC platforms will still be able to compile and link
> > such programs.

Just as an aside, since introducing the interlibrary dependencies in
a.out xsrc for 1.5, complaints about missing symbols with pkgsrc
programs that link in shared "libXt" have dropped to zero. I guess
that means no one's running 1.4* anymore.

> I'm sure there's a reason we don't do this, but why not have statically-
> linked libraries subsume the .o files from libraries they depend on?
> contents=`ar t libcom_err.a`
> ar x libcom_err.a
> ar r libkrb5.a $contents
> rm -f $contents

The obvious problem is that you then need to satisfy dependencies in
the objects you just added.

This is actually done with libcurses. It pulls in a couple of objects
from termcap in order to avoid having to always follow "-lcurses" with
"-ltermcap". It doesn't quite work, though -- you still need to add
"-ltermcap" to link "lynx" with native curses on a.out/m68k.