From: Ralf Hildebrandt on
* damian lee <damianjllee(a)gmail.com>:
> My compiling platform is an old FC5 with full install
> I have found a /usr/lib/libdb-4.3.a file it should be the static linked
> version of libdb.

Yes, I would think so

> so I made a link "ln -s libdb-4.3.a libdb.a " makes me successful pass my
> last problem.
> but something new com up.
>
> I got a lot of errors like
>
> /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libdb.a(mut_pthread.o): In
> function `__db_pthread_mutex_destroy': undefined reference to
> `pthread_mutex_destroy'
>
> It seems my static linked version of libdb doesn't work.
>
> Any suggestions?

Do you need libdb? Maybe just using CBD will suffice?

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: Sahil Tandon on
On Fri, 2010-08-13 at 04:59:49 +0800, damian lee wrote:

> I got a lot of errors like
>
> /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libdb.a(mut_pthread.o): In
> function `__db_pthread_mutex_destroy': undefined reference to
> `pthread_mutex_destroy'
>
> It seems my static linked version of libdb doesn't work.
>
> Any suggestions?

From section 4 of the DB_README:

When building Postfix fails with:

undefined reference to `pthread_condattr_setpshared'
undefined reference to `pthread_mutexattr_destroy'
undefined reference to `pthread_mutexattr_init'
undefined reference to `pthread_mutex_trylock'

Add the "-lpthread" library to the "make makefiles" command.

% make makefiles .... AUXLIBS="... -lpthread"

More information is available at http://www.oracle.com/database/berkeley-db/.

--
Sahil Tandon <sahil(a)FreeBSD.org>