Subject: Re: Kerberos not linked with proper libs on ELF? [was: Re: qpopper 4.0.3 under netbsd/amiga 1.5.1]
To: Todd Vierling <tv@wasabisystems.com>
From: Aidan Cully <aidan@kublai.com>
List: tech-userlevel
Date: 08/25/2001 12:04:50
On Sat, Aug 25, 2001 at 11:14:08AM -0400, Todd Vierling wrote:
> On Sat, 25 Aug 2001, Hubert Feyrer wrote:
> 
> : > > The list is much longer, and includes symbols from libcrypt, libroken,
> : > > libresolv, etc. Running 'ldd' on /usr/lib/libkrb.so shows no other libs.
> : > > I can only guess that's the problem, maybe one of our Kerbero gurus can
> : > > have a look here.
> : >
> : > Do shared library dependencies work on all platforms?
> :
> : Yes for ELF, I'm not sure for a.out but I think so.
> : Todd please correct me if that's wrong.
> 
> Yes, they do work on a.out.
> 
> The only difference between a.out and ELF is that missing dependencies on
> a.out (where someone forgets to link a library with its dependency) are not
> noticed until runtime, whereas GNU ld notices the undefined symbols at link
> time.
> 
> 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.

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

--aidan