Subject: test failure for p5-DB_File with db4
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.sep.vier@onlinehome.de>
List: tech-pkg
Date: 09/25/2004 23:48:51
Hi,

building databases/p5-DB_File on Solaris works but during 'bmake test' I
see this:

  ===> Testing for p5-DB_File-1.806
  PERL_DL_NONLAZY=1 /home/users/k/kh/kheinz/SunOS.sun4u/pkg/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/db-btree....Can't load '/var/tmp/pkgsrc-obj/databases/p5-DB_File/work.sparc/DB_File-1.806/blib/arch/auto/DB_File/DB_File.so' for module DB_File: ld.so.1: /home/users/k/kh/kheinz/SunOS.sun4u/pkg/bin/perl: fatal: relocation error: file /var/tmp/pkgsrc-obj/databases/p5-DB_File/work.sparc/DB_File-1.806/blib/arch/auto/DB_File/DB_File.so: symbol db_version: referenced symbol not found at /home/users/k/kh/kheinz/SunOS.sun4u/pkg/lib/perl5/5.8.4/sparc-solaris/DynaLoader.pm line 230.  at t/db-btree.t line 34
  Compilation failed in require at t/db-btree.t line 34.
  BEGIN failed--compilation aborted at t/db-btree.t line 34.

The ELF header only contains the recorded library path but no dependence
on libperl.so or libdb4.so:

  $ dump -Lv DB_File.so
  ...
  [3]     RUNPATH         /home/users/k/kh/kheinz/SunOS.sun4u/pkg/lib
  [4]     RPATH           /home/users/k/kh/kheinz/SunOS.sun4u/pkg/lib
  ...


Strange enough this also happens when I use BDB_DEFAULT=db4 on NetBSD
1.6 (it works with db from the base system). The ELF headers are
different, though:

  $  objdump -p DB_File.so
  ...
  Dynamic Section:
  NEEDED      libperl.so
  RPATH       /usr/pkg/lib:/usr/pkg/lib/perl5/5.6.1/i386-netbsd/CORE

I think, there are two errors on Solaris and one on NetBSD:

  a) on Solaris there should be a reference to libperl.so and the
     corresponding path in RPATH/RUNPATH. '-lperl' is not mentioned in
     .work.log
  b) on Solaris and NetBSD libdb4.so is not referenced and then not found
     during run-time. No '-ldb4' to be found in .work.log


Pkgsrc was last updated 2004-09-19 for NetBSD and Solaris but it
happens with pkgsrc-2004Q3 from today on NetBSD as well. I could not
test with a more recent pkgsrc on Solaris yet.

Can anyone confirm this problem?

ciao
     Klaus