Archived

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

can not build ICE 3.2.1 on Redhat Linux

Hi:

I am somewhat familiar with Ice and am trying to update my previous test programs to run w/ ICE 3.2.1. As such I am trying to build ICE 3.2.1 on Linux using GCC 4.1.2. I first built "Berkeley DB 4.5.20 configured with --enable-cxx". I made sure that my LD_LIBRARY_PATH includes the directory where DB 4.5.20 libraries are. I still get:


../../lib/libFreeze.so: undefined reference to `Db::set_errcall(void (*)(char const*, char*))'
../../lib/libFreeze.so: undefined reference to `Db::set_bt_maxkey(unsigned int)'
../../lib/libFreeze.so: undefined reference to `Db::stat(void*, unsigned int)'

as part of build process:
making all in Freeze
make[2]: Entering directory `/export/lakehurst2/gthaker/incoming/Ice-3.2.1/src/Freeze'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/export/lakehurst2/gthaker/incoming/Ice-3.2.1/src/Freeze'
making all in FreezeScript
make[2]: Entering directory `/export/lakehurst2/gthaker/incoming/Ice-3.2.1/src/FreezeScript'
rm -f ../../bin/transformdb
c++ -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.2/lib -ftemplate-depth-128 -Wall -D_REENTRANT -fPIC -g -L../../lib -o ../../bin/transformdb TransformAnalyzer.o TransformVisitor.o Transformer.o transformdb.o Grammar.o Scanner.o AssignVisitor.o Data.o Error.o Functions.o Exception.o Parser.o Print.o Util.o -lSlice -lIceXML -lFreeze -lIce -lIceUtil -lpthread -ldb_cxx
../../lib/libFreeze.so: undefined reference to `Db::set_errcall(void (*)(char const*, char*))'
../../lib/libFreeze.so: undefined reference to `Db::set_bt_maxkey(unsigned int)'
../../lib/libFreeze.so: undefined reference to `Db::stat(void*, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/transformdb] Error 1
make[2]: Leaving directory `/export/lakehurst2/gthaker/incoming/Ice-3.2.1/src/FreezeScript'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/export/lakehurst2/gthaker/incoming/Ice-3.2.1/src'
make: *** [all] Error 1


I apologize if this too naive or a "RTFM" question, but any pointers will be most appreciated. Thanks.

Gautam

Comments

  • bernard
    bernard Jupiter, FL
    Hi Gautam,

    When building Ice with your own Berkeley DB build, you need to set the DB_HOME environment variable to point to your Berkeley DB installation directory.

    Here, it looks like the build is attempting to link with the libdb_cxx in your /usr/lib directory -- probably an older version of Berkeley DB.

    If you are using Red Hat Enterprise Linux 4 or 5, or SuSE Entreprise 10, you could also use the Berkeley DB 4.5 RPMs available from our download page (http://www.zeroc.com/download.html#linux_rpms). With these RPMs, you don't need to set any environment variable for the Ice build.

    Best regards,
    Bernard