Re: [Exim] Compilation problem with Exim 4.31 and BerkeleyDB

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Meadors
Date:  
À: Bo-Lina teknisk support
CC: Exim
Sujet: Re: [Exim] Compilation problem with Exim 4.31 and BerkeleyDB
On Thu, 2004-04-01 at 10:08 +0200, Bo-Lina teknisk support wrote:

> Ok.
>
> Now I have " CFLAGS=-lpthread " added to Local/Makefile.
> Now I get this error message :
>
> gcc -c -lpthread -I/usr/local/BerkeleyDB.4.1/include -o exim_dbmbuild.o
> exim_dbmbuild.c
> gcc: -lpthread: linker input file unused because linking not done
> <-- what does this mean?


Looks like it is adding the flag, but not in the right place...

> gcc -o exim_dbmbuild exim_dbmbuild.o \
> -lnsl -lcrypt /usr/local/BerkeleyDB.4.1/lib/libdb.a
> /usr/local/BerkeleyDB.4.1/lib/libdb.a(mut_pthread.o)(.text+0x91): In
> function `__db_pthread_mutex_init':
> : undefined reference to `pthread_mutexattr_destroy'
> /usr/local/BerkeleyDB.4.1/lib/libdb.a(mut_pthread.o)(.text+0x14d): In
> function `__db_pthread_mutex_init':
> : undefined reference to `pthread_condattr_setpshared'
> /usr/local/BerkeleyDB.4.1/lib/libdb.a(mut_pthread.o)(.text+0x15f): In
> function `__db_pthread_mutex_init':
> : undefined reference to `pthread_mutexattr_init'
> /usr/local/BerkeleyDB.4.1/lib/libdb.a(mut_pthread.o)(.text+0x183): In
> function `__db_pthread_mutex_init':
> : undefined reference to `pthread_mutexattr_setpshared'
> /usr/local/BerkeleyDB.4.1/lib/libdb.a(mut_pthread.o)(.text+0x1e4): In
> function `__db_pthread_mutex_lock':
> : undefined reference to `pthread_mutex_trylock'
> collect2: ld returned 1 exit status
> make[1]: *** [exim_dbmbuild] Error 1
> make[1]: Leaving directory `/usr/src/ATMAIL/exim-4.31/build-Linux-i386'
> make: *** [go] Error 2


...see here, these gcc lines don't have the flag anymore.


Now that I'm at work, I can see how I got it to build. Turns out that I
didn't just adjust the CFLAGS, I must have done that first, but it
didn't work, I didn't remember that. But I found what I did, I ended up
editing the "OS/Makefile-Linux" file, and appending the -lpthread to the
"DBMLIB = -ldb" line, so it becomes "DBMLIB = -ldb -lpthread".

I also just built 4.31 myself to be sure. This really should work
now. :)

--
Chris