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

Link error on Solaris

Hi all,
I'm trying to build Ice-2.1.2 on Sun :
home/qalbcas=> uname -a
SunOS mamas2o 5.8 Generic_117350-14 sun4u sparc SUNW,Sun-Fire-V240

whith gcc:
home/qalbcas=> gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: ../configure --prefix=/home/ipu01/local/
Thread model: posix
gcc version 4.0.1

I first build the third-party sources and then try to build ICE, and I found this link error:

g++ -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT -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 -lexpat
Undefined first referenced
symbol in file
Db::join(Dbc**, Dbc**, unsigned int)../../lib/
Db::err(int, char const*, ...) ../../lib/
Db::set_bt_prefix(unsigned int (*)(__db*, __db_dbt const*, __db_dbt const*))../../lib/
Db::remove(char const*, char const*, unsigned int)../../lib/
Db::get_re_delim(int*) ../../lib/
DbException::get_errno() const ../../lib/
Db::set_h_hash(unsigned int (*)(__db*, void const*, unsigned int))../../lib/
DbEnv::~DbEnv() transformdb.o
DbEnv::DbEnv(unsigned int) transformdb.o
Db::upgrade(char const*, unsigned int)../../lib/
Db::put(DbTxn*, Dbt*, Dbt*, unsigned int)../../lib/
Db::get(DbTxn*, Dbt*, Dbt*, unsigned int)../../lib/
Db::get_env() ../../lib/
Db::set_re_delim(int) ../../lib/
Db::get_mpf() ../../lib/
Db::set_encrypt(char const*, unsigned int)../../lib/
DbEnv::txn_checkpoint(unsigned int, unsigned int, unsigned int)transformdb.o
typeinfo for DbMemoryException ../../lib/
Db::set_re_source(char const*) ../../lib/
Db::get_error_stream() ../../lib/
Db::set_message_stream(std::basic_ostream<char, std::char_traits<char> >*)../../lib/
typeinfo for DbException transformdb.o
Db::set_lorder(int) ../../lib/
Dbc::pget(Dbt*, Dbt*, Dbt*, unsigned int)../../lib/
Dbc::dup(Dbc**, unsigned int) ../../lib/
Db::get_pagesize(unsigned int*) ../../lib/
Db::set_msgfile(__FILE*) ../../lib/
Db::set_errfile(__FILE*) ../../lib/
Db::stat_print(unsigned int) ../../lib/
Db::sync(unsigned int) ../../lib/
Db::errx(char const*, ...) ../../lib/
Db::get_cachesize(unsigned int*, unsigned int*, int*)../../lib/
ld: fatal: Symbol referencing errors. No output written to ../../bin/transformdb
collect2: ld returned 1 exit status
make[2]: *** [../../bin/transformdb] Error 1
make[2]: Leaving directory `/home/ipu01/local/ICE/Ice-2.1.2/src/FreezeScript'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/ipu01/local/ICE/Ice-2.1.2/src'
make: *** [all] Error 1

Could you help me ?



  • benoit
    benoit Rennes, France

    These missing symbols are symbols from the BerkeleyDB library, they should be defined in the "libdb_cxx" library.

    How did you build the BerkeleyDB library (with --enable-cxx?) and where is it located? If it's not located in one of the default location (usually /usr/lib, /lib), you need to set the DB_HOME variable in Ice-2.1.2/config/Make.rules to specify its location.

  • Hi again, the problem was I have not compiled with "--enable_cxx" option . I have recompiled the BerkeleyDB and now all works fine.