To Configure OpenLDAP on MAC OS X

So it turns out that to install my development environment for Zimbra that I had to install OpenLDAP. The problem is that on Mac OS X the version of the Berkeley DB that comes installed isn’t high enough for the current version of OpenLDAP. As a result, I had to dig around and find some pretty intense command line tricks. I thought I should share these just in case anyone else would need them. The following command will configure OpenLDAP properly on Mac OS X.

env CPPFLAGS=”-I{/path/to/install/BerkeleyDB}/include” \
LDFLAGS=”-L{/path/to/install/BerkeleyDB}/lib” \
./configure –prefix={/path/to/install}/openldap-{version number]

This entry was posted in Summer of Zimbra, Technology. Bookmark the permalink.
  • Bianchi Francesco

    Hi, i’m sorry if i disturb you… i’m italian and i have a problem.
    I’m working with Mac OS X Leopard and i need to compile OpenLdap.
    When i try to compile ./configure the error that occurred is:

    configure: error: BDB/HDB: BerkeleyDB version incompatible

    In your page i have found the solution but i whould know from you what i must put into the “path/to/install/BerkeleyDB/lib”

    and in /path/to/install/openldap-version number

    I’m sorry for my question but i’m new in the OpenLdap world…

    Thanks, Francesco.

  • Lionel

    Using db-4.7.25.NC and openldap-2.4.10 on Leopard, after building BerkleyDB in “/opt/BerkleyDB”.

    export CPPFLAGS=-I/opt/BerkeleyDB/include
    export LDFLAGS=-L/opt/BerkeleyDB/lib

    Then build OpenLDAP :
    ./configure –exec-prefix=/opt/Openldap –prefix=/opt/Openldap –with-cyrus-sasl

    Thanks

  • http://www.onvural.net/melih melih.onvural

    Thanks for the updated instructions Lionel