Problem with bdb

A

Andreas Schwarz

I have compiled bdb on Debian Woody, but when I try to use it I get the
message:

ruby: relocation error: /usr/local/lib/site_ruby/1.8/i386-linux/bdb.so:
undefined symbol: db_version

Any hints?

Thanks
Andreas
 
T

ts

A> ruby: relocation error: /usr/local/lib/site_ruby/1.8/i386-linux/bdb.so:
A> undefined symbol: db_version

What is the output given by extconf.rb ?

pigeon% ruby extconf.rb
extconf.rb: Entering directory `src'
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... yes
creating Makefile
extconf.rb: Leaving directory `src'
pigeon%

pigeon% make
[...]
pigeon%

pigeon% ruby -rsrc/bdb -e 'p BDB::VERSION'
"Sleepycat Software: Berkeley DB 4.0.14: (March 27, 2003)"
pigeon%



Guy Decoux
 
A

Andreas Schwarz

ts said:
A> ruby: relocation error: /usr/local/lib/site_ruby/1.8/i386-linux/bdb.so:
A> undefined symbol: db_version

What is the output given by extconf.rb ?

extconf.rb: Entering directory `src'
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... yes
creating Makefile
extconf.rb: Leaving directory `src'
 
T

ts

A> checking for db_version_4001() in -ldb-4.1... yes

how it's defined db_version in db.h

pigeon% grep db_version /usr/include/db.h
#define db_version db_version_4000
char *db_version __P((int *, int *, int *));
pigeon%


and the result of `nm' ?

pigeon% nm bdb.so | grep ' db'
U db_create_4000
U db_env_create_4000
U db_env_set_func_sleep_4000
U db_env_set_func_yield_4000
U db_strerror_4000
U db_version_4000
pigeon%




Guy Decoux
 
A

Andreas Schwarz

ts said:
A> checking for db_version_4001() in -ldb-4.1... yes

how it's defined db_version in db.h

pigeon% grep db_version /usr/include/db.h
#define db_version db_version_4000
char *db_version __P((int *, int *, int *));
pigeon%

char *db_version __P((int *, int *, int *));
and the result of `nm' ?

pigeon% nm bdb.so | grep ' db'

U db_appexit
U db_appinit
U db_jump_set
U db_open
0000b574 T db_strerror
U db_version
 
T

ts

A> U db_jump_set


This is db.h for Berkeley DB 2.x

Install the package libdb4.1-dev


Guy Decoux
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top