Archived

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
home/qalbcas=>

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
home/qalbcas=>

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/libFreeze.so
DbMemoryException::~DbMemoryException()../../lib/libFreeze.so
Db::err(int, char const*, ...) ../../lib/libFreeze.so
Db::set_bt_prefix(unsigned int (*)(__db*, __db_dbt const*, __db_dbt const*))../../lib/libFreeze.so
Db::remove(char const*, char const*, unsigned int)../../lib/libFreeze.so
Db::get_re_delim(int*) ../../lib/libFreeze.so
DbException::get_errno() const ../../lib/libFreeze.so
Db::set_h_hash(unsigned int (*)(__db*, void const*, unsigned int))../../lib/libFreeze.so
DbEnv::~DbEnv() transformdb.o
DbEnv::DbEnv(unsigned int) transformdb.o
Db::upgrade(char const*, unsigned int)../../lib/libFreeze.so
Db::put(DbTxn*, Dbt*, Dbt*, unsigned int)../../lib/libFreeze.so
Db::get(DbTxn*, Dbt*, Dbt*, unsigned int)../../lib/libFreeze.so
Db::get_env() ../../lib/libFreeze.so
Db::set_re_delim(int) ../../lib/libFreeze.so
Db::get_mpf() ../../lib/libFreeze.so
Db::set_encrypt(char const*, unsigned int)../../lib/libFreeze.so
DbEnv::txn_checkpoint(unsigned int, unsigned int, unsigned int)transformdb.o
typeinfo for DbMemoryException ../../lib/libFreeze.so
Db::set_re_source(char const*) ../../lib/libFreeze.so
Db::get_error_stream() ../../lib/libFreeze.so
Db::set_message_stream(std::basic_ostream<char, std::char_traits<char> >*)../../lib/libFreeze.so
.....
.....
.....
.....
typeinfo for DbException transformdb.o
Db::set_lorder(int) ../../lib/libFreeze.so
Dbc::pget(Dbt*, Dbt*, Dbt*, unsigned int)../../lib/libFreeze.so
Dbc::dup(Dbc**, unsigned int) ../../lib/libFreeze.so
Db::get_pagesize(unsigned int*) ../../lib/libFreeze.so
Db::set_msgfile(__FILE*) ../../lib/libFreeze.so
Db::set_errfile(__FILE*) ../../lib/libFreeze.so
Db::stat_print(unsigned int) ../../lib/libFreeze.so
Db::sync(unsigned int) ../../lib/libFreeze.so
Db::errx(char const*, ...) ../../lib/libFreeze.so
Db::get_cachesize(unsigned int*, unsigned int*, int*)../../lib/libFreeze.so
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 ?

Thanks.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    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.

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

    Thankyou