Subject: | BerkeleyDB module v 0.26 fails to set -lpthread |
Makefile.PL does not set -lpthread for a number of OS's that have libpthread. So the BerkeleyDB module compiles fine but upon make test, it will kick out errors like:
[doliov@ns1 BerkeleyDB-0.26]$ make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/btree........Can't load '/home/doliov/download/perl/modules/BerkeleyDB-0.26/blib/arch/auto/BerkeleyDB/BerkeleyDB.so' for module BerkeleyDB: /usr/local/BerkeleyDB.4.3/lib/libdb-4.3.so: undefined symbol: pthread_condattr_setpshared at /usr/local/lib/perl5/5.8.7/x86_64-linux/DynaLoader.pm line 230.
at t/btree.t line 14
I just edited up Makefile.pl to force inclusion of -lpthread in the definition of $LIBS and all was well.
I wouldn't distro my edit b/c I just did it quick and dirty and didn't do research on which OS's were likely to support pthreads and which one's weren't, but if you care to fix up that logic it will spare others loads of grief.
My uname -a shows:[doliov@ns1 BerkeleyDB-0.26]$ uname -a
Linux ns1 2.6.11-1.1226_FC4smp #1 SMP Mon Apr 4 21:07:48 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
but I suspect the make test error will happen to many linux users. I am using BerkeleyDB-4.3.28. Likewise, I'd expect this make test error for the earlier versions of BerkeleyDB v. 4.
Stephan Doliov
Message body not shown because it is not plain text.