Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 6830
Status: open
Priority: 0/
Queue: BerkeleyDB

People
Owner: pmqs [...] cpan.org
Requestors: admin [...] ekobiznes.pl
Cc: pmqs [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.25
Fixed in: (no value)



Subject: BerkeleyDB-0.25 - make test - failes
hello "make check" of BerkeleyDB-0.25 failes - my error looks like "Network Drive" from README but I'm not using any NFS or AFS and I'm building it in a local directory my system is: ========================================================== Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.20-2.48smp, archname=i386-linux-thread-multi uname='linux stripples.devel.redhat.com 2.4.20-2.48smp #1 smp thu feb 13 11:44:55 est 2003 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -march=i386 -mcpu=i686 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0 3.2.2-1)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: MAINT18379 Built under linux Compiled at Feb 18 2003 22:19:53 @INC: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 ========================================================== my error is: make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/btree........NOK 178Can't call method "txn_begin" on an undefined value at t/btree.t line 638. t/btree........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 28, 178-244 Failed 68/244 tests, 72.13% okay t/db-3.0.......NOK 2Can't call method "set_mutexlocks" on an undefined value at t/db-3.0.t line 39. t/db-3.0.......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 2-14 Failed 13/14 tests, 7.14% okay t/db-3.1.......ok t/db-3.2.......NOK 5Can't call method "set_flags" on an undefined value at t/db-3.2.t line 62. t/db-3.2.......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3, 5-6 Failed 3/6 tests, 50.00% okay t/db-3.3.......ok t/destroy......NOK 2Can't call method "txn_begin" on an undefined value at t/destroy.t line 33. t/destroy......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 2-15 Failed 14/15 tests, 6.67% okay t/encrypt......NOK 8Can't call method "db_put" on an undefined value at t/encrypt.t line 119. t/encrypt......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 7-80 Failed 74/80 tests, 7.50% okay t/env..........NOK 21Can't call method "txn_begin" on an undefined value at t/env.t line 104. t/env..........dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 12, 14, 21-50 Failed 32/50 tests, 36.00% okay t/examples.....ok t/examples3....ok t/filter.......ok t/hash.........NOK 147Can't call method "txn_begin" on an undefined value at t/hash.t line 444. t/hash.........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 29, 147-212 Failed 67/212 tests, 68.40% okay t/join.........NOK 8Can't call method "txn_begin" on an undefined value at t/join.t line 86. t/join.........dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 8-41 Failed 34/41 tests, 17.07% okay t/mldbm........skipped all skipped: MLDBM is not installed on this system. t/queue........NOK 169Can't call method "txn_begin" on an undefined value at t/queue.t line 514. t/queue........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 31, 169-200 Failed 33/200 tests, 83.50% okay t/recno........NOK 168Can't call method "txn_begin" on an undefined value at t/recno.t line 471. t/recno........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 28, 168-226 Failed 60/226 tests, 73.45% okay t/strict.......ok 4/44Use of uninitialized value in numeric eq (==) at t/strict.t line 40. t/strict.......NOK 12Can't call method "txn_begin" on an undefined value at t/strict.t line 80. t/strict.......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2, 6, 8, 10, 12-44 Failed 37/44 tests, 15.91% okay t/subdb........ok t/txn..........NOK 6Can't call method "txn_begin" on an undefined value at t/txn.t line 53. t/txn..........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-4, 6-58 Failed 56/58 tests, 3.45% okay t/unknown......ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/btree.t 255 65280 244 68 27.87% 28 178-244 t/db-3.0.t 2 512 14 13 92.86% 2-14 t/db-3.2.t 255 65280 6 3 50.00% 3 5-6 t/destroy.t 2 512 15 14 93.33% 2-15 t/encrypt.t 2 512 80 74 92.50% 7-80 t/env.t 2 512 50 32 64.00% 12 14 21-50 t/hash.t 255 65280 212 67 31.60% 29 147-212 t/join.t 2 512 41 34 82.93% 8-41 t/queue.t 255 65280 200 33 16.50% 31 169-200 t/recno.t 255 65280 226 60 26.55% 28 168-226 t/strict.t 255 65280 44 37 84.09% 2 6 8 10 12-44 t/txn.t 255 65280 58 56 96.55% 2-4 6-58 1 test skipped. Failed 12/20 test scripts, 40.00% okay. 491/1414 subtests failed, 65.28% okay. make: *** [test_dynamic] Error 29 thank for help regards Piotr
Piotr, sorry for the delay in getting back to you on this. Just back from holiday and am slowly working through my mail. Before I start digging can you confirm that you are still having the problem building my module? If you are still having problems, can you have a look at the troubleshooting section in the README file for my module and send me as much of the information requested. cheers Paul
hello Paul I still have the problem :( here's more information: 1. perl -V you see above 2. perl -MBerkeleyDB -e 'print qq{BerkeleyDB ver $BerkeleyDB::VERSION\n}' Show quoted text
> BerkeleyDB ver 0.25
3. perl -MBerkeleyDB -e 'print BerkeleyDB::DB_VERSION_STRING.qq{\n}' Show quoted text
> Sleepycat Software: Berkeley DB 4.0.14: (November 18, 2001)
4. make test errors you can see above Piotr :)
Can you run the script below in the BerkeleyDB-0.25 directory & send me the output please? use blib; use BerkeleyDB; my $home = './myhome'; mkdir $home ; die "No home\n" unless -d $home ; my $env = new BerkeleyDB::Env -Home => $home, -Flags => DB_CREATE|DB_INIT_TXN| DB_INIT_MPOOL|DB_INIT_LOCK or die "cannot create environment: $BerkeleyDB::Error" ; print "Contents of $home are:\n\n"; system "ls -l $home" ;
it returns error: cannot create environment: Invalid argument at ./test.pl line 14. means line: my $env = new BerkeleyDB::Env -Home => $home, (...) Piotr
Thanks Piotr. Here is another script to try use blib; use BerkeleyDB; my $home = '.'; my $env = new BerkeleyDB::Env -Flags => DB_CREATE ; if ($env) { print "Created environment ok\n" ; } else { print "$env -- cannot create environment: $BerkeleyDB::Error\n" if ! $env ; } print "Contents of $home are:\n\n"; system "ls -al $home" ; system "df -k $home" ;
here it is: -- cannot create environment: Invalid argument Contents of . are: total 1308 drwxr-xr-x 8 amavis 501 4096 Jul 21 11:14 . drwxr-xr-x 29 amavis users 8192 Jul 20 13:01 .. drwxr-xr-x 2 amavis 501 4096 Nov 1 2003 BerkeleyDB -rw-r--r-- 1 amavis users 0 Jul 2 12:47 BerkeleyDB.bs -rw-r--r-- 1 amavis users 176949 Jul 2 12:47 BerkeleyDB.c -rw-r--r-- 1 amavis users 583620 Jul 2 12:47 BerkeleyDB.o -rw-r--r-- 1 amavis 501 31910 Nov 1 2003 BerkeleyDB.pm -rw-r--r-- 1 amavis 501 50708 Jul 6 2003 BerkeleyDB.pod -rwxr-xr-x 1 amavis 501 44575 Jul 3 2003 BerkeleyDB.pod.P -rw-r--r-- 1 amavis 501 103173 Nov 1 2003 BerkeleyDB.xs drwxr-xr-x 5 amavis users 4096 Jul 2 12:47 blib -rwxr-xr-x 1 amavis 501 8891 Nov 1 2003 Changes -rw-r--r-- 1 amavis 501 1863 Sep 28 2003 config.in -rw-r--r-- 1 amavis 501 124165 Sep 27 2003 constants.h -rw-r--r-- 1 amavis 501 2564 Nov 1 2003 constants.xs -rwxr-xr-x 1 amavis 501 3063 Nov 1 2003 dbinfo drwxr-xr-x 2 amavis 501 4096 Nov 1 2003 hints -rw-r--r-- 1 amavis users 24125 Jul 2 12:47 Makefile -rw-r--r-- 1 amavis 501 2679 Aug 16 2003 Makefile.PL -rw-r--r-- 1 amavis 501 782 Sep 28 2003 MANIFEST -rw-r--r-- 1 amavis 501 300 Nov 1 2003 META.yml -rwxr-xr-x 1 amavis 501 24202 Sep 27 2003 mkconsts -rwxr-xr-x 1 amavis 501 3040 Aug 16 1999 mkpod drwxr-xr-x 2 amavis users 4096 Jul 21 08:26 myhome drwxr-xr-x 2 amavis 501 4096 Nov 1 2003 patches -rw-r--r-- 1 amavis users 0 Jul 2 12:47 pm_to_blib -rw-r--r-- 1 amavis 501 8773 Sep 27 2003 ppport.h -rwxr-xr-x 1 amavis 501 22702 Sep 28 2003 README -rw-r--r-- 1 amavis 501 5453 Sep 27 2003 scan drwxr-xr-x 2 amavis 501 4096 Nov 1 2003 t -rwxr--r-- 1 amavis users 345 Jul 21 11:14 test.pl -rw-r--r-- 1 amavis 501 1452 Dec 8 1999 Todo -rw-r--r-- 1 amavis 501 6748 Aug 16 2003 typemap
Thanks. That tells me that it isn't possible to create the simplest possible Berkeley DB environment at all. I need to see if this is caused by my Perl module or something else. Can you first run a "dk -k ." in the BerkeleyDB-0.25 directory please and send me the output? Below is a C equivalent of the last Perl script I sent you. Can you try building and running it please? This is how I build and I run it. $ gcc env.c -o env -ldb $ $ ./env Sleepycat Software: Berkeley DB 4.0.14: (November 18, 2001) env_create: ok env open: ok close env: ok If it doesn't compile, get back to me. cheers Paul #include <stdio.h> #include <errno.h> #include "db.h" DB_ENV * env ; int status ; int i ; char buffer[20] ; int Major, Minor, Patch ; char * version ; char * home = "./fred1" ; void ok(char * name, int status) { int i ; if (status) { printf("NOT OK %s: %s\n", name, db_strerror(status)) ; exit(1) ; } printf("%s: ok\n", name) ; } main() { version = db_version(&Major, &Minor, &Patch) ; printf("%s\n", version); sprintf(buffer, "rm -fr %s", home) ; system(buffer) ; mkdir(home, 0777) ; ok("env_create", db_env_create(&env, 0)) ; ok("env open", env->open(env, home, DB_CREATE,0666)) ; ok("close env", env->close(env, 0)) ; }
df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/cciss/c0d0p3 137908736 3243212 127660164 3% / ./env Sleepycat Software: Berkeley DB 4.1.25: (October 24, 2003) env_create: ok NOT OK env open: Invalid argument
[guest - Wed Jul 21 06:49:08 2004]: Show quoted text
> df -k . > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/cciss/c0d0p3 137908736 3243212 127660164 3% /
Never seen /dev/cciss before. Do you have a RAID drive? What can you tell me about the hard disk? Show quoted text
> > ./env > Sleepycat Software: Berkeley DB 4.1.25: (October 24, 2003) > env_create: ok > NOT OK env open: Invalid argument
Right. That means the problem isn't with the Perl module. Here is a variation on the last program. Hopefully it will tell us a bit more about why it doesn't want to work. #include <stdio.h> #include <errno.h> #include "db.h" DB_ENV * env ; int status ; int i ; char buffer[20] ; int Major, Minor, Patch ; char * version ; char * home = "./fred1" ; void ok(char * name, int status) { int i ; if (status) { printf("NOT OK %s: %s\n", name, db_strerror(status)) ; exit(1) ; } printf("%s: ok\n", name) ; } main() { version = db_version(&Major, &Minor, &Patch) ; printf("%s\n", version); sprintf(buffer, "rm -fr %s", home) ; system(buffer) ; mkdir(home, 0777) ; ok("env_create", db_env_create(&env, 0)) ; env->set_errfile(env, stdout) ; ok("env open", env->open(env, home, DB_CREATE , 0666)) ; ok("close env", env->close(env, 0)) ; }
yep, it is a RAID drive, what would you like to know? ./env2 Sleepycat Software: Berkeley DB 4.1.25: (October 24, 2003) env_create: ok Berkeley DB library configured to support only DB_PRIVATE environments NOT OK env open: Invalid argument
[guest - Wed Jul 21 07:59:30 2004]: Show quoted text
> yep, it is a RAID drive, what would you like to know?
Don't think we need to -- see below Show quoted text
> ./env2 > Sleepycat Software: Berkeley DB 4.1.25: (October 24, 2003) > env_create: ok > Berkeley DB library configured to support only DB_PRIVATE environments > NOT OK env open: Invalid argument
Aha! The "Berkeley DB library configured to support only DB_PRIVATE environments" message can only be generated by Berkeley DB if has been built in a very specific way. I did a quick yahoo search and found this link -- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91933 That seems to suggest that Redhat, at least, have been building Berkeley DB in a non-standard way. This means that if you want to use my module you are going to have to build your own copy of the Berkeley DB library first. The latest version of Berkeley DB is 4.2.52, available from http://www.sleepycat.com Paul
thank you for help :) I love RedHat... Piotr :)
No problem Piotr. I'm glad we finally got to the bottom of this issue. I've had a few reports over the past few months of build failures that matched yours. After reviewing the info I have about them, it turns out that all were running RedHat. I'm going to put a few words together about this issue for inclusion in the BerkeleyDB README file. If you do decide to build your own Berkeley DB library I would really appreciate a note to say how you got on (positive or negative). I'm assuming that building you own private copy of the Berkeley DB library will get around this problem, but would like positive confirmation. cheers Paul