Subject: Re: configure: error: Berkeley DB version mismatch on OpenLDAP
To: Alexandre Martins Garcia <>
From: Quentin Garnier <>
List: pkgsrc-users
Date: 04/20/2006 10:57:51
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Apr 20, 2006 at 08:38:46AM +0000, Alexandre Martins Garcia wrote:
> I'm trying to compile evolution-data-server, when it goes compile=20
> openldap in configure gives that:
> Before configure it says:
> =3D=3D=3D> Required installed package db4>=3D4.4.16: db4-4.4.20 found
> and when it starts the configure, at the end says:
> checking db.h usability... yes
> checking db.h presence... yes
> checking for db.h... yes
> checking for Berkeley DB link (default)... no
> checking for Berkeley DB link (-ldb43)... no
> checking for Berkeley DB link (-ldb-43)... no
> checking for Berkeley DB link (-ldb-4.3)... no
> checking for Berkeley DB link (-ldb-4-3)... no
> checking for Berkeley DB link (-ldb42)... no
> checking for Berkeley DB link (-ldb-42)... no
> checking for Berkeley DB link (-ldb-4.2)... yes
> checking for Berkeley DB version match... Berkeley DB version mismatch
>        header: Sleepycat Software: Berkeley DB 4.4.20: (January 10, 2006)
>        library: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 200=
> no
> configure: error: Berkeley DB version mismatch
> ------------------
> root@dagobah:/usr/pkgsrc/databases/openldap# pkg_info|grep db
> db4-4.4.20          Berkeley DB version 4 from Sleepycat Software
> -----------------------
> What is the problem? I only have installed version 4.4.20 of DB4.

The problem is that OpenLDAP tries to be smart, and tries to cope with
all possible ways of naming the Berkeley DB library.  The problem is,
it's not smart enough and thus fails.

I assume you're not on NetBSD;  we don't ship with BDB 4.2.  But I know
quite a few Linux distros that have it in base, so OpenLDAP's configure
steps on it before it tries -ldb4.

My Linux/pkgsrc has this:

RCS file: /pub/NetBSD-CVS/pkgsrc/databases/db4/,v
retrieving revision 1.25
diff -u -r1.25
---	6 Jan 2006 15:08:47 -0000	1.25
+++	20 Apr 2006 08:48:35 -0000
@@ -17,7 +17,7 @@
 BUILDLINK_PKGSRCDIR.db4?=3D	../../databases/db4
 BUILDLINK_INCDIRS.db4?=3D		include/db4
 BUILDLINK_LDADD.db4=3D		-ldb4
+BUILDLINK_TRANSFORM+=3D		l:db-4:db4 l:db-43:db4
 .  if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS])

It's a hack, but it sure does the job.

Quentin Garnier - -
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)