Skip to content
Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions



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


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:


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:

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.