cyrus-sasl-2.1.20 and db-4.3.27 problem (solved)

Oliver Aruväli chaser at hot.ee
Sun Feb 6 07:26:43 EST 2005


To close this up:

extencive googleing came up with the magic line export LIBS="-lpthread 
$LIBS"  before configure and I was all set.




Oliver Aruväli wrote:

>
>
> Hi,
>
> I wrote quite a long story considering all the suggestions and after 
> thinking it through I deleted it all. Seems I just had to think it 
> through aloud. So this is what I came up with: cyrus-sasl 2.1.20's 
> configure file was the first landmine. At line 5135 or so it lists 
> versions of the lib files, just the numbers nothing else and as 4.3 is 
> not listed as an option, it gets a number comparison error. So by 
> adding db-4.3, db4.3 and db43 to the list (in one line, nextline gave 
> me an error),  4.3.27 will be accepted. The next landmine was this:
>
> from: pico 
> /usr/src/webserver/cyrus-sasl-2.1.20-with-bdb.4.3.27/config.log
>
> configure:5092: checking for db.h
> configure:5099: result: yes
> configure:5149: gcc -o conftest -Wall -W -g -O2  
> -I/usr/local/bdb/4.3.27/include -L/usr/local/bdb/4.3.27/lib  
> -Wl,-rpath,/usr/local$
> /usr/local/bdb/4.3.27/lib/libdb-4.3.so: undefined reference to 
> `pthread_condattr_setpshared'
> /usr/local/bdb/4.3.27/lib/libdb-4.3.so: undefined reference to 
> `pthread_mutexattr_destroy'
> /usr/local/bdb/4.3.27/lib/libdb-4.3.so: undefined reference to 
> `pthread_mutexattr_setpshared'
> /usr/local/bdb/4.3.27/lib/libdb-4.3.so: undefined reference to 
> `pthread_mutexattr_init'
> /usr/local/bdb/4.3.27/lib/libdb-4.3.so: undefined reference to 
> `pthread_mutex_trylock'
> collect2: ld returned 1 exit status    
> (BTW the same error appears when I run configure with 4.2.52 
> (respectevly libdb-4.2.so ) so it must be be version independant )
>
> this magical 'pthread' was a thing which gave me something to google 
> with, so I found this http://www.postfix.org/DB_README.html and at the 
> end You see the same error not in configure phase but in build phase 
> and the solution:
>
> Add the "-lpthread" library to the "make makefiles" command.
>
> % make makefiles .... AUXLIBS="... -lpthread"
>  
>
> I know that with this knowladge my problem could be solved but as this 
> is now out of my league I turn to Your help again :)
>
> Oliver
>
>
>
>
>
> OpenMacNews wrote:
>
>> hi oliver,
>>
>> fwiw, sasl-2.1.20 + bdb-4.3.27 runs just great on my OSX 10.3.7 sys 
>> ... which, alas, is diff from yours.
>>
>> that said, i've had a similar issue b4 that may be worth mentioning 
>> here; dunno if it's your solution =)
>>
>> if you poke around in sasl's code, you'll note that the sasl code, 
>> walks "-ldb-4.2 -ldb-4 -ldb" for ID'ing DB libs ...
>>
>> trouble is, a fresh build of bdb 4.3.27 has *no* "-ldb-4.2" (at least 
>> 4 me), so if you've got db-4.2, etc. (i.e., your OLD or DEFAULT 
>> install ...) in another dir in your default path, e.g. /usr/lib etc., 
>> the Makefile seemingly/eventually picks up THAT _default_install, 
>> hence not finding your intended install.
>>
>> the workaround's fairly simple ...
>>
>> after your DB 4.3.27 build,
>>
>>    % cd ...berkeley-db-4.3.27/lib
>>
>>    % ln -sf libdb-4.3.a libdb-4.2.a
>>    % ln -sf libdb-4.3.dylib libdb-4.2.dylib
>>    % ln -sf libdb-4.3.la libdb-4.2.la
>>
>> or, of course, the equivalent for your platform extensions ...
>>
>> add to that:
>>
>>  setenv CPPFLAGS "-I/usr/local/DarkMatter/berkeley-db/include ..."
>>  setenv LDFLAGS "-L/usr/local/DarkMatter/berkeley-db/lib -ldb ..."
>>
>>  ./configure \
>>  ...
>>  --with-dblib=berkeley \
>>  --with-bdb-libdir=/usr/local/DarkMatter/berkeley-db/lib \
>>  --with-bdb-incdir=/usr/local/DarkMatter/berkeley-db/include \
>>  ...
>>
>> &, so far, this has done the trick for me:
>>
>> % otool -L libsasl2.dylib
>> libsasl2.dylib:
>>        /usr/local/cyrus-sasl/lib/libsasl2.2.dylib (compatibility 
>> version 3.0.0, current version 3.20.0)
>>        /usr/local/berkeley-db/lib/libdb-4.3.dylib (compatibility 
>> version 0.0.0, current version 0.0.0)
>>        /usr/lib/libdl.1.dylib (compatibility version 1.0.0, current 
>> version 1.0.0)
>>        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, 
>> current version 71.1.1)
>>        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, 
>> current version 324.9.0)
>>
>>
>> for all I know, this has been addressed in sasl-CVS, but, 
>> unfortunately, it does not build successfully for me ... so can't 
>> testify.
>>
>> hope this actually helps
>>
>> cheers,
>>
>> richard
>>
>> -- On February 4, 2005 12:08:14 PM -0500  Igor Brezac 
>> <igor at ipass.net> wrote:
>>
>>
>>>
>>> Check config.log for more clues, however I do not think 
>>> cyrus-sasl-2.1.20
>>> build script supports berkeley 4.3.x.  You need to fetch the cvs 
>>> version.
>>>
>>> -Igor
>>>
>>> On Fri, 4 Feb 2005, [ISO-8859-1] Oliver Aruväli wrote:
>>>
>>>> Hi,
>>>> I am trying to compile cyrus-sasl-2.1.20, but during the configure 
>>>> I get
>>>>
>>>> --------------------------------
>>>>
>>>> checking db.h usability... yes
>>>> checking db.h presence... yes
>>>> checking for db.h... yes
>>>> checking DB library to use... no
>>>> configure: WARNING: Disabling SASL authentication database support
>>>>
>>>> ---------------------------------
>>>>
>>>>
>>>> why can't it find the library? the ./configure line I use is:
>>>> ./configure \
>>>> --enable-anon \
>>>> --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/bdb/current/lib \
>>>> --with-bdb-incdir=/usr/local/bdb/current/include \
>>>> --with-openssl=/usr/local/ssl \
>>>> --with-plugindir=/usr/local/lib/sasl2 \
>>>> --with-pgsql=/usr/local/pgsql/current \
>>>> --with-mysql=/usr/local/mysql/current
>>>>
>>>> This is a problem with Berkeley, right? I have compiled and installed
>>>> version  4.3.27. (/usr/local/bdb/current/lib is in /etc/ld.so.conf 
>>>> and I
>>>> have done  ldconfig)
>>>>
>>>> atlantis:/usr/src/cyrus-sasl-2.1.20# ls -la 
>>>> /usr/local/bdb/current/lib/
>>>> total 5640
>>>> drwxr-xr-x  2 chaser chaser    4096 Feb  4 12:29 .
>>>> drwxr-xr-x  6 chaser staff     4096 Feb  4 12:29 ..
>>>> -r--r--r--  1 chaser chaser  193857 Feb  4 12:29 db.jar
>>>> -rw-r--r--  1 chaser src    1132142 Feb  4 12:29 libdb-4.3.a
>>>> -rw-r--r--  1 chaser src        806 Feb  4 12:27 libdb-4.3.la
>>>> -rwxr-xr-x  1 chaser src     910934 Feb  4 12:27 libdb-4.3.so
>>>> lrwxr-xr-x  1 chaser chaser      12 Feb  4 12:29 libdb-4.so -> 
>>>> libdb-4.3.so
>>>> -rw-r--r--  1 chaser src    1132142 Feb  4 12:29 libdb.a
>>>> lrwxr-xr-x  1 chaser chaser      12 Feb  4 12:29 libdb.so -> 
>>>> libdb-4.3.so
>>>> -rw-r--r--  1 chaser src    1280498 Feb  4 12:29 libdb_java-4.3.a
>>>> -rw-r--r--  1 chaser src        851 Feb  4 12:28 libdb_java-4.3.la
>>>> -rwxr-xr-x  1 chaser src    1070486 Feb  4 12:28 libdb_java-4.3.so
>>>> lrwxr-xr-x  1 chaser chaser      17 Feb  4 12:29 
>>>> libdb_java-4.3_g.so ->
>>>> libdb_java-4.3.so
>>>> lrwxr-xr-x  1 chaser chaser      17 Feb  4 12:29 libdb_java-4.so ->
>>>> libdb_java-4.3.so
>>>> lrwxr-xr-x  1 chaser chaser      17 Feb  4 12:29 libdb_java.so ->
>>>> libdb_java-4.3.so
>>>> atlantis:/usr/src/cyrus-sasl-2.1.20#
>>>>
>>>> Seems that the libraries are there, maybe my problem is in 
>>>> something else,
>>>> but I suspect berkeley. Any kind of help is welcome.
>>>>
>>>> PS. I have searched the mailing-list for the past half a year and 
>>>> done some
>>>> googleing, but haven't found a solution.
>>>> PS2. Trying to follow this howto
>>>> http://howtos.linux.com/howtos/Postfix-Cyrus-Web-cyradm-HOWTO/install.shtml# 
>>>>
>>>> CYRUS-INSTALL PS3. Running Debian testing, kernel 2.6.8 , i686
>>>>
>>>> Thank You all in advance,
>>>> Oliver
>>>>
>>>> ---
>>>> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
>>>> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
>>>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>>
>>>
>>
>>
>>
>>
>
>
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>
>


---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list