Bdb + BerkeleyDB + ruby 1.6.7 + Cygwin

Hello all,

I mostly use Ruby on Linux, but now I have to port
some of my apps to Windows. Some of the use bdb.

I compiled Ruby 1.6.7 for Cygwin, then compiled
Berkeley DB 4.1.24 from sources with --prefix=/usr/local ,
now I take bdb 0.3.1, run extconf:

$ ruby extconf.rb
extconf.rb: Entering directory src' checking for db_version() in -ldb-4... yes creating Makefile extconf.rb: Leaving directorysrc’

and run make

$ make
make[1]: Entering directory /usr/src/bdb-0.3.1/src' gcc -DUSEIMPORTLIB -g -O2 -I. -I/usr/local/lib/ruby/1.6/i686-cygwin -I. -I/usr/local/incl ude -c -o bdb.o bdb.c bdb.c: In functionbdb_test_error’:
bdb.c:89: DB_INCOMPLETE' undeclared (first use in this function) bdb.c:89: (Each undeclared identifier is reported only once bdb.c:89: for each function it appears in.) bdb.c: In functionInit_bdb’:
bdb.c:194: DB_CHECKPOINT' undeclared (first use in this function) bdb.c:210:DB_CURLSN’ undeclared (first use in this function)
make[1]: *** [bdb.o] Error 1
make[1]: Leaving directory `/usr/src/bdb-0.3.1/src’
make: *** [all] Error 2

Are there any suggestions/ideas ?

Yuri Leikind

Berkeley DB 4.1.24 from sources with --prefix=/usr/local ,
now I take bdb 0.3.1, run extconf:

You must use bdb-0.3.5 with 4.1.24

    94 #ifdef DB_INCOMPLETE
    95 case DB_INCOMPLETE:
    96 comm = 0;
    97 return comm;
    98 break;
    99 #endif

pigeon% tail -4 Changes
* INT2NUM(DB_RMW) rather than INT2FIX()
       (Thanks Darrin Thompson <darrint@progeny.com>)

* adapted for 4.1.24 (DB_CURLSN is removed)
pigeon%

Guy Decoux

ts decoux@moulon.inra.fr wrote in message news:200209261241.g8QCf2Z00825@moulon.inra.fr

Berkeley DB 4.1.24 from sources with --prefix=/usr/local ,
now I take bdb 0.3.1, run extconf:

You must use bdb-0.3.5 with 4.1.24

Thank you, sorry for not reading the docs carefully ;-(

···

__
Yuri Leikind