RE: How to install SASL 2.1.18 in an environment with multiple ve rsions of BerkeleyDB?

From: Lim, Keh Boon (KehBoon dot Lim at atosorigin dot com)
Date: Tue Jun 08 2004 - 23:13:23 EDT

  • Next message: Jeremy Rumpf: "Re: How to install SASL 2.1.18 in an environment with multiple ve rsions of BerkeleyDB?"

    Jeremy, thank for your reply.

    With "export CC='gcc -lpthread'", the "undefined reference" error is
    resolved. However, SASL still can't be compiled against the new Berekey DB
    library.

    Take saslpasswd2 for example, the ldd output shows that the program is
    linked against the bdb library that comes with RHEL 3.0, not the one I
    installed from tar ball (version 4.2.52, in the /usr/local/BerkeleyDB.4.2
    directory).

    # ldd /usr/local/sasl/sbin/saslpasswd2
            libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb75ca000)
            libresolv.so.2 => /lib/libresolv.so.2 (0xb75b8000)
            libsasl2.so.2 => /usr/local/sasl/lib/libsasl2.so.2 (0xb75a5000)
            libdl.so.2 => /lib/libdl.so.2 (0xb75a2000)
            libdb-4.1.so => /lib/libdb-4.1.so (0xb74df000)
            libc.so.6 => /lib/tls/libc.so.6 (0xb73a7000)
            /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)

    The same "configure" command works fine in Redhat 8.0 environment, in which
    there are also with two versions of Berkeley DB library: the one that comes
    with Redhat 8.0 (version 4.0.14); the other one that I installed from tar
    ball (version 4.2.52, in the /usr/local/BerkeleyDB.4.2 directory).

    # ldd /usr/local/sasl/sbin/saslpasswd2
            libresolv.so.2 => /lib/libresolv.so.2 (0x4001e000)
            libsasl2.so.2 => /usr/local/sasl/lib/libsasl2.so.2 (0x40031000)
            libdl.so.2 => /lib/libdl.so.2 (0x40044000)
            libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
    (0x40047000)
            libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
            /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

    I suspect the problem lies in the configure script comes with SASL library,
    but I don't know how to fix it. I tried CPPFLAGS and LDFLAGS and got the
    same result.

    I notice that of all sasl libraries and programs, only sasldblistusers2 and
    saslpasswd2 are linked aginst dbd library, and that I need saslpasswd2 only
    if I use sasldb as pwcheck_method.

    So if I can't resolve the SASL issue in RHEL 3.0, can I compile sasl library
    against os bdb (db 4.1) and other applications (e.g. openLDAP, sendmail,
    Squirrelmail) against db 4.2? I've heard of the "sasl mismatch" problem with
    openLDAP.

    -----Original Message-----
    From: Jeremy Rumpf [mailto:jrumpf at heavyload dot net]
    Sent: Tuesday, June 08, 2004 10:45 PM
    To: Lim, Keh Boon; 'cyrus-sasl at lists dot andrew dot cmu dot edu'
    Subject: Re: How to install SASL 2.1.18 in an environment with multiple
    versio ns of BerkeleyDB?

    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: Jeremy Rumpf: "Re: How to install SASL 2.1.18 in an environment with multiple ve rsions of BerkeleyDB?"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD