Subject: shared library dependencies
To: None <netbsd-help@netbsd.org>
From: Brook Milligan <brook@biology.nmsu.edu>
List: netbsd-help
Date: 02/11/2000 17:16:35
I am having a problem with dependencies between shared libraries
(specifically with the postgresql package).  As I understand it, the
following applies:

- A.so is a shared lib
- B.so is a shared lib that depends on A.so
- when linking to form B.so, I must also link against A.so as well as
  the objects that go into B.so, right?

The problem is that postgresql provides a tcl interface library that
requires libpq.so (a library of postgresql stuff).  I cannot directly
link against the compiled libpq.so during the build of postgres
because libtool complains about not linking against an installed
library.

Thus, it seems that I must go through the following steps:

- build postgresql (except for the tcl lib)
- install it (including libpq.so)
- build the postgresql tcl interface library, linking against the
  installed libpq.so
- install the tcl lib

Is this really the only way to do this?

If so, doesn't the package system need to reflect this situation?
Perhaps with two packages, one for the base system and one for the tcl
interface? 

Cheers,
Brook