Re: How to install SASL 2.1.18 in an environment with multiple versio ns of BerkeleyDB?

From: Jeremy Rumpf (jrumpf at heavyload dot net)
Date: Tue Jun 08 2004 - 10:44:56 EDT

  • Next message: Caleb Epstein: "Patch for cyrus-sasl2 (support UNIX encrypted passwds)"

    On Tuesday 08 June 2004 00:52 am, Lim, Keh Boon wrote:
    > Hi all,
    >
    > I have problem building Cyrus SASL 2.1.18 in RedHat Enterprice Linux 3.0;
    > it seems that the configure program could not properly locate the version
    > of BerkeleyDB installed in the /usr/local/BerkeleyDB.4.2 directory. I also
    > encountered "undefined reference" error.
    >
    > For how I ran the "configure" command, see the "configure command" section
    > below.
    > For the error message, see the "The db related entries in the config.log
    > file" section below.
    >
    > My question is how to compile SASL against the version of BerkeleyDB.4.2 I
    > installed, instead of the version comes with OS (BerkeleyDB 4.1). I don't
    > want to uninstall the 4.1 version as this might break other application.
    >
    > Background Info
    > ===============
    > /etc/ld.so.conf setup
    > ---------------------
    > [root at mail1 cyrus-sasl-2.1.18]# cat /etc/ld.so.conf
    > /usr/local/BerkeleyDB.4.2/lib

    ^^^^^__ Depending, that might break some other Apps. Another way to do it
    would be to put:

    export LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.2/lib:$LD_LIBRARY_PATH

    toward the beginning of the applications startup script in /etc/init.d

    YMMV though...

    > /usr/local/ssl/lib
    > /usr/kerberos/lib
    > /usr/X11R6/lib
    > /usr/lib/qt-3.1/lib
    > /usr/lib/sane
    > /usr/lib/mysql
    > /usr/lib/dell/openmanage/hapi/bin
    >
    > Existing DB
    > -----------
    > db4-devel-4.1.25-8
    > db4-4.1.25-8
    > db4-utils-4.1.25-8
    >
    > New DB
    > ------
    > Installed in the /usr/local/BerkeleyDB.4.2
    >
    > configure command
    > -----------------
    > [root at mail1 cyrus-sasl-2.1.18]# ./configure --enable-plain --enable-login
    > --disable-krb4 --disable-otp --disable-cram --disable-digest
    > --with-saslauthd=/var/run/saslauthd --with-pam=/lib/security
    > --with-dblib=berkeley --with-bdb-libdir=/usr/local/BerkeleyDB.4.2/lib
    > --with-bdb-incdir=/usr/local/BerkeleyDB.4.2/include
    > --with-openssl=/usr/local/ssl --with-plugindir=/usr/local/lib/sasl2
    > 2>config.err | tee config.log
    >
    >
    > The db related entries in the config.log file
    > ---------------------------------------------
    > [root at mail1 cyrus-sasl-2.1.18]# grep db config.log|more
    > checking DB path to use... /etc/sasldb2
    > checking db.h usability... yes
    > checking db.h presence... yes
    > checking for db.h... yes
    > checking for db_create in -ldb-4.2... no
    > checking for db_create in -ldb4.2... no
    > checking for db_create in -ldb42... no
    > checking for db_create in -ldb-4.1... yes
    > config.status: creating sasldb/Makefile
    > configure: running /bin/sh './configure' --prefix=/usr/local
    > '--enable-plain' '--enable-login'
    > '--disable-krb4' '--disable-otp' '--disable-cram' '--disable-digest'
    > '--with-saslauthd=/var/run/
    > saslauthd' '--with-pam=/lib/security' '--with-dblib=berkeley'
    > '--with-bdb-libdir=/usr/local/Berk
    > eleyDB.4.2/lib' '--with-bdb-incdir=/usr/local/BerkeleyDB.4.2/include'
    > '--with-openssl=/usr/local
    > /ssl' '--with-plugindir=/usr/local/lib/sasl2'
    > --cache-file=.././config.cache --srcdir=.
    > configure:4982: checking db.h usability
    > configure:5018: checking db.h presence
    > configure:5090: checking for db.h
    > configure:5129: checking for db_create in -ldb-4.2
    > configure:5160: gcc -o conftest -Wall -W -g -O2
    > -I/usr/local/BerkeleyDB.4.2/include conftest.c
    > -ldb-4.2 -L/usr/local/BerkeleyDB.4.2/lib
    > -Wl,-rpath,/usr/local/BerkeleyDB.4.2/lib >&5
    > /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so: undefined reference to
    > `pthread_condattr_setpshared'
    > /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so: undefined reference to
    > `pthread_mutexattr_destroy'
    > /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so: undefined reference to
    > `pthread_mutexattr_setpshared
    > '
    > /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so: undefined reference to
    > `pthread_mutexattr_init'
    > /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so: undefined reference to
    > `pthread_mutex_trylock'

    You BerkeleyDB libs have been compiled with pthreads. Try configuring with:

    export CC='gcc -lpthread'

    ./configure --enable-plain --enable-login
    --disable-krb4 --disable-otp --disable-cram --disable-digest
    --with-saslauthd=/var/run/saslauthd --with-pam=/lib/security
    --with-dblib=berkeley --with-bdb-libdir=/usr/local/BerkeleyDB.4.2/lib
    --with-bdb-incdir=/usr/local/BerkeleyDB.4.2/include
    --with-openssl=/usr/local/ssl --with-plugindir=/usr/local/lib/sasl2

    HTH,
    Jeremy


  • Next message: Caleb Epstein: "Patch for cyrus-sasl2 (support UNIX encrypted passwds)"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD