简体   繁体   中英

openLdap BerkleyDB compiling problems

I tried to compile openLDAP with BerkleyDB, but i got every time this message:

Version:

BerleyDB: db-6.1.23

openLDAP: openldap-2.4.40

1.) First Compiling BerkleyDB

../dist/configure --prefix=/products/db-6.1.23

Symlink:

BerkleyDB -> db-6.1.23

2.) Want do compile openLDAP

First setting PATH:

CPPFLAGS="-I/products/BerkleyDB/include" LDFLAGS="-L/products/BerkleyDB/lib -L/products/BerkleyDB/lib -R/products/BerkleyDB/lib" LD_LIBRARY_PATH="/products/BerkleyDB/lib" export CPPFLAGS LD_LIBRARY_PATH LDFLAGS

Then:

./configure --prefix=/products/openldap-2.4.40

..... checking if Berkeley DB version supported by BDB/HDB backends... no configure: error: BerkeleyDB version incompatible with BDB/HDB backends

Any Ideas?!

Error: BerkeleyDB version incompatible with BDB/HDB backends

This means that you need to upgrade your Berkeley Database because OpenLDAP support database version >= 4.4.

http://thompsonng.blogspot.com/2014/06/ldap-installing-openldap.html

Due to a licence change in 6.0.20 from BSD to AGPL. Search for "Berkeley DB licence change" to find some articles covering this (I can only post 2 links, and the ones below are more informative).

Howard Chu has stated that this change makes it a violation of the Berkeley DB licence to run an LDAP server using Berkeley DB 6.0 or later without a commercial licence: http://www.openldap.org/lists/openldap-technical/201309/msg00116.html

In that message, Howard notes that using 6.0 or later is no better than using 5.3.

As a result, the OpenLDAP developers have intentionally added a check for DB 6.0.20 or later: http://www.openldap.org/its/index.cgi/Build?id=7890;selectid=7890

Of course, the OpenLDAP developers have been expecting changes to the Berkeley DB licensing for some time, and developed their own database engine, LMDB, which has been adopted by many open-source projects that previously used Berkeley DB. Naturally, OpenLDAP has a backend for this database engine, back_mdb.

So:

  • If you have existing OpenLDAP databases using back_bdb or back_hdb (both use Berkeley DB as the database library), compile with Berkeley DB 5.3, and plan to migrate to back_mdb in future

  • If you are shipping OpenLDAP in a commercial product and you require Berkeley DB 6.x with (back_bdb, back_hdb), get a commercial licence from Oracle or ship DB 5.3 (and plan to migrate).

  • If you are just looking for the most reliable and performant local storage backend for OpenLDAP, you should probably use back_mdb

(BTW., many linux distributions still ship 5.3 and will not ship 6.x because of the licence change)

sed -i '/6.0.20/ a\\t__db_version_compat' configure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM