[Dovecot] Need help to install dovecot on solaris 10 with openldap libs

Bill Cole dovecot-20061108 at billmail.scconsult.com
Thu Jan 17 17:30:01 EET 2008


WARNING: The following advice has not been specifically tested, 
because I do not actually run Dovecot on Solaris. It is based on my 
experience with building other open source software on Solaris.


At 1:45 AM -0800 1/17/08, Dovecot Jami wrote:
>Hi,
>
>   I install dovecot with ldap support at Solaris 10 (x86). I know 
>that solaris LDAP is broken and so I install openldap. OpenLDAP 
>shared libraries are at /usr/local/lib and /usr/local/include. While 
>installing dovecot, I did the followings:
>
>   I execute this before run "./configure --with-ldap"
>
>   LDFLAGS="-L/usr/local/BerkeleyDB.4.2/lib 
>-R/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib -R/usr/local/lib"

Why are you including the Berkeley directories?

>   but dovecot is using the Solaris default LDAP lib files.
>
>   I also run
>
>   LDFLAGS="-R/usr/local/lib"
>    and
>
>   LDFLAGS="-L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib 
>/usr/local/lib/libldap-2.3.so.0 "
>
>   But dovecot is still using solaris ldap libs.

The configure script probably did not see the LDFLAGS variable 
because it was not in the configure command line and were not 
exported.

Also, it is not clear from your message whether you did everything 
necessary to remove your earlier build of Dovecot. That should 
include:

    make distclean

This removes all of the linked binaries, intermediate compiled 
objects, makefiles, and build configuration files in your Dovecot 
source directory that may have been created by previous attempts to 
configure and build the software. You need this to be absolutely sure 
that anything made using the previous build config is gone.

    CPPFLAGS=-I/usr/local/include \
    LDFLAGS='-L/usr/local/lib -R/usr/local/lib' \
    ./configure --with-ldap

NOTE THE TRAILING BACKSLASHES ON THE FIRST TWO LINES. You can either 
use those to escape the linebreaks from the shell or you can enter 
all three of the lines shown in one unbroken line. It should also 
work to set the flag variables and export them, but that could result 
in unwanted side-effects later. Setting the variables ahead of 
./configure makes the shell pass them in the environment, and 
configure also supports doing the assignments as arguments to the 
script itself.

If configure is seeing OpenLDAP, its output will include these lines:

    checking for ldap_init in -lldap... yes
    checking ldap.h usability... yes
    checking ldap.h presence... yes
    checking for ldap.h... yes
    checking for ldap_initialize in -lldap... yes
    checking for ldap_start_tls_s in -lldap... yes

NOTE: That is not conclusive proof that you ARE looking at OpenLDAP, 
but if those are not all 'yes' then you definitely are NOT.

    make

That will do the build, leaving the various Dovecot binaries in 
subdirectories of src (e.g. src/suth/dovecot-auth) Those can be 
examined with ldd. If all is well, you can install with:

    make install

That will install the binaries where they need to be.


-- 
Bill Cole
bill at scconsult.com



More information about the dovecot mailing list