p5-berkeleydb dyld problem
Hello, Is there anyone here successfully using p5-berkeleydb ? I have a linking problem and wanted to check it out before posting a ticket : $ /opt/local/bin/perl -wc -T postgrey dyld: lazy symbol binding failed: Symbol not found: _db_version Referenced from: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup dyld: Symbol not found: _db_version Referenced from: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup Trace/BPT trap Maybe a linking problem at build, but I am not sure as the fail is about a dynamic lookup. $otool -L /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle: /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.4.1) I've allready tried to reinstall this port...
Cyril Bellot a écrit :
Is there anyone here successfully using p5-berkeleydb ?
I have a linking problem and wanted to check it out before posting a ticket :
$ /opt/local/bin/perl -wc -T postgrey dyld: lazy symbol binding failed: Symbol not found: _db_version Referenced from: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup
dyld: Symbol not found: _db_version Referenced from: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup
Trace/BPT trap
Maybe a linking problem at build, but I am not sure as the fail is about a dynamic lookup.
$otool -L /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle: /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.4.1)
I've allready tried to reinstall this port...
This port only works with db3 variant. It fails to load appropriate libraries with db4 : the make test in the work port directories does not even pass : $ make test PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harne ss(0, 'blib/lib', 'blib/arch')" t/*.t t/btree........Can't load '/Users/cbellot/devel/ports/test/BerkeleyDB-0.26/blib/ arch/auto/BerkeleyDB/BerkeleyDB.bundle' for module BerkeleyDB: dlopen(/Users/cbe llot/devel/ports/test/BerkeleyDB-0.26/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundl e, 2): Symbol not found: _db_create Referenced from: /Users/cbellot/devel/ports/test/BerkeleyDB-0.26/blib/arch/aut o/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup at t/btree.t line 14 Compilation failed in require at t/btree.t line 14. BEGIN failed--compilation aborted at t/btree.t line 14. Undefined subroutine &BerkeleyDB::Term::close_everything called at /Users/cbello t/devel/ports/test/BerkeleyDB-0.26/blib/lib/BerkeleyDB.pm line 1649.
The p5-berkeleydb port was way out of date at 0.26. Looks like someone added db4 functionality to the portfile, but only version 0.27 and above support db4. I just updated it to 0.31. Please wait a few hours and do a selfupdate and that should work. Mark Cyril Bellot <cbellot@sky.fr> on Sunday, June 10, 2007 at 8:54 AM -0800 wrote:
Is there anyone here successfully using p5-berkeleydb ?
I have a linking problem and wanted to check it out before posting a ticket :
$ /opt/local/bin/perl -wc -T postgrey dyld: lazy symbol binding failed: Symbol not found: _db_version Referenced from:
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _db_version Referenced from:
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle
Expected in: dynamic lookup
Trace/BPT trap
Maybe a linking problem at build, but I am not sure as the fail is about a dynamic lookup.
$otool -L
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle:
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 92.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.4.1)
I've allready tried to reinstall this port...
This port only works with db3 variant. It fails to load appropriate libraries with db4 : the make test in the work port directories does not even pass :
$ make test PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harne ss(0, 'blib/lib', 'blib/arch')" t/*.t t/btree........Can't load '/Users/cbellot/devel/ports/test/BerkeleyDB-0.26/blib/ arch/auto/BerkeleyDB/BerkeleyDB.bundle' for module BerkeleyDB: dlopen(/Users/cbe llot/devel/ports/test/BerkeleyDB-0.26/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundl e, 2): Symbol not found: _db_create Referenced from: /Users/cbellot/devel/ports/test/BerkeleyDB-0.26/blib/arch/aut o/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup at t/btree.t line 14 Compilation failed in require at t/btree.t line 14. BEGIN failed--compilation aborted at t/btree.t line 14. Undefined subroutine &BerkeleyDB::Term::close_everything called at /Users/cbello t/devel/ports/test/BerkeleyDB-0.26/blib/lib/BerkeleyDB.pm line 1649
markd@macports.org a écrit :
The p5-berkeleydb port was way out of date at 0.26. Looks like someone added db4 functionality to the portfile, but only version 0.27 and above support db4. I just updated it to 0.31. Please wait a few hours and do a selfupdate and that should work.
The new port builds correctly but the make test is still lost with library location. I first thaught it was because of db44 installed too on my system, but it's the same without it (tested on another system). The bundle part of the port is build like this: LD_RUN_PATH="/opt/local/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc -L/opt/local/lib -bundle -undefined dynamic_lookup -L/usr/local/lib BerkeleyDB.o -o blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle \ -L/opt/local -ldb \ I corrected the portfile with: BERKELEYDB_LIB=${prefix}/lib But then it complains about db3 libraries which are present: BerkeleyDB needs compatible versions of libdb & db.h you have db.h version 4.3.29 and libdb version 3.3.11 I rebuilt the port with db3 uninstalled, I still get : dyld: lazy symbol binding failed: Symbol not found: _db_version Referenced from: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle Expected in: dynamic lookup I looks like a problem in the perl dyloader... Nb. db3 variant is still ok with the new port version.
Cyril Bellot a écrit :
The new port builds correctly but the make test is still lost with library location. I first thaught it was because of db44 installed too on my system, but it's the same without it (tested on another system).
I tried the opposite method, and making p5-berkeleydb depending on db44 instead of db4 : depends_lib-append port:db44 configure.env BERKELEYDB_INCLUDE=${prefix}/include/db44 \ BERKELEYDB_LIB=${prefix}/lib/db44 It works like this. I think this is because db4 does not provide a libdb.dylib link (on the opposite of db44) Creating manually the link (/opt/local/lib/libdb.dylib -> /opt/local/lib/libdb-4.3.dylib) and compiling again p5-berkeleydb solved the problem. I known db3 creates such a link. db44 (and db45...) create too in their own subdirectories /opt/local/lib/db44 . The case is different for db4 which puts its libraries right into /opt/local/lib. Things may have to be reviewed on db4 port; some other dependent ports may be broken too without this hack...
Cyril, I went to FreeBSD to see how they do it. http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/databases/p5-Berkeley... I think that method could be used to fix the portfile so it works with both versions of berkely db. If you are able to make a patch that would do it and attach it to the ticket that's be great. If not I'll try it later. Mark Cyril Bellot <cbellot@sky.fr> on Sunday, June 10, 2007 at 4:37 PM -0800 wrote:
The new port builds correctly but the make test is still lost with library location. I first thaught it was because of db44 installed too on my system, but it's the same without it (tested on another system).
I tried the opposite method, and making p5-berkeleydb depending on db44 instead of db4 :
depends_lib-append port:db44 configure.env BERKELEYDB_INCLUDE=${prefix}/include/db44 \ BERKELEYDB_LIB=${prefix}/lib/db44
It works like this.
I think this is because db4 does not provide a libdb.dylib link (on the opposite of db44)
Creating manually the link (/opt/local/lib/libdb.dylib -> /opt/local/lib/libdb-4.3.dylib) and compiling again p5-berkeleydb solved the problem.
I known db3 creates such a link. db44 (and db45...) create too in their own subdirectories /opt/local/lib/db44 . The case is different for db4 which puts its libraries right into /opt/local/lib.
Things may have to be reviewed on db4 port; some other dependent ports may be broken too without this hack...
markd@macports.org on Sunday, June 10, 2007 at 4:57 PM -0800 wrote:
I went to FreeBSD to see how they do it. http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/databases/p5-Berkeley...
I think that method could be used to fix the portfile so it works with both versions of berkely db. If you are able to make a patch that would do it and attach it to the ticket that's be great. If not I'll try it later.
I attached an untested portfile with a proposed fix for p5-berkeleydb to work with v 3, v4, and v44. Should the default for it be v4 or v44 now? If someone could test it that would be great. http://trac.macosforge.org/projects/macports/ticket/12102 Mark
markd@macports.org a écrit :
I attached an untested portfile with a proposed fix for p5-berkeleydb to work with v 3, v4, and v44. Should the default for it be v4 or v44 now? If someone could test it that would be great.
I confirm the new port with db44 default works fine for me : tested with postgrey.
participants (2)
-
Cyril Bellot
-
markd@macports.org