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

Re: configure: error: Berkeley DB version mismatch





--On Wednesday, September 15, 2004 10:37 AM +1000 Cameron Gregg <cam@yak.com.au> wrote:

Stefan Champailler wrote:

Well, from what I've experienced you should read carefully the
config.log  file. I recently installed openLDAP on my Linux with so many
problems that I  may help you if you show the log...

Stefan



Here is the log, i see there is allot of errors like "ld: fatal: library
-ldld: not found", but i dont know how to fix them....:


This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

The relevant part is almost always near the end.

configure:17744: checking for db.h
configure:17754: cc -E -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include conftest.c >/dev/null 2>conftest.out
configure:17784: checking for Berkeley DB link (default)
configure:17841: cc -o conftest -g -O2 -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -L/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib conftest.c   -pthreads -lresolv -lgen
-lnsl -lsocket  1>&5
Undefined			first referenced
  symbol  			    in file
db_version                          /var/tmp//ccOcDMKP.o
db_env_create                       /var/tmp//ccOcDMKP.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
# line 17794 "configure"
# include "confdefs.h"

# ifdef HAVE_DB_185_H
# include <db_185.h>
# else
# include <db.h>
# endif

# ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
# endif

# ifndef NULL
# define NULL ((void*)0)
# endif

int main() {

# if DB_VERSION_MAJOR > 1
	{
		char *version;
		int major, minor, patch;

		version = db_version( &major, &minor, &patch );

		if( major != DB_VERSION_MAJOR ||
			minor < DB_VERSION_MINOR )
		{
			printf("Berkeley DB version mismatch\n"
				"\texpected: %s\n\tgot: %s\n",
				DB_VERSION_STRING, version);
			return 1;
		}
	}
# endif

# if DB_VERSION_MAJOR > 2
	db_env_create( NULL, 0 );
# elif DB_VERSION_MAJOR > 1
	db_appexit( NULL );
# else
	(void) dbopen( NULL, 0, 0, 0, NULL);
# endif

; return 0; }
configure:17865: checking for Berkeley DB link (-ldb42)
configure:17922: cc -o conftest -g -O2 -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -L/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib conftest.c -ldb42  -pthreads -lresolv
-lgen -lnsl -lsocket  1>&5
ld: fatal: library -ldb42: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
# line 17875 "configure"
# include "confdefs.h"

# ifdef HAVE_DB_185_H
# include <db_185.h>
# else
# include <db.h>
# endif

# ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
# endif

# ifndef NULL
# define NULL ((void*)0)
# endif

int main() {

# if DB_VERSION_MAJOR > 1
	{
		char *version;
		int major, minor, patch;

		version = db_version( &major, &minor, &patch );

		if( major != DB_VERSION_MAJOR ||
			minor < DB_VERSION_MINOR )
		{
			printf("Berkeley DB version mismatch\n"
				"\texpected: %s\n\tgot: %s\n",
				DB_VERSION_STRING, version);
			return 1;
		}
	}
# endif

# if DB_VERSION_MAJOR > 2
	db_env_create( NULL, 0 );
# elif DB_VERSION_MAJOR > 1
	db_appexit( NULL );
# else
	(void) dbopen( NULL, 0, 0, 0, NULL);
# endif

; return 0; }
configure:17946: checking for Berkeley DB link (-ldb-42)
configure:18003: cc -o conftest -g -O2 -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -L/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib conftest.c -ldb-42  -pthreads -lresolv
-lgen -lnsl -lsocket  1>&5
ld: fatal: library -ldb-42: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
# line 17956 "configure"
# include "confdefs.h"

# ifdef HAVE_DB_185_H
# include <db_185.h>
# else
# include <db.h>
# endif

# ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
# endif

# ifndef NULL
# define NULL ((void*)0)
# endif

int main() {

# if DB_VERSION_MAJOR > 1
	{
		char *version;
		int major, minor, patch;

		version = db_version( &major, &minor, &patch );

		if( major != DB_VERSION_MAJOR ||
			minor < DB_VERSION_MINOR )
		{
			printf("Berkeley DB version mismatch\n"
				"\texpected: %s\n\tgot: %s\n",
				DB_VERSION_STRING, version);
			return 1;
		}
	}
# endif

# if DB_VERSION_MAJOR > 2
	db_env_create( NULL, 0 );
# elif DB_VERSION_MAJOR > 1
	db_appexit( NULL );
# else
	(void) dbopen( NULL, 0, 0, 0, NULL);
# endif

; return 0; }
configure:18027: checking for Berkeley DB link (-ldb-4.2)
configure:18084: cc -o conftest -g -O2 -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -L/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib conftest.c -ldb-4.2  -pthreads -lresolv
-lgen -lnsl -lsocket  1>&5
configure:19244: checking for Berkeley DB version match
configure:19292: cc -o conftest -g -O2 -I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -L/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib conftest.c -ldb-4.2  -pthreads -lresolv
-lgen -lnsl -lsocket  1>&5
configure: failed program was:
# line 19259 "configure"
# include "confdefs.h"

# ifdef HAVE_DB_185_H
	choke me;
# else
# include <db.h>
# endif
# ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
# endif
# ifndef NULL
# define NULL ((void *)0)
# endif
main()
{
# if DB_VERSION_MAJOR > 1
	char *version;
	int major, minor, patch;

	version = db_version( &major, &minor, &patch );

	if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
		printf("Berkeley DB version mismatch\n"
			"\texpected: %s\n\tgot: %s\n",
			DB_VERSION_STRING, version);
		return 1;
	}
# endif

	return 0;
}


It looks to me like it couldn't find any matching library.

I had a problem like this with OpenLDAP 2.2.15 under Solaris, but it hasn't shown up so far in 2.2.17. Usually it found the library correctly running configure a second time under Solaris.

--Quanah


-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html