Q0116

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q0116

Question

I have tried to build Exim with Berkeley DB 3 and 4, but I always get errors.

Answer

One common problem, especially when you have several different versions of BDB installed on the same host, is that the header files and library files for BDB are not in a standard place. You therefore need to tell Exim where they are, by setting INCLUDE and DBMLIB in your Local/Makefile. For example, you could use this when you want to build with DB 4.1:

INCLUDE=-I/usr/local/include/db-4.1
DBMLIB=/usr/local/lib/db-4.1/libdb.a

Specifying the complete library file like this will cause it to be statically linked with Exim. You'll have to check to see where these files are on your system. For example, on FreeBSD 5, the header is in /usr/local/include/db4 and the library is in /usr/local/lib and called libdb4. In that environment, you could use:

INCLUDE=-I/usr/local/include/db4
DBMLIB=-L/usr/local/lib -ldb4

This time, DBMLIB is specifying the library directory (/usr/local/lib) and the name of the library (db4) separately. The name of the actual library file is /usr/local/lib/libdb4.something. If the library was compiled for dynamic linking, that will be used.