Subject: Re: configure: error: Berkeley DB version mismatch on OpenLDAP
To: Alexandre Martins Garcia <alexmgarcia@az.netcabo.pt>
From: Quentin Garnier <cube@cubidou.net>
List: pkgsrc-users
Date: 04/20/2006 10:57:51
--wayzTnRSUXKNfBqd
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:
>=20
> Before configure it says:
>=20
> =3D=3D=3D> Required installed package db4>=3D4.4.16: db4-4.4.20 found
>=20
> and when it starts the configure, at the end says:
>=20
> 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=
3)
> no
> configure: error: Berkeley DB version mismatch
>=20
>=20
> ------------------
> root@dagobah:/usr/pkgsrc/databases/openldap# pkg_info|grep db
> db4-4.4.20          Berkeley DB version 4 from Sleepycat Software
>=20
> -----------------------
>=20
> 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:

Index: buildlink3.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /pub/NetBSD-CVS/pkgsrc/databases/db4/buildlink3.mk,v
retrieving revision 1.25
diff -u -r1.25 buildlink3.mk
--- buildlink3.mk	6 Jan 2006 15:08:47 -0000	1.25
+++ buildlink3.mk	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
+BUILDLINK_TRANSFORM+=3D		l:db-4:db4 l:db-43:db4
=20
 .  if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS])
 #

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

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"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.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBREdND9goQloHrPnoAQIclwf9G9qjYpwsckl/mK4iinlFJlm/LbHzxk5B
Z7KHINOiy+cTFMINtn4aNme9RS1Jz/Un4rxgPAC+t6B0Tk/6sVZ0FtV0108so6yD
Hvd2e8HWu+l/tgmGEZY1mqop9ysZhxGquErGr8dF/9AQCnyg+xsSUBpsYHVRsjtp
jz3UuQIyB1xkfSuk4Q8DRQZpSikNdu0/pJSmsCkc2B8OnSoCOp4Va0dve74ZkW7k
sWPA4BsmJr96mg+Aew3WdK2blAphMZkhOfaA6PwpWQ/lEpX+dDL3jYXgltKWQdHc
NdCc/wj4S6wFMa5Ko4DynzO1ZssG6i5p3crOnRh49lw6Ll9yKYrW+w==
=Fw31
-----END PGP SIGNATURE-----

--wayzTnRSUXKNfBqd--