Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#12102 closed defect (fixed)

BUG: p5-berkeleydb-0.31 fails to load correct dylib

Reported by: cbellot@… Owned by: macports-tickets@…
Priority: High Milestone:
Component: ports Version: 1.4.40
Keywords: Cc: sal@…,cbellot@…,markd@…
Port:

Description

p5-berkeleydb is broken with default variant (db4).

$ /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

The port is ok with db3 variant.

Attachments (3)

Portfile (1.4 KB) - added by markd@… 17 years ago.
Portfile.diff (918 bytes) - added by markd@… 17 years ago.
Portfile.2.diff (1.3 KB) - added by markd@… 17 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 17 years ago by cbellot@…

It looks to be a db4 issue where libdb.dylib does not exist and is not available to programs trying to dynamicaly link with -ldb Either it finds a db3 link, either it does not find anyone.

comment:2 Changed 17 years ago by markd@…

Cc: sal@… markd@… added
Summary: p5-berkeleydb fails to load correct dylibBUG: p5-berkeleydb-0.31 fails to load correct dylib

Should db4 still be the default, or db44? Assuming db4 should still bethe default, here is my stab at a fix that adds a db44 variant also. Someone please test it.

Changed 17 years ago by markd@…

Attachment: Portfile added

Changed 17 years ago by markd@…

Attachment: Portfile.diff added

comment:3 Changed 17 years ago by cbellot@…

The DBNAME='-ldb-4' does not seem to be used during the ld command.

---> Configuring p5-berkeleydb DEBUG: Executing com.apple.configure (p5-berkeleydb) DEBUG: Environment: CXXFLAGS='-O2' CPPFLAGS='-I/opt/local/include' CFLAGS='-O2' BERKELEYDB_INCLUDE='/opt/local/include/db4' LDFLAGS='-L/opt/local/lib' DBNAME='-ldb-4' BERKELEYDB_LIB='/opt/local/lib' DEBUG: Assembled command: 'cd "/opt/local/var/db/dports/build/_data_Unix_darwinports_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_perl_p5-berkeleydb/work/BerkeleyDB-0.31" && /opt/local/bin/perl Makefile.PL INSTALLDIRS=vendor' Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -ldb Writing Makefile for BerkeleyDB ---> Building p5-berkeleydb with target all DEBUG: Executing com.apple.build (p5-berkeleydb) DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/db/dports/build/_data_Unix_darwinports_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_perl_p5-berkeleydb/work/BerkeleyDB-0.31" && make all' cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB) cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm /opt/local/bin/perl /opt/local/lib/perl5/5.8.8/ExtUtils/xsubpp -noprototypes -typemap /opt/local/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap BerkeleyDB.xs > BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c /usr/bin/gcc-4.0 -c -I/opt/local/include/db4 -I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include -O3 -DVERSION=\"0.31\" -DXS_VERSION=\"0.31\" "-I/opt/local/lib/perl5/5.8.8/darwin-2level/CORE" BerkeleyDB.c Running Mkbootstrap for BerkeleyDB () chmod 644 BerkeleyDB.bs rm -f blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle 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 \

\

/usr/bin/ld: warning -prebind has no effect with -bundle chmod 755 blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle cp BerkeleyDB.bs blib/arch/auto/BerkeleyDB/BerkeleyDB.bs chmod 644 blib/arch/auto/BerkeleyDB/BerkeleyDB.bs Manifying blib/man3/BerkeleyDB.3

comment:4 Changed 17 years ago by cbellot@…

With the db44 variants the port works perfectly.

comment:5 Changed 17 years ago by markd@…

You mean works without making links manually, correct? Also, I've discovered some issues that need straightening out. There is duplication between db4 (4.3) and db43. This is very confusing. It would be better to straighten that out first since the library names and locations are not consistent now. I've queried the list on that.

comment:6 Changed 17 years ago by markd@…

I think it is best to make db44 the default. Attaching the patch for that.

Changed 17 years ago by markd@…

Attachment: Portfile.2.diff added

comment:7 Changed 17 years ago by markd@…

Resolution: fixed
Status: newclosed

I committed a change so that db44 is the default variant and db43 is a variant. Closing.

comment:8 Changed 17 years ago by jmpp@…

Milestone: MacPorts 1.4Port Bugs

comment:9 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.