perl-5.6.1 DB_file support

Reini Urban rurban@sbox.tu-graz.ac.at
Sun Jan 7 18:26:00 GMT 2001


Reini Urban wrote to <cygwin@sources.redhat.com>
> in perl-5.6.1-TRIAL1 gdbm fails for me.
>   (Could not tie... on both read and write)
> having cygwin-1.1.7, cyggdbm.dll from gdbm-1.8.0-3

Charles Wilson wrote back:
>Does this error occur while perl is testing the ndbm emulation routines
>within gdbm? If so, then are you running on a FAT drive?

it was NTFS (win2k), it failed on textmounts.
on binmode it crashes only randomly. (quite seldom now). 

However, something new:
A minor required db-3.2.3f patch for cygwin

--- db-3.2.3f/os/os_tmpdir.c.orig	Tue Jul  4 21:30:16 2000
+++ db-3.2.3f/os/os_tmpdir.c	Sun Jan  7 21:58:30 2001
@@ -96,6 +96,9 @@
 	}
 #endif
 #ifdef _WIN32
+# ifndef _MAX_PATH
+#  define _MAX_PATH 260
+# endif
 	/* Get the path to the temporary directory. */
 	{int len;
 	 char temp[_MAX_PATH + 1];


And the DB_File patch for perl, tested with db-3.2.3f:
One could also copy the three db headers to /usr/include, but the 
installer leaves them in /usr/local/BerkeleyDB.3.2/include


2001-01-08 02:40:33 rurban
  * support latest BerkeleyDB.3.2 paths

--- perl-5.6.1-1/ext/DB_File/Makefile.PL~	Mon Oct 16 09:12:44 2000
+++ perl-5.6.1-1/ext/DB_File/Makefile.PL	Mon Jan  8 03:38:00 2001
@@ -10,14 +10,13 @@
 
 WriteMakefile(
 	NAME 		=> 'DB_File',
-	LIBS 		=> ["-L/usr/local/lib $LIB"],
+	LIBS 		=> ["-L/usr/local/lib -L/usr/local/BerkeleyDB.3.2/lib $LIB"],
         MAN3PODS        => {},         # Pods will be built by installman.
-	#INC		=> '-I/usr/local/include',
 	VERSION_FROM	=> 'DB_File.pm',
 	OBJECT		=> 'version$(OBJ_EXT) DB_File$(OBJ_EXT)',
 	XSPROTOARG	=> '-noprototypes',
 	DEFINE		=> $OS2 || "",
-	INC => ($^O eq "MacOS" ? "-i ::::db:include" : "")
+	INC => ($^O eq "MacOS" ? "-i ::::db:include" :
"-I/usr/local/BerkeleyDB.3.2/include")
 	);
 
 sub MY::postamble {
--- perl-5.6.1-1/ext/DB_File/hints/cygwin.pl~	Mon Jan  8 03:54:56 2001
+++ perl-5.6.1-1/ext/DB_File/hints/cygwin.pl	Mon Jan  8 03:51:02 2001
@@ -0,0 +1,3 @@
+# latest BerkeleyDB.3.2 from 
+$self->{LIBS} = ['-ldb -L/usr/local/lib -L/usr/local/BerkeleyDB.3.2/lib'];
+$self->{INC} => ["-I/usr/local/BerkeleyDB.3.2/include"];


make test now only fails at the chmod tests:

lib/anydbm...........      0 [main] perl 7624 handle_exceptions: Exception: 
STATUS_ACCESS_VIOLATION
   6593 [main] perl 7624 stackdump: Dumping stack trace to perl.exe.stackdump
FAILED at test 2

a second time:
lib/anydbm...FAILED at test 2
lib/attrs............ok
lib/autoloader.......ok
lib/b................ok
lib/basename.........ok
lib/bigfloat.........ok
lib/bigfltpm.........ok
lib/bigint...........ok
lib/bigintpm.........ok
lib/cgi-form.........ok
lib/cgi-function.....ok
lib/cgi-html.........ok
lib/cgi-pretty.......ok
lib/cgi-request......ok
lib/charnames........ok
lib/checktree........ok
lib/class-struct.....ok
lib/complex..........ok
lib/db-btree.........FAILED at test 20
lib/db-hash..........FAILED at test 16
lib/db-recno.........FAILED at test 18
...
lib/ftmp-tempfile....ok
lib/gdbm.............FAILED at test 2
... and so on

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=cygwin, osvers=1.1.6(0.3032), archname=cygwin
    uname='cygwin_nt-5.0 fifer 1.1.6(0.3032) 2000-11-21 21:00 i686 unknown '
    config_args='-de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=und
f
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO
-fno-strict-ali
sing',
    optimize='-O2',
    cppflags='-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing'
    ccversion='', gccversion='2.95.2-5 19991024 (cygwin experimental)',
gccosan
vers=''
    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',
lseeksiz
=4
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -s -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -lcrypt
    perllibs=-lcrypt
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl5_6_1.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
    cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Locally applied patches:
        v5.6.1-TRIAL1
  Built under cygwin
  Compiled at Jan  8 2001 03:11:19
  @INC:
    /usr/lib/perl5/5.6.1/cygwin
    /usr/lib/perl5/5.6.1
    /usr/lib/perl5/site_perl/5.6.1/cygwin
    /usr/lib/perl5/site_perl/5.6.1
    /usr/lib/perl5/site_perl
    .

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list