[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: build problems on Solaris. openldap-2.3.34



Sean O'Malley wrote:
> I am having a few issues getting openldap-2.3.34 to build in solaris 10
> x86.
> 
> The first issues is the order of the include files basically anywhere
> <avl.h> is included it is picking up /usr/include/sys/avl.h instead of the
> openldap avl.h library. You can pretty much just grep for <avl.h> or
> "avl.h" and find all the places it conflicts.

There's a Sun bugid out there somewhere about avl.h spamming the user
namespace.

To work around the issue, here's an excerpt from my notes on how I build
OpenLDAP 2.3.xx on Solaris 10 x86:

cd build/openldap-2.3.xx
../runconfigure.openldap
make depend
/bin/env LTCFLAGS="-xtarget=native -xarch=amd64 -D_AVL_H" dmake -j 4
su
PATH=${PATH}:/usr/ccs/bin make install
ln -s /opt/openldap-2.3.xx /opt/openldap

Here's the contents of "runconfigure.openldap".  It assumes that a
64-bit version of Berkeley database (another interesting hassle with
4.2.52+patches) is in /opt/db and uses OpenSSL from /usr/sfw.  Oh yeah,
had to build my own libtool too.

#!/bin/ksh

vers=$(basename $PWD)
pfx="/opt/${vers}"
echo "Using prefix '$pfx'"
# can't use -fast or -xarch=amd64a: compiler bug

/bin/env CC=cc CXX=CC \
        CFLAGS="-xtarget=native -xarch=amd64 -D_AVL_H" \
        CPPFLAGS="-I/usr/sfw/include -I/opt/db/include
-I/opt/libtool/include" \
        LDFLAGS="-L/usr/sfw/lib/amd64 -L/opt/db/lib -L/opt/libtool/lib
-R/usr/sfw/lib/amd64:/opt/db/lib:/opt/libtool/lib" \
        ./configure \
                --prefix=${pfx} \
                --enable-dynamic \
                --enable-syslog \
                --enable-proctitle \
                --enable-local \
                --enable-slapd \
                --enable-crypt \
                --enable-modules \
                --enable-rewrite \
                --enable-bdb=yes \
                --enable-hdb=yes \
                --enable-ldap=mod \
                --enable-meta=mod \
                --enable-monitor=mod \
                --enable-null=mod \
                --enable-relay=mod \
                --enable-overlays=mod \
                --with-tls


Once all the hassle of compiling is over, OpenLDAP works great on our
Sun x4200s.

-Ben

-- 
Benjamin Lewis, CISSP <bhlewis@purdue.edu>
Security Analyst, Identity and Access Management
IT Security and Privacy
Purdue University

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature