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

Re: build problems on Solaris. openldap-2.3.34

--On Sunday, April 01, 2007 10:19 PM -0400 Benjamin Lewis <bhlewis@purdue.edu> wrote:

Sean O'Malley wrote:
I am having a few issues getting openldap-2.3.34 to build in solaris 10

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
make depend
/bin/env LTCFLAGS="-xtarget=native -xarch=amd64 -D_AVL_H" dmake -j 4
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)
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 \

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

Just to note, I found that Linux 2.6 is faster than Solaris 10 on Sun's 4X00 servers. So if you support Linux as well as Solaris, its a reason not to use Solaris. ;) I use the X4100's as my production boxes, using Debian 64-bit.


Quanah Gibson-Mount
Senior Systems Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html