Home Help Center

I tired of trying bereley DBS

none can work, ant the end of compile Ice-2.1.2 source code by gcc-3.44
it throws link error seems like the berkeley db did not support some APIS,

any one can help me get through. thanks very much.

ps. i compiled db with --enable-cxx and java

real name:yin xiaobing
company: xin-langhua
site: http://www.langhua.cn
project: MMSC for wireless service
MSN: [email protected](very glad to meet you on m$n)

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Please see this post http://www.zeroc.com/vbulletin/showthread.php?t=1697 for our support policy.

    Regards,
    Benoit.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    If you want help you also need to give lots more details. At a minimum you need to give:

    - The version of berkely db you are trying to use (you are using the right version right?)
    - The platform upon which you are encountering this problem.
    - The error messages you are encountering.
  • this is my plartform and error messages

    linux 9
    gcc 3.4.4
    Berkeley DB :db-4.2.52.NC.tar.gz with 4 patches

    also i tryed db-4.3.27 and 4.3.28
    [[email protected] root]# cd db-4.2.52.NC
    [[email protected] db-4.2.52.NC]# patch -p0 <../pa
    package.xml patch.4.2.52.2 patch.4.2.52.4
    patch.4.2.52.1 patch.4.2.52.3
    [[email protected] db-4.2.52.NC]# patch -p0 <../patch.4.2.52.1
    [[email protected] db-4.2.52.NC]# patch -p0 <../patch.4.2.52.2
    patching file lock/lock.c
    [[email protected] db-4.2.52.NC]# patch -p0 <../patch.4.2.52.3
    patching file java/src/com/sleepycat/db/DbEnv.java
    patching file java/src/com/sleepycat/db/Db.java
    patching file java/src/com/sleepycat/db/db_java.java
    patching file java/src/com/sleepycat/db/db_javaJNI.java
    patching file libdb_java/db_java.i
    patching file libdb_java/db_java_wrap.c
    [[email protected] db-4.2.52.NC]# patch -p0 <../patch.4.2.52.4
    patching file btree/bt_rec.c

    [[email protected] root]# db-4.2.52.NC/dist/configure --enable-cxx --enable-java
    --prefix=/opt/db-4.2.52

    blahblah......
    [[email protected] root]# export DB_HOME=/opt/db-4.2.52/

    [[email protected] Ice-2.1.2]# make

    and i meet the same link error:

    c++ -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT -L../../../lib -o server
    PhoneBook.o PhoneBookI.o ContactFactory.o NameIndex.o Server.o -lFreeze -lIce -l
    IceUtil -lpthread
    ../../../lib/libFreeze.so: undefined reference to `Db::err(int, char const*, ...
    )'
    ../../../lib/libFreeze.so: undefined reference to `DbException::what() const'
    ../../../lib/libFreeze.so: undefined reference to `Db::cursor(DbTxn*, Dbc**, uns
    igned int)'

    ......

    cons
    t'
    ../../../lib/libFreeze.so: undefined reference to `Db::key_range(DbTxn*, Dbt*, _
    _key_range*, unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_re_pad(int)'
    ../../../lib/libFreeze.so: undefined reference to `Dbc::put(Dbt*, Dbt*, unsigned
    int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_re_source(char const*
    *)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_re_len(unsigned int)'

    ../../../lib/libFreeze.so: undefined reference to `Dbc::pget(Dbt*, Dbt*, Dbt*, u
    nsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_dbname(char const**,
    char const**)'
    ../../../lib/libFreeze.so: undefined reference to `Db::verify(char const*, char
    const*, std::basic_ostream<char, std::char_traits<char> >*, unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_h_hash(unsigned int (
    *)(__db*, void const*, unsigned int))'
    ../../../lib/libFreeze.so: undefined reference to `Dbt::Dbt()'
    ../../../lib/libFreeze.so: undefined reference to `Db::del(DbTxn*, Dbt*, unsigne
    d int)'
    ../../../lib/libFreeze.so: undefined reference to `typeinfo for DbException'
    ../../../lib/libFreeze.so: undefined reference to `Db::rename(char const*, char
    const*, char const*, unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `typeinfo for DbMemoryExceptio
    n'
    ../../../lib/libFreeze.so: undefined reference to `Db::put(DbTxn*, Dbt*, Dbt*, u
    nsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_type(DBTYPE*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::fd(int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_cachesize(unsigned in
    t, unsigned int, int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_app_private(void*)'
    ../../../lib/libFreeze.so: undefined reference to `typeinfo for Db'
    ../../../lib/libFreeze.so: undefined reference to `Dbt::~Dbt()'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_re_pad(int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_h_hash(unsigned int (
    *)(Db*, void const*, unsigned int))'
    ../../../lib/libFreeze.so: undefined reference to `DbMemoryException::DbMemoryEx
    ception(DbMemoryException const&)'
    ../../../lib/libFreeze.so: undefined reference to `Dbc::get(Dbt*, Dbt*, unsigned
    int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_pagesize(unsigned int
    *)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_bt_prefix(unsigned in
    t (*)(__db*, __db_dbt const*, __db_dbt const*))'
    /usr/lib/libdb_cxx-4.2.so: undefined reference to `ostream::operator<<(char cons
    t *)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_re_delim(int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::associate(DbTxn*, Db*, in
    t (*)(Db*, Dbt const*, Dbt const*, Dbt*), unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::Db(DbEnv*, unsigned int)'

    ../../../lib/libFreeze.so: undefined reference to `Db::set_h_ffactor(unsigned in
    t)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_errcall(void (*)(char
    const*, char*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_dup_compare(int (*)(_
    _db*, __db_dbt const*, __db_dbt const*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_error_stream(std::bas
    ic_ostream<char, std::char_traits<char> >*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::upgrade(char const*, unsi
    gned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_errfile(_IO_FILE**)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_bt_maxkey(unsigned in
    t)'
    ../../../lib/libFreeze.so: undefined reference to `Dbc::count(unsigned int*, uns
    igned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::~Db()'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_encrypt(char const*,
    unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::open(DbTxn*, char const*,
    char const*, DBTYPE, unsigned int, int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_bt_minkey(unsigned in
    t*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::remove(char const*, char
    const*, unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::truncate(DbTxn*, unsigned
    int*, unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::join(Dbc**, Dbc**, unsign
    ed int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_h_nelem(unsigned int)
    '
    ../../../lib/libFreeze.so: undefined reference to `Db::set_append_recno(int (*)(
    Db*, Dbt*, unsigned int))'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_byteswapped(int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_dup_compare(int (*)(D
    b*, Dbt const*, Dbt const*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::stat(void*, unsigned int)
    '
    ../../../lib/libFreeze.so: undefined reference to `Db::get_h_nelem(unsigned int*
    )'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_q_extentsize(unsigned
    int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_re_source(char const*
    )'
    ../../../lib/libFreeze.so: undefined reference to `Dbc::del(unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_lorder(int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_bt_minkey(unsigned in
    t)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_re_delim(int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_bt_compare(int (*)(Db
    *, Dbt const*, Dbt const*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_alloc(void* (*)(unsig
    ned int), void* (*)(void*, unsigned int), void (*)(void*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::~Db()'
    ../../../lib/libFreeze.so: undefined reference to `Dbc::dup(Dbc**, unsigned int)
    '
    ../../../lib/libFreeze.so: undefined reference to `DbEnv::DbEnv(unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_app_private() const'
    ../../../lib/libFreeze.so: undefined reference to `Db::Db(DbEnv*, unsigned int)'

    ../../../lib/libFreeze.so: undefined reference to `Db::set_lorder(int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_encrypt_flags(unsigne
    d int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_h_ffactor(unsigned in
    t*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_errpfx(char const**)'

    ../../../lib/libFreeze.so: undefined reference to `Db::get_re_len(unsigned int*)
    '
    ../../../lib/libFreeze.so: undefined reference to `Db::sync(unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_mpf()'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_cachesize(unsigned in
    t*, unsigned int*, int*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_bt_compare(int (*)(__
    db*, __db_dbt const*, __db_dbt const*))'
    ../../../lib/libFreeze.so: undefined reference to `Db::get_flags(unsigned int*)'

    ../../../lib/libFreeze.so: undefined reference to `Db::set_errfile(_IO_FILE*)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_q_extentsize(unsigned
    int)'
    ../../../lib/libFreeze.so: undefined reference to `DbMemoryException::~DbMemoryE
    xception()'
    ../../../lib/libFreeze.so: undefined reference to `Db::close(unsigned int)'
    ../../../lib/libFreeze.so: undefined reference to `Db::set_pagesize(unsigned int
    )'
    ../../../lib/libFreeze.so: undefined reference to `DbTxn::commit(unsigned int)'
    collect2: ld returned 1 exit status
    make[3]: *** [server] Error 1
    make[3]: Leaving directory `/root/Ice-2.1.2/demo/Freeze/phonebook'
    make[2]: *** [all] Error 1
    make[2]: Leaving directory `/root/Ice-2.1.2/demo/Freeze'
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/root/Ice-2.1.2/demo'
    make: *** [all] Error 1
    [[email protected] Ice-2.1.2]#
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Did you add the /opt/db-4.2.52/lib directory to your LD_LIBRARY_PATH environment variable? If not, can you add it? This should allow you to continue the compilation.

    Benoit.
  • benoit wrote:
    Did you add the /opt/db-4.2.52/lib directory to your LD_LIBRARY_PATH environment variable? If not, can you add it? This should allow you to continue the compilation.

    Benoit.

    Thank you heavy!
    DB_HOME have no effect on LIB PATH :p
Sign In or Register to comment.