Subject: Re: pkg/19494: portable pkgtools/pkg_install won't build with db support
To: Jeremy C. Reed <reed@reedmedia.net>
From: Frank Cusack <fcusack@fcusack.com>
List: tech-pkg
Date: 12/23/2002 14:20:16
On Mon, Dec 23, 2002 at 08:42:38AM -0800, Jeremy C. Reed wrote:
> > 	When building the portable version of pkg_install, with db support,
> > 	the library order is incorrect; it's -ldb1 -linstall.  pkgdb.o
> > 	(in libinstall.a) can't find dbopen() with that link order.
> > 	Fix is simple: use -linstall -ldb1 instead.
> 
> This caught my attention.
> 
> Does it really need Berkeley DB version 1?

It doesn't require it.  `pkg_info -F' and perhaps other commands do not
work without it, though.

> Or will version 2, 3 or 4 work?

Yes, if compiled with db1 compat support (which the NetBSD packages don't
do).

> If it needs db1 (which Sleepycat has deprecated), then we must add a
> databases/db1 package.

:-)  I have such a package locally.  How should I go about contributing
it?  My package is for Solaris-only, though -- of the available patches
the OS-specific ones (IRIX and Linux) are poorly formatted and so I
didn't bother doing any tweaking.

> Because some operating systems may not have db1. For example, in the past
> db1 was included by default with glibc, but recent glibc doesn't include
> db1 by default.

yup.

There are a couple of possible fixes here.

- Add a db1 package
- Change the db* packages to include db1 compat support.  This change
  does not preclude also adding a db1 package.

The second fix is probably better, given db1's state.  It requires
changing pkg_install's configure step to detect a compat lib being
available.  It currently requires -ldb (as found on BSDs) or -ldb1
(as found on Linux).  If someone will change the db* packages, I'll
submit patches for pkg_install.

/fc