From: david Date: 2009-11-11T06:41:45+09:00 Subject: Re: Berkeley DB BDB Install on Windows On Nov 10, 11:25 am, david wrote: > On Nov 9, 2:37 pm, Luis Lavena wrote: > > > > > On Nov 9, 11:45 am, david wrote: > > > > I've been scripting in Ruby (and Rails) for about two years now, but > > > have never gotten into the internals of the module/gem side. I've > > > created a Ruby script using SQLite3 which works well for small data > > > sets but has a performance issue when dealing with a large amount of > > > data. I'm hoping to try theBerkeleyDB. > > > > To start, the environment is the following. > > > > Windows XP > > >BerkeleyDB4.8.24 > > > ruby  1.8.6-27 (http://rubyinstaller.org) > > > devkit-3.4.5r3-20090411 (http://rubyinstaller.org/addons.html) > > > bdb-0.6.5 > > > That will not work. > > > DevKit has been prepared to work with newer RubyInstaller releases, > > not the old One-Click ones. That is because One-Click has been > > compiled with VC6 and RubyInstaller with GCC, Ruby needs to use the > > same compiler. > > > Using the correct version of Ruby with the DevKit will allow you use -- > > with-db-dir option pointing to the root of the compiled BDB libraries > > (which seems you didn't extract or installed). > > > So, first: > > > * Get the proper Ruby and DevKit > > * Get BDB binaries and development dependencies > > * Unpack them in a directory you remember > > * Unpack the bdb extension > > * Proceed with extconf and the proper compilation options. > > > HTH, > > -- > > Luis Lavena > > Thanks  a lot Luis! Giving it a try. Will post results. > > Dave Still working on it. I have installed Ruby 1.9.1 using the ZIP as opposed to the one-click installer. I also pulled down all the DLL file and copied them to the RubyHome\bin. I was able to install all required gems using gem. I then moved on to unpacking the devkit and moving the devkitHome/bin files to RubyHome/bin and moving the devkitHome to the RubyHome (not sure if I need to something more here). Attempted to install the DBD extension. Different errors produces, but seems like progress. C:\bdb-0.6.5>ruby extconf.rb --with-db-dir=C:\db-4.8.24 --with-db- lib=C:\db-4.8.24\lib --with-db-include=C:\db-4.8.24\include extconf.rb: Entering directory `src' checking for db_version() in db-4.7.lib... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --srcdir=. --curdir --ruby=C:/ruby-1.9.1/bin/ruby --enable-unknown --disable-unknown --with-db-dir --with-db-include=${db-dir}/include --with-db-lib=${db-dir}/lib --enable-thread --disable-thread --with-db-uniquename --without-db-uniquename --with-db-pthread --without-db-pthread --with-db-version --without-db-version --with-db-4.7lib --without-db-4.7lib C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:419:in `try_link' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:527:in `try_func' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:723:in `block in have_library' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpone' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:248:in `open' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:248:in `open' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:270:in `postpone' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for' from C:/ruby-1.9.1/lib/ruby/1.9.1/mkmf.rb:718:in `have_library' from extconf.rb:75:in `block (3 levels) in
' from extconf.rb:72:in `each' from extconf.rb:72:in `block (2 levels) in
' from extconf.rb:71:in `loop' from extconf.rb:71:in `block in
' from extconf.rb:69:in `catch' from extconf.rb:69:in `
' extconf.rb: Leaving directory `src' C:\bdb-0.6.5> I'm not sure what it means "You have to install development tools first." as I have no idea how it works. I have a funny feeling the devkit is not plugged in properly. I will continue to research. Thanks, Dave