This forum has been archived. Please start a new discussion on GitHub.

Problems compiling against db-4.2.52

I am trying to compile Ice-1.2.0 (under Redhat 9). INSTALL.LINUX says I need
to build db-4.1, but I couldn't find this release at the sleepycat site so I downloaded
db.4.2.52. I built db using with "export LD_ASSUME_KERNEL=2.4.1" and installed
it into /usr/local/db. I get the following link errors while compiling icebox:

c++ -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT -L../../lib -o ../../bin/icebox ServiceManagerI.o Server.o -lIceBox -lFreeze -lIce -lIceUtil -lpthread -L/usr/local/db/lib -ldb_cxx
../../lib/ undefined reference to `DbEnv::set_rep_limit(unsigned, unsigned)'
../../lib/ undefined reference to `DbEnv::get_errpfx(char const**)'
../../lib/ undefined reference to `DbEnv::set_rep_transport(int, int (*)(DbEnv*, Dbt const*, Dbt const*, DbLsn const*, int, unsigned))'
../../lib/ undefined reference to `DbEnv::dbrename(DbTxn*, char const*, char const*, char const*, unsigned)'
../../lib/ undefined reference to `Db::get_env()'

I don't see a libdb_cxx in /usr/local/db/lib. Have I done something wrong building db or
has this library been removed in 4.2.52? Perhaps someone can point me at a download
for db-4.1?

Bruce Fountain


  • Hi Bruce,

    not sure what's going on there exactly -- I haven't tried with 4.2 yet. But, from the errors you are getting, I suspect that the Berkeley DB API has changed. Until we get around to porting to the latest version, you can pick up 4.1.25 at That version is known to work.


  • Damn. I just built it again from db-4.1.25 and I got the same error. There is still no
    libdb_cxx.a in /usr/local/db/lib. I built db as per the INSTALL.LINUX instructions
    for RH9, but without the --enable-java option. Am I missing something obvious?
  • marc
    marc Florida
    Did you run configure with --enable-cxx? Have a look at:
  • Originally posted by marc
    Did you run configure with --enable-cxx?

    Umm.... No. In my defense I will point out that INSTALL.LINUX
    doesn't mention --enable-cxx, and I assumed that it would build
    the c++ libraries by default. And it was late. And the dog ate my
  • bernard
    bernard Jupiter, FL
    Yes, that's an unfortunate bug in INSTALL.LINUX.

    See for more details. It will be fixed in the next release.