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

success building on FreeBSD 3.x using DB2 port


I've managed to get openldap to build and run happily using FreeBSD's
supplied port of the Sleepcat db2 library (despite what the auto-FAQ
says on this subject *) but it's kind of a hack.  If anyone knows how to
do this more cleanly, please holler.  I'd eventually like to get this to
the openldap FreeBSD port maintainer so it can just happen automatically
for us.

Anyway, this is what I did (I'm assuming you know how to use the FreeBSD
ports collection):

1. Install db2 port (in /usr/ports/database/db)

2. This is the hack:
        cd /usr/local/lib
        ln -s libdb2.a libdb.a

3. Download and untar openldap 1.2.1 (I didn't use the FreeBSD port
because its not quite up to date)

4. In the openldap distribution directory, run configure like this:

        env \
          CPPFLAGS="-I/usr/local/include -I/usr/local/include/db2" \
          LDFLAGS="-L/usr/local/lib" \

5. The usual build commands:   make depend ; make

That's it!  Without my hack (step 2), configure doesn't find the new DB2
library.  It seems to be only interested in examining a lib named
libdb.a .   I tried also setting (in step 4)  LIBS="-ldb2" , but it
didn't help.

I see various ways configure could be hacked to get around this, but
what's the proper way?

* From the auto-faq:  http://www.openldap.org/faq/data/cache/119.html

  Charles N. Owens                               Email:  owensc@enc.edu
  Network & Systems Administrator
  Information Technology Services  "Outside of a dog, a book is a man's
  Eastern Nazarene College         best friend.  Inside of a dog it's
                                   too dark to read." - Groucho Marx