Subject: Re: Problem linting libkafs - make guru needed
To: David Holland <>
From: Chris G. Demetriou <>
List: current-users
Date: 10/07/1998 15:01:23
David Holland <> writes:
>  > : 3) Our shared libraries, at least a.out ones, don't deal well w/ libraries
>  > : depending on other libraries. It doesn't auto-include them.
>  > 
>  > Which will not, ever, get fixed on a.out platforms.  (Yet another argument
>  > for ELF, but then, the a.out behavior is actually the historic and
>  > expected... ;)
> ELF shared libraries still don't deal very well with cross-library
> dependencies.

Uh, for the definition given above ("auto-include"), indeed, ELF
shared libraries _should_ do the right thing, unless i'm horribly

Note that that doesn't necessarily mean that the NetBSD _make process_
is set up to do the right thing.

For instance, as an example of a proper auto-inclusion, consider
libg++ (which requires libcurses):

12 [beta] tmp % ldd /usr/lib/
         -lcurses.2 => /usr/lib/

16 [beta] tmp % gcc main.c -lg++ -lstdc++ -lm
17 [beta] tmp % ldd a.out
         -lcurses.2 => /usr/lib/
         -lg++.4 => /usr/lib/
         -lstdc++.0 => /usr/lib/
         -lm.0 => /usr/lib/
         -lc.12 => /usr/lib/

Note the correct inclusion of libcurses, even though it wasn't
specified on the command line.

Note also the fact that, in many cases, dependencies aren't
specified wehre they should be.  for instance, if you look at a
solaris system, you'll note that libm depends on libc, libX11 depends
on a whole bunch of things including libc, etc.

In general, NetBSD should, but does not, specify those dependencies as
part of its make rules.  (it does for libg++ because for whatever
reason that had already been done for a.out, if i recall correctly.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.