thank you for your quick reply. ts wrote: >>>>>>"N" == Nikolai Krot <fake_address / microsoft.com> writes: >>>>>> > > N> BDB::Hash.open(path_to_db, nil, BDB::RDONLY, 0644) > > N> I get the messages > > N> warning: defining BDB::Env.allocate is deprecated; use > N> use_define_alloc_func() > > ??? > > svg% ruby -vrbdb -e 'BDB::Hash.open("/tmp/aa", nil, BDB::RDONLY, 0644)' > ruby 1.8.1 (2003-12-25) [i686-linux] > svg% and this is what i get: ruby 1.8.0 (2002-12-24) [i686-linux] /usr/local/lib/ruby/site_ruby/1.8/i686-linux/bdb.so: warning: defining BDB::Env.allocate is deprecated; use rb_define_alloc_func() /usr/local/lib/ruby/site_ruby/1.8/i686-linux/bdb.so: warning: defining BDB::Common.allocate is deprecated; use rb_define_alloc_func() Again, the same two messages show up. > Do you have HAVE_RB_DEFINE_ALLOC_FUNC in intern.h (source of ruby) ? > > > svg% grep HAVE_RB_DEFINE_ALLOC_FUNC ~/ruby/ruby-1.8.1/*.h > /home/ts/ruby/ruby-1.8.1/intern.h:#define HAVE_RB_DEFINE_ALLOC_FUNC 1 > svg% > no, no such constant. I tried the following in bdb/src/Makefile CFLAGS = -fPIC -g -O2 -DHAVE_RB_DEFINE_ALLOC_FUNC and the compilation is ok, require 'bdb' is ok, but BDB::Hash.open(blah-blah-blah) is not ok, in particular, those two messages dont appear but the object that gets created is nil. > This is a version of bdb compiled with ruby 1.8 ? I guess so, as seen from the following messages produced in the process of bdb compilation gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux -I. -I/usr/local/BerkeleyDB.4.2/include -c common.c I used to have ruby 1.6 and its traces may still remain in my OS, but i hope they dont interfere. > > Guy Decoux > > > Nikolai Krot -- Bore, n.: A guy who wraps up a two-minute idea in a two-hour vocabulary. -- Walter Winchell