[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5530) OpenLDAP fails to compile

Full_Name: Mike Tedder
Version: 2.4.9
OS: powerpc-linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

The back-bdb backend for the OpenLDAP slapd server fails to compile when being
built using Berkeley DB 4.7:

  cd back-bdb; make -w all
make[3]: Entering directory
rm -f version.c
../../../build/mkversion -v "2.4.9" back_bdb > version.c
/bin/sh ../../..//libtool --tag=disable-shared --mode=compile cc -g -O2
-I../../../include        -I../../../include -I.. -I./..     -c init.c
 cc -g -O2 -I../../../include -I../../../include -I.. -I./.. -c init.c -o
init.c: In function `bdb_db_open':
init.c:509: error: structure has no member named `lk_handle'
init.c: In function `bdb_back_initialize':
init.c:752: warning: passing arg 1 of `db_env_set_func_yield' from incompatible
pointer type
make[3]: *** [init.lo] Error 1
make[3]: Leaving directory
make[2]: *** [.backend] Error 1
make[2]: Leaving directory `/mnt/home/bpoint/src/openldap-2.4.9/servers/slapd'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/mnt/home/bpoint/src/openldap-2.4.9/servers'
make: *** [all-common] Error 1

The reason for this error is because there is no longer a "lk_handle" member
inside the DB_ENV structure in /usr/include/db.h.

I checked the mailing list archives, and there's not a sign of anyone having
this compile error anywhere.  I also checked the HEAD revision in CVS, and
init.c still uses the lk_handle member variable.  I guess no one's upgraded to
Berkeley 4.7 yet...?  :)

To work around the compile error, I have changed:

   #if DB_VERSION_FULL >= 0x04060012


   #if 0 && DB_VERSION_FULL >= 0x04060012

in all places in init.c and cache.c (the only two files affected), and slapd
compiles successfully.  I'm not sure if this is the proper way to fix it or not,