installing bdb-0.6.5 in ubuntu

Discussion in 'Ruby' started by Donald Nakar, Nov 11, 2009.

  1. Donald Nakar

    Donald Nakar Guest

    Hello to everyone,

    I'm trying to install bdb-0.6.5 on my Ubuntu machine. I was able to
    install it using the following commands:

    ruby extconf.rb --with-db-dir=/usr/local/berkeleydb
    --with-db-lib=/usr/local/berkeleydb/lib
    --with-db-include=/usr/local/berkeleydb/include

    make

    make install

    But when I try to use it I always get the following error

    /usr/local/lib/site_ruby/1.8/i486-linux/bdb.so: (NotImplementedError)
    BDB needs compatible versions of libdb & db.h
    you have db.h version 4.8.24 and libdb version 4.7.25

    The BerkeleyDB I'm currently using is indeed version 4.8.24 and the lib
    inside is version 4.8, so now I'm not sure why it's seeing libdb 4.7.25.
    After trying to check the logs when running extconf.rb I saw this line:

    extconf.rb: Entering directory `src'
    checking for db_version() in -ldb-4.7... yes
    checking for rb_frame_this_func() in ruby.h... yes
    checking for rb_block_proc() in ruby.h... yes
    checking for rb_io_stdio_file() in ruby.h... no
    checking for rb_block_call() in ruby.h... yes
    checking for Array#insert... yes
    checking for Array#values_at... yes
    checking for rb_io_t in ruby.h,rubyio.h... yes
    checking for DB_AFTER in db.h...yes
    checking for DB_AGGRESSIVE in db.h...yes
    checking for DB_APPEND in db.h...yes
    checking for DB_ARCH_ABS in db.h...yes

    it's seeing a different version even if I explicitly pointed it to the
    correct Berkeleydb, removing the --with-db-lib= and --with-db-include=
    and just leaving the --with-db-dir=/usr/local/berkeleydb doesn't help.

    Anyone that can help me with this?

    Regards,
    Donald
    --
    Posted via http://www.ruby-forum.com/.
    Donald Nakar, Nov 11, 2009
    #1
    1. Advertising

  2. Your post is about a year old, but let me add to this thread instead of
    starting another:

    Well, at least yours installed! Mine does the following:

    Building native extensions. This could take a while...
    ERROR: Error installing bdb:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
    checking for db_version() in -ldb-4.8... yes
    Writing bdb_aux._c (defines), this takes a while
    don't know how to handle DB_DEGREE_2 DB_READ_COMMITTED, guessing UINT
    don't know how to handle DB_DIRTY_READ DB_READ_UNCOMMITTED, guessing
    UINT

    wrote 432 defines
    creating Makefile

    make
    cc -I. -I/usr/include/ruby-1.9.1/x86_64-linux
    -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.
    -I/usr/local/BerkeleyDB.4.8/include -fPIC -fno-strict-aliasing -g -g
    -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o bdb.o -c bdb.c
    In file included from bdb.c:8:
    /bdb.h:19:21: error: version.h: No such file or directory
    bdb.c: In function =E2=80=98db_open=E2=80=99:
    bdb.c:242: warning: implicit declaration of function =E2=80=98raise=E2=80=
    =99
    bdb.c:233: warning: unused variable =E2=80=98len=E2=80=99
    bdb.c: In function =E2=80=98db_close=E2=80=99:
    bdb.c:501: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:511: warning: format =E2=80=98%x=E2=80=99 expects type =E2=80=98uns=
    igned int=E2=80=99, but
    argument 5 has type =E2=80=98struct t_dbh *=E2=80=99
    bdb.c:519: warning: format =E2=80=98%x=E2=80=99 expects type =E2=80=98uns=
    igned int=E2=80=99, but
    argument 5 has type =E2=80=98VALUE=E2=80=99
    bdb.c: In function =E2=80=98db_pget=E2=80=99:
    bdb.c:657: warning: unused variable =E2=80=98str=E2=80=99
    bdb.c: In function =E2=80=98db_join=E2=80=99:
    bdb.c:752: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:753: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:754: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98ptr=E2=80=99
    bdb.c:754: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98ptr=E2=80=99
    bdb.c: In function =E2=80=98db_remove=E2=80=99:
    bdb.c:893: warning: unused variable =E2=80=98logical_db=E2=80=99
    bdb.c: In function =E2=80=98db_rename=E2=80=99:
    bdb.c:925: warning: unused variable =E2=80=98logical_db=E2=80=99
    bdb.c:924: warning: unused variable =E2=80=98disk_file=E2=80=99
    bdb.c: In function =E2=80=98db_truncate=E2=80=99:
    bdb.c:981: warning: unused variable =E2=80=98result=E2=80=99
    bdb.c: In function =E2=80=98db_del=E2=80=99:
    bdb.c:1065: warning: unused variable =E2=80=98str=E2=80=99
    bdb.c: In function =E2=80=98assoc_rescue=E2=80=99:
    bdb.c:1118: warning: format not a string literal and no format arguments
    bdb.c: In function =E2=80=98assoc_callback=E2=80=99:
    bdb.c:1153: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1157: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98ptr=E2=80=99
    bdb.c:1160: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1166: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98ptr=E2=80=99
    bdb.c:1125: warning: unused variable =E2=80=98proc=E2=80=99
    bdb.c: In function =E2=80=98db_associate=E2=80=99:
    bdb.c:1193: warning: unused variable =E2=80=98fdp=E2=80=99
    bdb.c: In function =E2=80=98bt_compare_callback=E2=80=99:
    bdb.c:1249: warning: unused variable =E2=80=98proc=E2=80=99
    bdb.c: In function =E2=80=98db_cursor=E2=80=99:
    bdb.c:1316: warning: unused variable =E2=80=98dbc=E2=80=99
    bdb.c: In function =E2=80=98env_close=E2=80=99:
    bdb.c:1674: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1676: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1677: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1680: warning: format =E2=80=98%x=E2=80=99 expects type =E2=80=98un=
    signed int=E2=80=99, but
    argument 5 has type =E2=80=98VALUE=E2=80=99
    bdb.c:1685: error: =E2=80=98struct RArray=E2=80=99 has no member named =E2=
    =80=98len=E2=80=99
    bdb.c:1695: warning: format =E2=80=98%x=E2=80=99 expects type =E2=80=98un=
    signed int=E2=80=99, but
    argument 5 has type =E2=80=98struct t_envh *=E2=80=99
    bdb.c: In function =E2=80=98env_get_cachesize=E2=80=99:
    bdb.c:1776: warning: unused variable =E2=80=98ln=E2=80=99
    bdb.c: In function =E2=80=98db_stat=E2=80=99:
    bdb.c:2058: warning: enumeration value =E2=80=98DB_UNKNOWN=E2=80=99 not h=
    andled in
    switch
    bdb.c: In function =E2=80=98env_report_stderr=E2=80=99:
    bdb.c:2569: warning: unused variable =E2=80=98rv=E2=80=99
    bdb.c:2568: warning: unused variable =E2=80=98max=E2=80=99
    bdb.c: In function =E2=80=98txn_finish=E2=80=99:
    bdb.c:2956: warning: format =E2=80=98%x=E2=80=99 expects type =E2=80=98un=
    signed int=E2=80=99, but
    argument 5 has type =E2=80=98struct t_txnh *=E2=80=99
    make: *** [bdb.o] Error 1
    -------------------------------------------------------------------------=
    -

    And this is after a lot googling, etc. My Berkeley DB installation is
    working fine, as proven by my perl bdb module. So, it has to be
    something to do with bdb not working with ruby 1.9.1 ... any help is
    welcome!

    -- =

    Posted via http://www.ruby-forum.com/.=
    Ritwik Banerjee, Oct 29, 2010
    #2
    1. Advertising

  3. unsubscribe

    On 10/29/10, Ritwik Banerjee <> wrote:
    > Your post is about a year old, but let me add to this thread instead of
    > starting another:
    >
    > Well, at least yours installed! Mine does the following:
    >
    > Building native extensions. This could take a while...
    > ERROR: Error installing bdb:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.9.1 extconf.rb
    > checking for db_version() in -ldb-4.8... yes
    > Writing bdb_aux._c (defines), this takes a while
    > don't know how to handle DB_DEGREE_2 DB_READ_COMMITTED, guessing UINT
    > don't know how to handle DB_DIRTY_READ DB_READ_UNCOMMITTED, guessing
    > UINT
    >
    > wrote 432 defines
    > creating Makefile
    >
    > make
    > cc -I. -I/usr/include/ruby-1.9.1/x86_64-linux
    > -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.
    > -I/usr/local/BerkeleyDB.4.8/include -fPIC -fno-strict-aliasing -g -g
    > -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o bdb.o -c bdb.c
    > In file included from bdb.c:8:
    > ./bdb.h:19:21: error: version.h: No such file or directory
    > bdb.c: In function =91db_open=92:
    > bdb.c:242: warning: implicit declaration of function =91raise=92
    > bdb.c:233: warning: unused variable =91len=92
    > bdb.c: In function =91db_close=92:
    > bdb.c:501: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:511: warning: format =91%x=92 expects type =91unsigned int=92, but
    > argument 5 has type =91struct t_dbh *=92
    > bdb.c:519: warning: format =91%x=92 expects type =91unsigned int=92, but
    > argument 5 has type =91VALUE=92
    > bdb.c: In function =91db_pget=92:
    > bdb.c:657: warning: unused variable =91str=92
    > bdb.c: In function =91db_join=92:
    > bdb.c:752: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:753: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:754: error: =91struct RArray=92 has no member named =91ptr=92
    > bdb.c:754: error: =91struct RArray=92 has no member named =91ptr=92
    > bdb.c: In function =91db_remove=92:
    > bdb.c:893: warning: unused variable =91logical_db=92
    > bdb.c: In function =91db_rename=92:
    > bdb.c:925: warning: unused variable =91logical_db=92
    > bdb.c:924: warning: unused variable =91disk_file=92
    > bdb.c: In function =91db_truncate=92:
    > bdb.c:981: warning: unused variable =91result=92
    > bdb.c: In function =91db_del=92:
    > bdb.c:1065: warning: unused variable =91str=92
    > bdb.c: In function =91assoc_rescue=92:
    > bdb.c:1118: warning: format not a string literal and no format arguments
    > bdb.c: In function =91assoc_callback=92:
    > bdb.c:1153: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1157: error: =91struct RArray=92 has no member named =91ptr=92
    > bdb.c:1160: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1166: error: =91struct RArray=92 has no member named =91ptr=92
    > bdb.c:1125: warning: unused variable =91proc=92
    > bdb.c: In function =91db_associate=92:
    > bdb.c:1193: warning: unused variable =91fdp=92
    > bdb.c: In function =91bt_compare_callback=92:
    > bdb.c:1249: warning: unused variable =91proc=92
    > bdb.c: In function =91db_cursor=92:
    > bdb.c:1316: warning: unused variable =91dbc=92
    > bdb.c: In function =91env_close=92:
    > bdb.c:1674: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1676: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1677: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1680: warning: format =91%x=92 expects type =91unsigned int=92, but
    > argument 5 has type =91VALUE=92
    > bdb.c:1685: error: =91struct RArray=92 has no member named =91len=92
    > bdb.c:1695: warning: format =91%x=92 expects type =91unsigned int=92, but
    > argument 5 has type =91struct t_envh *=92
    > bdb.c: In function =91env_get_cachesize=92:
    > bdb.c:1776: warning: unused variable =91ln=92
    > bdb.c: In function =91db_stat=92:
    > bdb.c:2058: warning: enumeration value =91DB_UNKNOWN=92 not handled in
    > switch
    > bdb.c: In function =91env_report_stderr=92:
    > bdb.c:2569: warning: unused variable =91rv=92
    > bdb.c:2568: warning: unused variable =91max=92
    > bdb.c: In function =91txn_finish=92:
    > bdb.c:2956: warning: format =91%x=92 expects type =91unsigned int=92, but
    > argument 5 has type =91struct t_txnh *=92
    > make: *** [bdb.o] Error 1
    > -------------------------------------------------------------------------=

    -
    >
    > And this is after a lot googling, etc. My Berkeley DB installation is
    > working fine, as proven by my perl bdb module. So, it has to be
    > something to do with bdb not working with ruby 1.9.1 ... any help is
    > welcome!
    >
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    pranjal kothawade, Oct 30, 2010
    #3
    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. Ahn Ki-yung

    ANN: BDB++ 0.99b released

    Ahn Ki-yung, May 6, 2004, in forum: C++
    Replies:
    1
    Views:
    610
    Volker Lukas
    May 6, 2004
  2. Ahn Ki-yung

    ANN: BDB++ 1.0 release

    Ahn Ki-yung, Jan 26, 2005, in forum: C++
    Replies:
    0
    Views:
    327
    Ahn Ki-yung
    Jan 26, 2005
  3. Ahn Ki-yung

    ANN: BDB++ 1.1 release

    Ahn Ki-yung, Apr 5, 2005, in forum: C++
    Replies:
    0
    Views:
    342
    Ahn Ki-yung
    Apr 5, 2005
  4. Emiliano Heyns

    Installer for BDB 4.1.25/BDBXML 1.1.0

    Emiliano Heyns, Oct 9, 2003, in forum: Python
    Replies:
    2
    Views:
    322
    Emiliano
    Oct 16, 2003
  5. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    452
    SPE - Stani's Python Editor
    Apr 29, 2008
Loading...

Share This Page