Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 49474
Status: resolved
Priority: 0/
Queue: BerkeleyDB

People
Owner: Nobody in particular
Requestors: csjewell [...] cpan.org
Cc:
AdminCc:

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



Subject: Would like to include this in October 2009 Strawberry, but it ALMOST builds...
I get an error during the "dmake" stage on 5.10.1: C:\strawberry\cpan\build\BerkeleyDB-0.39-pS82LZ>dmake 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 C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -noprototypes -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap BerkeleyDB.xs > BerkeleyDB.xsc && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- BerkeleyDB.xsc BerkeleyDB.c gcc -c -I/usr/local/BerkeleyDB/include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.39\" -DXS_VERSION=\"0.39\" "-IC:\strawberry\perl\lib\CORE" BerkeleyDB.c BerkeleyDB.xs:5226:53: macro "PerlLIO_close" passed 2 arguments, but takes just 1 BerkeleyDB.xs: In function `XS_BerkeleyDB__Sequence_close': BerkeleyDB.xs:5226: warning: assignment makes integer from pointer without a cast BerkeleyDB.xs:5261:40: macro "PerlLIO_close" passed 2 arguments, but takes just 1 dmake: Error code 129, while making 'BerkeleyDB.o' C:\strawberry\cpan\build\BerkeleyDB-0.39-pS82LZ>perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='Win32 strawberryperl 5.10.0.7.beta_2 #1 42 i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=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 =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseek size=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\li b"' libpth=C:\strawberry\c\lib libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lw inmm -lversion -lodbc32 -lodbccp32 libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\st rawberry\c\lib"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO Built under MSWin32 Compiled at Sep 7 2009 10:07:32 %ENV: PERL5_CPANPLUS_IS_RUNNING="1864" PERL5_CPAN_IS_RUNNING="1864" @INC: C:/strawberry/perl/lib C:/strawberry/perl/site/lib . C:\strawberry\cpan\build\BerkeleyDB-0.39-pS82LZ>perl -MExtUtils::ParseXS -e "print $ExtUtils::ParseXS::VERSION" 2.2005 Is there anything else you need, Paul? [If you're wondering, DB_File builds, tests, and installs just fine.] --Curtis
Hi, I have already solved similar issue with other module. The problem is a collision with perl macro close() - this happens when compiling with -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS (this is exactly the case on Win32). To solve it you need to use more parenthesis - see the enclosed patch. However even with this patch the following test fails: t/sequence.t ..... 1/13 # : library build did not include support for sequences # Failed test (t/sequence.t at line 33) # The object isn't defined Can't call method "set_cachesize" on an undefined value at t/sequence.t line 35. # Looks like you planned 13 tests but only ran 3. # Looks like your test died just after 3. t/sequence.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 11/13 subtests We are using DB-4.7.25 (more or less standard build for windows/mingw), does it mean that our library is missing something? -- kmx
diff -r -u BerkeleyDB-0.39.orig/BerkeleyDB.xs BerkeleyDB-0.39/BerkeleyDB.xs --- BerkeleyDB-0.39.orig/BerkeleyDB.xs 2009-06-04 00:50:40.000000000 +0200 +++ BerkeleyDB-0.39/BerkeleyDB.xs 2009-09-07 08:01:11.078125000 +0200 @@ -5223,7 +5223,7 @@ RETVAL = 0; if (seq->active) { -- seq->db->open_sequences; - RETVAL = seq->seq->close(seq->seq, flags); + RETVAL = (seq->seq->close)(seq->seq, flags); } seq->active = FALSE; #endif @@ -5258,7 +5258,7 @@ CODE: #ifdef AT_LEAST_DB_4_3 if (seq->active) - seq->seq->close(seq->seq, 0); + (seq->seq->close)(seq->seq, 0); Safefree(seq); #endif
Hi, I have looked into DB-4.7.25 sources and found out the following notice in ./build_windows/db.h ############ /* * Sequences are only available on machines with 64-bit integral types. */ typedef int db_seq_t; ############ So on Win32 platform the sequence support is obviously not build. -- kmx
On Mon Sep 07 02:17:43 2009, KMX wrote: Show quoted text
> Hi, > > I have already solved similar issue with other module. The problem is a > collision with perl macro close() - this happens when compiling with > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS (this is exactly the case on > Win32). > > To solve it you need to use more parenthesis - see the enclosed patch.
Enclosed pathch is fine - included in my development copy. Paul
On Mon Sep 07 03:18:42 2009, KMX wrote: Show quoted text
> Hi, > > I have looked into DB-4.7.25 sources and found out the following notice > in ./build_windows/db.h > > ############ > /* > * Sequences are only available on machines with 64-bit integral types. > */ > typedef int db_seq_t; > ############ > > So on Win32 platform the sequence support is obviously not build.
I need to dig into this to see if that is the issue. Curtis - do you get this error as well afer applying the patch? Paul
Hi Paul, I have analysed the issue with sequence support on Win32 deeper and found out that the problem was with some broken configure macros when building DB library on Win32/mingw. So problem is on strawberry perl side - we have to rebuild DB library. I have tested "the new build" with the little patch above and BekeleyDB module builds fine and all tests PASS. Unfortunately it is too late to include the new DB library in Strawberry October2009 release (we are currently in RC1 phase); anyway we are gonna fix it in January2010 release. It would be nice to have a new BerkeleyDB version released with the small patch above before the end of this year. -- kmx
Finally got around to uploading this fix to CPAN (in version 0.40)

Paul