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

Trouble building OpenLDAP CVS with Berkeley DB 4


I haven't built OpenLDAP CVS for a long time since db4 packages were not
available for Debian Linux. I finally gave up waiting and installed a local
copy of db4 and tried to build OpenLDAP and immediately ran into
trouble. The configure script is breaking in the check for the DB version
compatibility. Further investigation shows that the test program is

I think the problem is with build/openldap.m4. In the OL_BERKELEY_DB_TRY
macro, the following code fragment causes the core dump

        db_env_create( NULL, 0 );
        db_appexit( NULL );
        (void) dbopen( NULL, 0, 0, 0, NULL);

DB 4 does not support a NULL parameter to be passed is as a first argument
to db_env_create. There is no check in db_env_create() if the first
parameter is NULL, it blindly assigns a value to the variable. 

I am surprised nobody ran into this problem before.