Berkeley DB BDB Install on Windows

Discussion in 'Ruby' started by david, Nov 9, 2009.

  1. david

    david Guest

    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 the Berkeley DB.

    To start, the environment is the following.

    Windows XP
    Berkeley DB 4.8.24
    ruby 1.8.6-27 (http://rubyinstaller.org)
    devkit-3.4.5r3-20090411 (http://rubyinstaller.org/addons.html)
    bdb-0.6.5

    When I execute the extconf.rb script I receive the below output. I'm
    assuming it is not able to locate the Berkeley libraries. I have added
    the the Berkeley_Install/bin and Berkeley_Install/lib to the PATH with
    no luck.

    Just wondering if anyone has seen this or might have some ideas for
    me?


    C:\bdb-0.6.5>dir
    Volume in drive C has no label.
    Volume Serial Number is CCDF-9304

    Directory of C:\bdb-0.6.5

    11/09/2009 08:39 AM <DIR> .
    11/09/2009 08:39 AM <DIR> ..
    02/15/2005 12:06 PM 4,715 bdb.html
    02/15/2005 12:06 PM 3,941 bdb.rd
    11/08/2009 09:08 PM <DIR> bdbxml1
    11/08/2009 09:08 PM <DIR> bdbxml2
    06/14/2008 11:23 AM 7,096 Changes
    11/08/2009 09:08 PM <DIR> docs
    11/08/2009 09:08 PM <DIR> examples
    04/26/2005 08:49 AM 1,762 extconf.rb
    11/09/2009 08:45 AM 1,710 Makefile
    06/26/2008 07:27 AM 1,350 README.en
    11/09/2009 08:45 AM <DIR> src
    11/08/2009 09:08 PM <DIR> tests
    11/08/2009 09:08 PM <DIR> tmp
    11/08/2009 09:08 PM <DIR> util
    6 File(s) 20,574 bytes
    10 Dir(s) 12,698,308,608 bytes free

    C:\bdb-0.6.5>ruby extconf.rb
    extconf.rb: Entering directory `src'
    checking for db_version() in db-4.7.lib... no
    checking for db_version_4007() in db-4.7.lib... no
    checking for db_version() in db47.lib... no
    checking for db_version_4007() in db47.lib... no
    checking for db_version() in db-4.6.lib... no
    checking for db_version_4006() in db-4.6.lib... no
    checking for db_version() in db46.lib... no
    checking for db_version_4006() in db46.lib... no
    checking for db_version() in db-4.5.lib... no
    checking for db_version_4005() in db-4.5.lib... no
    checking for db_version() in db45.lib... no
    checking for db_version_4005() in db45.lib... no
    checking for db_version() in db-4.4.lib... no
    checking for db_version_4004() in db-4.4.lib... no
    checking for db_version() in db44.lib... no
    checking for db_version_4004() in db44.lib... no
    checking for db_version() in db-4.3.lib... no
    checking for db_version_4003() in db-4.3.lib... no
    checking for db_version() in db43.lib... no
    checking for db_version_4003() in db43.lib... no
    checking for db_version() in db-4.2.lib... no
    checking for db_version_4002() in db-4.2.lib... no
    checking for db_version() in db42.lib... no
    checking for db_version_4002() in db42.lib... no
    checking for db_version() in db-4.1.lib... no
    checking for db_version_4001() in db-4.1.lib... no
    checking for db_version() in db41.lib... no
    checking for db_version_4001() in db41.lib... no
    checking for db_version() in db-4.0.lib... no
    checking for db_version_4000() in db-4.0.lib... no
    checking for db_version() in db-4.lib... no
    checking for db_version_4000() in db-4.lib... no
    checking for db_version() in db40.lib... no
    checking for db_version_4000() in db40.lib... no
    checking for db_version() in db4.lib... no
    checking for db_version_4000() in db4.lib... no
    checking for db_version() in db3.lib... no
    checking for db_version_3000() in db3.lib... no
    checking for db_version() in db2.lib... no
    checking for db_version_2000() in db2.lib... no
    checking for db_version() in db.lib... no
    Trying with -lpthread
    checking for db_version() in db-4.7.lib... no
    checking for db_version_4007() in db-4.7.lib... no
    checking for db_version() in db47.lib... no
    checking for db_version_4007() in db47.lib... no
    checking for db_version() in db-4.6.lib... no
    checking for db_version_4006() in db-4.6.lib... no
    checking for db_version() in db46.lib... no
    checking for db_version_4006() in db46.lib... no
    checking for db_version() in db-4.5.lib... no
    checking for db_version_4005() in db-4.5.lib... no
    checking for db_version() in db45.lib... no
    checking for db_version_4005() in db45.lib... no
    checking for db_version() in db-4.4.lib... no
    checking for db_version_4004() in db-4.4.lib... no
    checking for db_version() in db44.lib... no
    checking for db_version_4004() in db44.lib... no
    checking for db_version() in db-4.3.lib... no
    checking for db_version_4003() in db-4.3.lib... no
    checking for db_version() in db43.lib... no
    checking for db_version_4003() in db43.lib... no
    checking for db_version() in db-4.2.lib... no
    checking for db_version_4002() in db-4.2.lib... no
    checking for db_version() in db42.lib... no
    checking for db_version_4002() in db42.lib... no
    checking for db_version() in db-4.1.lib... no
    checking for db_version_4001() in db-4.1.lib... no
    checking for db_version() in db41.lib... no
    checking for db_version_4001() in db41.lib... no
    checking for db_version() in db-4.0.lib... no
    checking for db_version_4000() in db-4.0.lib... no
    checking for db_version() in db-4.lib... no
    checking for db_version_4000() in db-4.lib... no
    checking for db_version() in db40.lib... no
    checking for db_version_4000() in db40.lib... no
    checking for db_version() in db4.lib... no
    checking for db_version_4000() in db4.lib... no
    checking for db_version() in db3.lib... no
    checking for db_version_3000() in db3.lib... no
    checking for db_version() in db2.lib... no
    checking for db_version_2000() in db2.lib... no
    checking for db_version() in db.lib... no
    *** 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/bin/ruby
    --enable-unknown
    --disable-unknown
    --with-db-dir
    --without-db-dir
    --with-db-include
    --without-db-include=${db-dir}/include
    --with-db-lib
    --without-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
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db47lib
    --without-db47lib
    --with-db47lib
    --without-db47lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db46lib
    --without-db46lib
    --with-db46lib
    --without-db46lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db45lib
    --without-db45lib
    --with-db45lib
    --without-db45lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db44lib
    --without-db44lib
    --with-db44lib
    --without-db44lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db43lib
    --without-db43lib
    --with-db43lib
    --without-db43lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db42lib
    --without-db42lib
    --with-db42lib
    --without-db42lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db41lib
    --without-db41lib
    --with-db41lib
    --without-db41lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4lib
    --without-db-4lib
    --with-db-4lib
    --without-db-4lib
    --with-db40lib
    --without-db40lib
    --with-db40lib
    --without-db40lib
    --with-db4lib
    --without-db4lib
    --with-db4lib
    --without-db4lib
    --with-db3lib
    --without-db3lib
    --with-db3lib
    --without-db3lib
    --with-db2lib
    --without-db2lib
    --with-db2lib
    --without-db2lib
    --with-dblib
    --without-dblib
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db47lib
    --without-db47lib
    --with-db47lib
    --without-db47lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db46lib
    --without-db46lib
    --with-db46lib
    --without-db46lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db45lib
    --without-db45lib
    --with-db45lib
    --without-db45lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db44lib
    --without-db44lib
    --with-db44lib
    --without-db44lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db43lib
    --without-db43lib
    --with-db43lib
    --without-db43lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db42lib
    --without-db42lib
    --with-db42lib
    --without-db42lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db41lib
    --without-db41lib
    --with-db41lib
    --without-db41lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4lib
    --without-db-4lib
    --with-db-4lib
    --without-db-4lib
    --with-db40lib
    --without-db40lib
    --with-db40lib
    --without-db40lib
    --with-db4lib
    --without-db4lib
    --with-db4lib
    --without-db4lib
    --with-db3lib
    --without-db3lib
    --with-db3lib
    --without-db3lib
    --with-db2lib
    --without-db2lib
    --with-db2lib
    --without-db2lib
    --with-dblib
    --without-dblib
    extconf.rb:90: libdb not found (RuntimeError)
    from extconf.rb:69:in `catch'
    from extconf.rb:69
    extconf.rb: Leaving directory `src'

    C:\bdb-0.6.5>


    Thanks for your help and time,
    Dave
     
    david, Nov 9, 2009
    #1
    1. Advertising

  2. david

    Luis Lavena Guest

    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 the Berkeley DB.
    >
    > To start, the environment is the following.
    >
    > Windows XP
    > Berkeley DB 4.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
     
    Luis Lavena, Nov 9, 2009
    #2
    1. Advertising

  3. david

    david Guest

    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
     
    david, Nov 10, 2009
    #3
  4. david

    david Guest

    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 <main>'
    from extconf.rb:72:in `each'
    from extconf.rb:72:in `block (2 levels) in <main>'
    from extconf.rb:71:in `loop'
    from extconf.rb:71:in `block in <main>'
    from extconf.rb:69:in `catch'
    from extconf.rb:69:in `<main>'
    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
     
    david, Nov 10, 2009
    #4
  5. david

    Luis Lavena Guest

    On Nov 10, 6:38 pm, david <> wrote:
    > [...]
    >
    > 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.
    >


    Well, no, you will not reach progress because you're using VC6-build
    of Ruby instead of MinGW, please keep reading...

    > 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'
    > [...]
    >
    > 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.
    >


    You still are not following.

    You're using ZIp files, or One-Click Installer, which are compiled
    with VC6. Unless you have VC6 in your system, nothing will work.

    Please, install RubyInstaller package (RC1 is the latest stable one):

    http://rubyforge.org/frs/?group_id=167&release_id=41267

    After install Development Kit on top of it (use 7-Zip to unpack it)

    Then you will be able to compile the extension.

    The Zip package at Ruby-lang, as you noticed, is incomplete, there is
    a clear note in the download page about it:

    "Please note that some of the above binaries will require manual
    download and installation of additional components detailed on this
    page. Please ensure you’ve followed/performed these steps prior
    reporting a bug."

    Please refer to our FAQ page in the wiki for RubyInstaller:

    http://wiki.github.com/oneclick/rubyinstaller/faq

    --
    Luis Lavena
     
    Luis Lavena, Nov 10, 2009
    #5
  6. david

    david Guest

    On Nov 10, 5:19 pm, Luis Lavena <> wrote:
    > On Nov 10, 6:38 pm, david <> wrote:
    >
    > > [...]

    >
    > > 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.

    >
    > Well, no, you will not reach progress because you're using VC6-build
    > of Ruby instead of MinGW, please keep reading...
    >
    > > 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'
    > > [...]

    >
    > > 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.

    >
    > You still are not following.
    >
    > You're using ZIp files, or One-Click Installer, which are compiled
    > with VC6. Unless you have VC6 in your system, nothing will work.
    >
    > Please, install RubyInstaller package (RC1 is the latest stable one):
    >
    > http://rubyforge.org/frs/?group_id=167&release_id=41267
    >
    > After install Development Kit on top of it (use 7-Zip to unpack it)
    >
    > Then you will be able to compile the extension.
    >
    > The Zip package at Ruby-lang, as you noticed, is incomplete, there is
    > a clear note in the download page about it:
    >
    > "Please note that some of the above binaries will require manual
    > download and installation of additional components detailed on this
    > page. Please ensure you’ve followed/performed these steps prior
    > reporting a bug."
    >
    > Please refer to our FAQ page in the wiki for RubyInstaller:
    >
    > http://wiki.github.com/oneclick/rubyinstaller/faq
    >
    > --
    > Luis Lavena


    Thanks for your help Luis!

    I have now installed the correct Ruby installation and plugged in the
    development kit. Ruby is now...

    ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

    I have also downgraded Berkeley DB to 4.6.21 which is compatible with
    bdb-0.6.5.

    During the extconf.rb execution it takes a lot longer now (about 10
    minutes), as it seems to be searching for certain library files. Even
    with different combinations of the --with* parameters I have not been
    able to get the install to find the Berkeley DB files. The Berkeley DB
    files are as such...

    C:\db-4.6.21>dir
    Volume in drive C has no label.
    Volume Serial Number is CCDF-9304

    Directory of C:\db-4.6.21

    11/10/2009 10:34 PM <DIR> .
    11/10/2009 10:34 PM <DIR> ..
    11/09/2009 03:54 PM <DIR> bin
    10/03/2007 04:35 PM 882 dbvars.bat
    11/09/2009 03:56 PM <DIR> docs
    11/09/2009 03:56 PM <DIR> include
    11/09/2009 03:56 PM <DIR> installutil
    11/09/2009 03:56 PM <DIR> jar
    11/09/2009 03:56 PM <DIR> lib
    09/28/2007 01:55 AM 5,725 LICENSE.txt
    09/28/2007 01:55 AM 213 README.txt
    3 File(s) 6,820 bytes
    8 Dir(s) 17,880,039,424 bytes free

    C:\db-4.6.21>

    The lib directory contains the libdb46.lib and libdb46d.lib files. The
    bin directory contains libdb46.dll file. The include directory
    contains all the header files namely the db.h file.

    Sample execution of extconf.rb is as follows...

    C:\bdb-0.6.5>ruby extconf.rb --with-db-include=C:/db-4.6.21/include --
    with-db-lib=C:/db-4.6.21/lib
    extconf.rb: Entering directory `src'
    checking for db_version() in -ldb-4.7... no
    checking for db_version_4007() in -ldb-4.7... no
    checking for db_version() in -ldb47... no
    checking for db_version_4007() in -ldb47... no
    checking for db_version() in -ldb-4.6... no
    checking for db_version_4006() in -ldb-4.6... no
    checking for db_version() in -ldb46... no
    checking for db_version_4006() in -ldb46... no
    checking for db_version() in -ldb-4.5... no
    checking for db_version_4005() in -ldb-4.5... no
    checking for db_version() in -ldb45... no
    checking for db_version_4005() in -ldb45... no
    checking for db_version() in -ldb-4.4... no
    checking for db_version_4004() in -ldb-4.4... no
    checking for db_version() in -ldb44... no
    checking for db_version_4004() in -ldb44... no
    checking for db_version() in -ldb-4.3... no
    checking for db_version_4003() in -ldb-4.3... no
    checking for db_version() in -ldb43... no
    checking for db_version_4003() in -ldb43... no
    checking for db_version() in -ldb-4.2... no
    checking for db_version_4002() in -ldb-4.2... no
    checking for db_version() in -ldb42... no
    checking for db_version_4002() in -ldb42... no
    checking for db_version() in -ldb-4.1... no
    checking for db_version_4001() in -ldb-4.1... no
    checking for db_version() in -ldb41... no
    checking for db_version_4001() in -ldb41... no
    checking for db_version() in -ldb-4.0... no
    checking for db_version_4000() in -ldb-4.0... no
    checking for db_version() in -ldb-4... no
    checking for db_version_4000() in -ldb-4... no
    checking for db_version() in -ldb40... no
    checking for db_version_4000() in -ldb40... no
    checking for db_version() in -ldb4... no
    checking for db_version_4000() in -ldb4... no
    checking for db_version() in -ldb3... no
    checking for db_version_3000() in -ldb3... no
    checking for db_version() in -ldb2... no
    checking for db_version_2000() in -ldb2... no
    checking for db_version() in -ldb... no
    Trying with -lpthread
    checking for db_version() in -ldb-4.7... no
    checking for db_version_4007() in -ldb-4.7... no
    checking for db_version() in -ldb47... no
    checking for db_version_4007() in -ldb47... no
    checking for db_version() in -ldb-4.6... no
    checking for db_version_4006() in -ldb-4.6... no
    checking for db_version() in -ldb46... no
    checking for db_version_4006() in -ldb46... no
    checking for db_version() in -ldb-4.5... no
    checking for db_version_4005() in -ldb-4.5... no
    checking for db_version() in -ldb45... no
    checking for db_version_4005() in -ldb45... no
    checking for db_version() in -ldb-4.4... no
    checking for db_version_4004() in -ldb-4.4... no
    checking for db_version() in -ldb44... no
    checking for db_version_4004() in -ldb44... no
    checking for db_version() in -ldb-4.3... no
    checking for db_version_4003() in -ldb-4.3... no
    checking for db_version() in -ldb43... no
    checking for db_version_4003() in -ldb43... no
    checking for db_version() in -ldb-4.2... no
    checking for db_version_4002() in -ldb-4.2... no
    checking for db_version() in -ldb42... no
    checking for db_version_4002() in -ldb42... no
    checking for db_version() in -ldb-4.1... no
    checking for db_version_4001() in -ldb-4.1... no
    checking for db_version() in -ldb41... no
    checking for db_version_4001() in -ldb41... no
    checking for db_version() in -ldb-4.0... no
    checking for db_version_4000() in -ldb-4.0... no
    checking for db_version() in -ldb-4... no
    checking for db_version_4000() in -ldb-4... no
    checking for db_version() in -ldb40... no
    checking for db_version_4000() in -ldb40... no
    checking for db_version() in -ldb4... no
    checking for db_version_4000() in -ldb4... no
    checking for db_version() in -ldb3... no
    checking for db_version_3000() in -ldb3... no
    checking for db_version() in -ldb2... no
    checking for db_version_2000() in -ldb2... no
    checking for db_version() in -ldb... no
    *** 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
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/Ruby19/bin/ruby
    --enable-unknown
    --disable-unknown
    --with-db-dir
    --without-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
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db47lib
    --without-db47lib
    --with-db47lib
    --without-db47lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db46lib
    --without-db46lib
    --with-db46lib
    --without-db46lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db45lib
    --without-db45lib
    --with-db45lib
    --without-db45lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db44lib
    --without-db44lib
    --with-db44lib
    --without-db44lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db43lib
    --without-db43lib
    --with-db43lib
    --without-db43lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db42lib
    --without-db42lib
    --with-db42lib
    --without-db42lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db41lib
    --without-db41lib
    --with-db41lib
    --without-db41lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4lib
    --without-db-4lib
    --with-db-4lib
    --without-db-4lib
    --with-db40lib
    --without-db40lib
    --with-db40lib
    --without-db40lib
    --with-db4lib
    --without-db4lib
    --with-db4lib
    --without-db4lib
    --with-db3lib
    --without-db3lib
    --with-db3lib
    --without-db3lib
    --with-db2lib
    --without-db2lib
    --with-db2lib
    --without-db2lib
    --with-dblib
    --without-dblib
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db-4.7lib
    --without-db-4.7lib
    --with-db47lib
    --without-db47lib
    --with-db47lib
    --without-db47lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db-4.6lib
    --without-db-4.6lib
    --with-db46lib
    --without-db46lib
    --with-db46lib
    --without-db46lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db-4.5lib
    --without-db-4.5lib
    --with-db45lib
    --without-db45lib
    --with-db45lib
    --without-db45lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db-4.4lib
    --without-db-4.4lib
    --with-db44lib
    --without-db44lib
    --with-db44lib
    --without-db44lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db-4.3lib
    --without-db-4.3lib
    --with-db43lib
    --without-db43lib
    --with-db43lib
    --without-db43lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db-4.2lib
    --without-db-4.2lib
    --with-db42lib
    --without-db42lib
    --with-db42lib
    --without-db42lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db-4.1lib
    --without-db-4.1lib
    --with-db41lib
    --without-db41lib
    --with-db41lib
    --without-db41lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4.0lib
    --without-db-4.0lib
    --with-db-4lib
    --without-db-4lib
    --with-db-4lib
    --without-db-4lib
    --with-db40lib
    --without-db40lib
    --with-db40lib
    --without-db40lib
    --with-db4lib
    --without-db4lib
    --with-db4lib
    --without-db4lib
    --with-db3lib
    --without-db3lib
    --with-db3lib
    --without-db3lib
    --with-db2lib
    --without-db2lib
    --with-db2lib
    --without-db2lib
    --with-dblib
    --without-dblib
    extconf.rb:90:in `block in <main>': libdb not found (RuntimeError)
    from extconf.rb:69:in `catch'
    from extconf.rb:69:in `<main>'
    extconf.rb: Leaving directory `src'

    C:\bdb-0.6.5>


    Confusion sets in again.

    Thanks,
    Dave
     
    david, Nov 11, 2009
    #6
  7. david

    Luis Lavena Guest

    On Nov 11, 12:54 am, david <> wrote:
    > [...]
    >
    > I have now installed the correct Ruby installation and plugged in the
    > development kit. Ruby is now...
    >
    > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
    >
    > I have also downgraded Berkeley DB to 4.6.21 which is compatible with
    > bdb-0.6.5.
    >
    > During the extconf.rb execution it takes a lot longer now (about 10
    > minutes), as it seems to be searching for certain library files. Even
    > with different combinations of the --with* parameters I have not been
    > able to get the install to find the Berkeley DB files. The Berkeley DB
    > files are as such...


    Can you tell us the content of "lib"?

    It seems is looking for db-4.7, which should be "libdb-4.7.a" or
    "db-4.7.lib"
    (and similar for other versions)

    I'm not familiarized with the packaging of BDB so cannot say from
    here.

    Seems it offers too many combinations for BDB.

    Please include the pages/URLs where you got all the packages (bdb
    extension and bdb binaries) so I can replicate the same environment
    here.

    --
    Luis Lavena
     
    Luis Lavena, Nov 11, 2009
    #7
  8. david

    david Guest

    On Nov 11, 11:19 am, Luis Lavena <> wrote:
    > On Nov 11, 12:54 am, david <> wrote:
    >
    > > [...]

    >
    > > I have now installed the correct Ruby installation and plugged in the
    > > development kit. Ruby is now...

    >
    > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

    >
    > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with
    > > bdb-0.6.5.

    >
    > > During the extconf.rb execution it takes a lot longer now (about 10
    > > minutes), as it seems to be searching for certain library files. Even
    > > with different combinations of the --with* parameters I have not been
    > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB
    > > files are as such...

    >
    > Can you tell us the content of "lib"?
    >
    > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or
    > "db-4.7.lib"
    > (and similar for other versions)
    >
    > I'm not familiarized with the packaging of BDB so cannot say from
    > here.
    >
    > Seems it offers too many combinations for BDB.
    >
    > Please include the pages/URLs where you got all the packages (bdb
    > extension and bdb binaries) so I can replicate the same environment
    > here.
    >
    > --
    > Luis Lavena


    Thanks Luis,

    bdb-0.6.5
    http://rubyforge.org/projects/bdb/

    Berkeley DB 4.6.21.msi Windows installer
    http://www.oracle.com/technology/software/products/berkeley-db/db/index.html

    The BerkeleyDB/lib is as follows.

    C:\db-4.6.21\lib>dir
    Volume in drive C has no label.
    Volume Serial Number is CCDF-9304

    Directory of C:\db-4.6.21\lib

    11/09/2009 03:56 PM <DIR> .
    11/09/2009 03:56 PM <DIR> ..
    10/03/2007 04:20 PM 172,934 libdb46.lib
    10/03/2007 04:17 PM 173,720 libdb46d.lib
    11/09/2009 03:56 PM <DIR> perl
    2 File(s) 346,654 bytes
    3 Dir(s) 17,745,936,384 bytes free

    C:\db-4.6.21\lib>

    Yes, it seems the file match is not correct.

    Thanks again,
    Dave
     
    david, Nov 11, 2009
    #8
  9. david

    david Guest

    On Nov 11, 3:36 pm, david <> wrote:
    > On Nov 11, 11:19 am, Luis Lavena <> wrote:
    >
    >
    >
    > > On Nov 11, 12:54 am, david <> wrote:

    >
    > > > [...]

    >
    > > > I have now installed the correct Ruby installation and plugged in the
    > > > development kit. Ruby is now...

    >
    > > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

    >
    > > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with
    > > > bdb-0.6.5.

    >
    > > > During the extconf.rb execution it takes a lot longer now (about 10
    > > > minutes), as it seems to be searching for certain library files. Even
    > > > with different combinations of the --with* parameters I have not been
    > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB
    > > > files are as such...

    >
    > > Can you tell us the content of "lib"?

    >
    > > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or
    > > "db-4.7.lib"
    > > (and similar for other versions)

    >
    > > I'm not familiarized with the packaging of BDB so cannot say from
    > > here.

    >
    > > Seems it offers too many combinations for BDB.

    >
    > > Please include the pages/URLs where you got all the packages (bdb
    > > extension and bdb binaries) so I can replicate the same environment
    > > here.

    >
    > > --
    > > Luis Lavena

    >
    > Thanks Luis,
    >
    > bdb-0.6.5http://rubyforge.org/projects/bdb/
    >
    > Berkeley DB 4.6.21.msi Windows installerhttp://www.oracle.com/technology/software/products/berkeley-db/db/ind...
    >
    > The BerkeleyDB/lib is as follows.
    >
    > C:\db-4.6.21\lib>dir
    >  Volume in drive C has no label.
    >  Volume Serial Number is CCDF-9304
    >
    >  Directory of C:\db-4.6.21\lib
    >
    > 11/09/2009  03:56 PM    <DIR>          .
    > 11/09/2009  03:56 PM    <DIR>          ..
    > 10/03/2007  04:20 PM           172,934 libdb46.lib
    > 10/03/2007  04:17 PM           173,720 libdb46d.lib
    > 11/09/2009  03:56 PM    <DIR>          perl
    >                2 File(s)        346,654 bytes
    >                3 Dir(s)  17,745,936,384 bytes free
    >
    > C:\db-4.6.21\lib>
    >
    > Yes, it seems the file match is not correct.
    >
    > Thanks again,
    > Dave


    I have even tried Matt Bauer's BDB with no luck.
    http://github.com/mattbauer/bdb/blob/master/README.textile

    I'm currently testing Berkeley DB 4.7.25.
    http://www.oracle.com/technology/software/products/berkeley-db/db/index.html

    Thanks,
    Dave
     
    david, Nov 11, 2009
    #9
  10. david

    Luis Lavena Guest

    Luis Lavena, Nov 12, 2009
    #10
  11. david

    Luis Lavena Guest

    On Nov 11, 5:36 pm, david <> wrote:
    > On Nov 11, 11:19 am, Luis Lavena <> wrote:
    >
    >
    >
    >
    >
    > > On Nov 11, 12:54 am, david <> wrote:

    >
    > > > [...]

    >
    > > > I have now installed the correct Ruby installation and plugged in the
    > > > development kit. Ruby is now...

    >
    > > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

    >
    > > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with
    > > > bdb-0.6.5.

    >
    > > > During the extconf.rb execution it takes a lot longer now (about 10
    > > > minutes), as it seems to be searching for certain library files. Even
    > > > with different combinations of the --with* parameters I have not been
    > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB
    > > > files are as such...

    >
    > > Can you tell us the content of "lib"?

    >
    > > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or
    > > "db-4.7.lib"
    > > (and similar for other versions)

    >
    > > I'm not familiarized with the packaging of BDB so cannot say from
    > > here.

    >
    > > Seems it offers too many combinations for BDB.

    >
    > > Please include the pages/URLs where you got all the packages (bdb
    > > extension and bdb binaries) so I can replicate the same environment
    > > here.

    >
    > > --
    > > Luis Lavena

    >
    > Thanks Luis,
    >
    > bdb-0.6.5http://rubyforge.org/projects/bdb/
    >
    > Berkeley DB 4.6.21.msi Windows installerhttp://www.oracle.com/technology/software/products/berkeley-db/db/ind...
    >
    > The BerkeleyDB/lib is as follows.
    >
    > C:\db-4.6.21\lib>dir
    >  Volume in drive C has no label.
    >  Volume Serial Number is CCDF-9304
    >
    >  Directory of C:\db-4.6.21\lib
    >
    > 11/09/2009  03:56 PM    <DIR>          .
    > 11/09/2009  03:56 PM    <DIR>          ..
    > 10/03/2007  04:20 PM           172,934 libdb46.lib
    > 10/03/2007  04:17 PM           173,720 libdb46d.lib
    > 11/09/2009  03:56 PM    <DIR>          perl
    >                2 File(s)        346,654 bytes
    >                3 Dir(s)  17,745,936,384 bytes free
    >
    > C:\db-4.6.21\lib>
    >
    > Yes, it seems the file match is not correct.
    >


    All the following was with Ruby 1.8.6, see the bottom of this email
    for explanation...

    Ok, tried installing BDB 4.6.21 MSI package, also making it available
    using --with-db-include and --with-db-lib, no luck

    Tried renaming libdb46.lib to libdb46.a (which is the convention
    expected by GCC), no luck there neither.

    Next try was mattbauer's bdb, no luck.

    This time, renamed to libdb-4.6.a, since this bdb extension is looking
    for "db-4.6"...

    No luck still...

    After peeking in the mkmf.log, found this:

    have_library: checking for db_version() in -ldb-4.6...
    -------------------- no

    "gcc -o conftest -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-
    mingw32/lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g -
    O2 conftest.c -L. -LC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-
    mingw32/lib -LC:/bdb-4.6.21/lib -L. -lmsvcrt-ruby18-static -
    ldb-4.6 -lshell32 -lws2_32 "
    In file included from conftest.c:3:
    C:/bdb-4.6.21/include/db.h:131: error: conflicting types for 'ssize_t'
    C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../
    include/sys/types.h:104: error: previous declaration of 'ssize_t' was
    here
    checked program was:
    /* begin */
    1: #include <windows.h>
    2: #include <winsock.h>
    3: #include <db.h>
    4:
    5: /*top*/
    6: int main() { return 0; }
    7: int t() { void ((*volatile p)()); p = (void ((*)()))db_version;
    return 0; }
    /* end */

    -------------

    Which lead me to think the issue is inside bdb itself...

    commented out line 131, since MinGW already defines ssize_t
    properly... the output was this:

    C:\Users\Luis\Projects\oss\bdb\ext>ruby extconf.rb --with-db-dir=C:/
    bdb-4.6.21
    checking for db_version() in -ldb-4.7... no
    checking for db_version() in -ldb-4.6... yes
    Writing bdb_aux._c (defines), this takes a while
    don't know how to handle DB_COMPACT_FLAGS \, guessing UINT

    wrote 409 defines
    creating Makefile

    --------------

    Now, let's try to make it:

    C:\Users\Luis\Projects\oss\bdb\ext>make
    gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
    lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g -O2 -c
    bdb.c
    bdb.c: In function `db_open':
    bdb.c:241: error: too many arguments to function `raise'

    Stall there, since I'm not familiar with the code or what is trying to
    achieve.

    So: looks like both extensions needs some love to work properly under
    GCC and Windows.

    I would suggest poke the authors, point them to RubyInstaller Google
    Group [1] to get some assistance in the process and use tools like
    rake-compiler [2] to compile the extension.

    Definitely that will not solve your situation right away but will help
    everybody in the future.

    Apologizes couldn't get this working for you.

    NOTE about version used: Used Ruby 1.8.6 since most likely, and after
    try and error, none of the extensions seems to like Ruby 1.9.1
    (mattbauer used a deprecated constant and failed with 'raise' issues
    described above).

    [1] http://groups.google.com/group/rubyinstaller
    [2] http://github.com/luislavena/rake-compiler
     
    Luis Lavena, Nov 12, 2009
    #11
  12. david

    david Guest

    On Nov 11, 10:05 pm, Luis Lavena <> wrote:
    > On Nov 11, 5:36 pm, david <> wrote:
    >
    >
    >
    > > On Nov 11, 11:19 am, Luis Lavena <> wrote:

    >
    > > > On Nov 11, 12:54 am, david <> wrote:

    >
    > > > > [...]

    >
    > > > > I have now installed the correct Ruby installation and plugged in the
    > > > > development kit. Ruby is now...

    >
    > > > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

    >
    > > > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with
    > > > > bdb-0.6.5.

    >
    > > > > During the extconf.rb execution it takes a lot longer now (about 10
    > > > > minutes), as it seems to be searching for certain library files. Even
    > > > > with different combinations of the --with* parameters I have not been
    > > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB
    > > > > files are as such...

    >
    > > > Can you tell us the content of "lib"?

    >
    > > > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or
    > > > "db-4.7.lib"
    > > > (and similar for other versions)

    >
    > > > I'm not familiarized with the packaging of BDB so cannot say from
    > > > here.

    >
    > > > Seems it offers too many combinations for BDB.

    >
    > > > Please include the pages/URLs where you got all the packages (bdb
    > > > extension and bdb binaries) so I can replicate the same environment
    > > > here.

    >
    > > > --
    > > > Luis Lavena

    >
    > > Thanks Luis,

    >
    > > bdb-0.6.5http://rubyforge.org/projects/bdb/

    >
    > >BerkeleyDB4.6.21.msi Windows installerhttp://www.oracle.com/technology/software/products/berkeley-db/db/ind...

    >
    > > The BerkeleyDB/lib is as follows.

    >
    > > C:\db-4.6.21\lib>dir
    > >  Volume in drive C has no label.
    > >  Volume Serial Number is CCDF-9304

    >
    > >  Directory of C:\db-4.6.21\lib

    >
    > > 11/09/2009  03:56 PM    <DIR>          .
    > > 11/09/2009  03:56 PM    <DIR>          ..
    > > 10/03/2007  04:20 PM           172,934 libdb46.lib
    > > 10/03/2007  04:17 PM           173,720 libdb46d.lib
    > > 11/09/2009  03:56 PM    <DIR>          perl
    > >                2 File(s)        346,654 bytes
    > >                3 Dir(s)  17,745,936,384 bytes free

    >
    > > C:\db-4.6.21\lib>

    >
    > > Yes, it seems the file match is not correct.

    >
    > All the following was with Ruby 1.8.6, see the bottom of this email
    > for explanation...
    >
    > Ok, tried installing BDB 4.6.21 MSI package, also making it available
    > using --with-db-include and --with-db-lib, no luck
    >
    > Tried renaming libdb46.lib to libdb46.a (which is the convention
    > expected by GCC), no luck there neither.
    >
    > Next try was mattbauer's bdb, no luck.
    >
    > This time, renamed to libdb-4.6.a, since this bdb extension is looking
    > for "db-4.6"...
    >
    > No luck still...
    >
    > After peeking in the mkmf.log, found this:
    >
    > have_library: checking for db_version() in -ldb-4.6...
    > -------------------- no
    >
    > "gcc -o conftest -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-
    > mingw32/lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include   -g -
    > O2  conftest.c  -L. -LC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-
    > mingw32/lib -LC:/bdb-4.6.21/lib -L.      -lmsvcrt-ruby18-static -
    > ldb-4.6  -lshell32 -lws2_32  "
    > In file included from conftest.c:3:
    > C:/bdb-4.6.21/include/db.h:131: error: conflicting types for 'ssize_t'
    > C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../
    > include/sys/types.h:104: error: previous declaration of 'ssize_t' was
    > here
    > checked program was:
    > /* begin */
    > 1: #include <windows.h>
    > 2: #include <winsock.h>
    > 3: #include <db.h>
    > 4:
    > 5: /*top*/
    > 6: int main() { return 0; }
    > 7: int t() { void ((*volatile p)()); p = (void ((*)()))db_version;
    > return 0; }
    > /* end */
    >
    > -------------
    >
    > Which lead me to think the issue is inside bdb itself...
    >
    > commented out line 131, since MinGW already defines ssize_t
    > properly... the output was this:
    >
    > C:\Users\Luis\Projects\oss\bdb\ext>ruby extconf.rb --with-db-dir=C:/
    > bdb-4.6.21
    > checking for db_version() in -ldb-4.7... no
    > checking for db_version() in -ldb-4.6... yes
    > Writing bdb_aux._c (defines), this takes a while
    > don't know how to handle DB_COMPACT_FLAGS \, guessing UINT
    >
    > wrote 409 defines
    > creating Makefile
    >
    > --------------
    >
    > Now, let's try to make it:
    >
    > C:\Users\Luis\Projects\oss\bdb\ext>make
    > gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
    > lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include   -g -O2   -c
    > bdb.c
    > bdb.c: In function `db_open':
    > bdb.c:241: error: too many arguments to function `raise'
    >
    > Stall there, since I'm not familiar with the code or what is trying to
    > achieve.
    >
    > So: looks like both extensions needs some love to work properly under
    > GCC and Windows.
    >
    > I would suggest poke the authors, point them to RubyInstaller Google
    > Group [1] to get some assistance in the process and use tools like
    > rake-compiler [2] to compile the extension.
    >
    > Definitely that will not solve your situation right away but will help
    > everybody in the future.
    >
    > Apologizes couldn't get this working for you.
    >
    > NOTE about version used: Used Ruby 1.8.6 since most likely, and after
    > try and error, none of the extensions seems to like Ruby 1.9.1
    > (mattbauer used a deprecated constant and failed with 'raise' issues
    > described above).
    >
    > [1]http://groups.google.com/group/rubyinstaller
    > [2]http://github.com/luislavena/rake-compiler


    Thanks for all your effort Luis! I will reach out to the authors.

    Dave
     
    david, Nov 12, 2009
    #12
  13. david wrote:
    > On Nov 11, 10:05�pm, Luis Lavena <> wrote:
    >> > > > I have now installed the correct Ruby installation and plugged in the
    >> > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB

    >>
    >>
    >> > �Directory of C:\db-4.6.21\lib

    >>
    >>
    >> -------------------- no
    >> here
    >> /* end */
    >> checking for db_version() in -ldb-4.7... no
    >>
    >> So: looks like both extensions needs some love to work properly under
    >>
    >> NOTE about version used: Used Ruby 1.8.6 since most likely, and after
    >> try and error, none of the extensions seems to like Ruby 1.9.1
    >> (mattbauer used a deprecated constant and failed with 'raise' issues
    >> described above).
    >>
    >> [1]http://groups.google.com/group/rubyinstaller
    >> [2]http://github.com/luislavena/rake-compiler

    >
    > Thanks for all your effort Luis! I will reach out to the authors.
    >
    > Dave


    Hi Dave and Luis!

    I have exactly the same problem!!! ... Is there any solution yet??? ...
    Because I have to use ruby-wordnet, and there must be a bdb!!!

    Regards
    --
    Posted via http://www.ruby-forum.com/.
     
    Horst Schneider, Mar 7, 2010
    #13
  14. david

    Luis Lavena Guest

    On Mar 7, 7:48 pm, Horst Schneider <> wrote:
    > david wrote:
    >
    > Hi Dave and Luis!
    >
    > I have exactly the same problem!!! ... Is there any solution yet??? ...
    > Because I have to use ruby-wordnet, and there must be a bdb!!!
    >


    As I said before, please reach out to the author, I'm not familiarized
    with the code or current status of this project and its support under
    Windows.

    --
    Luis Lavena
     
    Luis Lavena, Mar 7, 2010
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gregory Burd

    [ANNOUNCE] Berkeley DB XML 2.0.7

    Gregory Burd, Dec 14, 2004, in forum: XML
    Replies:
    0
    Views:
    397
    Gregory Burd
    Dec 14, 2004
  2. Harald Massa
    Replies:
    0
    Views:
    352
    Harald Massa
    Sep 16, 2003
  3. Nikolai Krot

    ruby + Berkeley DB: BDB::Fatal

    Nikolai Krot, May 15, 2005, in forum: Ruby
    Replies:
    0
    Views:
    124
    Nikolai Krot
    May 15, 2005
  4. Replies:
    1
    Views:
    147
  5. Researcher

    Perl running on Windows and Berkeley DB

    Researcher, Mar 2, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    247
    Malcolm Dew-Jones
    Mar 3, 2004
Loading...

Share This Page