Archived

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

Compiling Ice-3 error

Hi.

I am trying to compile Ice3 on a Linux machine.

pradab@bar:~/Ice-3.0.0$gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

but, when i compile it, this is the error i'm getting..

c++ -Xlinker -rpath -Xlinker /tmp/pradhan/ICE/Ice-3.0.0/lib -ftemplate-depth-128 -Wall -D_REENTRANT -fPIC -g -L../../lib -o ../../bin/transformdb Tra
nsformAnalyzer.o TransformVisitor.o Transformer.o transformdb.o Grammar.o Scanner.o AssignVisitor.o Data.o Error.o Functions.o Exception.o Parser.o Pr
int.o Util.o -lSlice -lIceXML -lFreeze -lIce -lIceUtil -lpthread -L/sw/external/berkeley-db-4.2.52/lib -ldb_cxx -lexpat
67 Transformer.o: In function `FreezeScript::RecordDescriptor::execute(IceUtil::Handle<FreezeScript::SymbolTable> const&)':
68 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1889: undefined reference to `Dbt::Dbt[in-charge]()'
69 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1889: undefined reference to `Dbt::Dbt[in-charge]()'
70 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1890: undefined reference to `Dbc::get(Dbt*, Dbt*, unsigned)'
71 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1904: undefined reference to `Dbt::Dbt[in-charge](void*, unsigned)'
72 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1905: undefined reference to `Dbt::Dbt[in-charge](void*, unsigned)'
73 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1908: undefined reference to `Dbt::~Dbt [in-charge]()'
74 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1908: undefined reference to `Dbt::~Dbt [in-charge]()'
75 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1908: undefined reference to `Dbt::~Dbt [in-charge]()'
76 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1908: undefined reference to `Dbt::~Dbt [in-charge]()'
77 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1924: undefined reference to `Dbt::~Dbt [in-charge]()'
78 Transformer.o:/home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1924: more undefined references to `Dbt::~Dbt [in-charge]()' follow
79 Transformer.o: In function `FreezeScript::RecordDescriptor::execute(IceUtil::Handle<FreezeScript::SymbolTable> const&)':
80 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1933: undefined reference to `Dbc::close()'
81 /home/pradab/Ice-3.0.0/src/FreezeScript/Transformer.cpp:1943: undefined reference to `Dbc::close()'
82 transformdb.o: In function `transformDb(bool, IceInternal::Handle<Ice::Communicator> const&, DbEnv&, DbEnv&, std::basic_string<char, std::char_traits<
char>, std::allocator<char> > const&, IceInternal::Handle<Freeze::Connection> const&, std::vector<Db*, std::allocator<Db*> >&, IceUtil::Handle<Slice::
Unit> const&, IceUtil::Handle<Slice::Unit> const, DbTxn*, bool, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
83 /home/pradab/Ice-3.0.0/src/FreezeScript/transformdb.cpp:112: undefined reference to `Db::Db[in-charge](DbEnv*, unsigned)'
84 /home/pradab/Ice-3.0.0/src/FreezeScript/transformdb.cpp:113: undefined reference to `Db::open(DbTxn*, char const*, char const*, DBTYPE, unsigned, int)
'

Is it a problem with my current berkely db distribution?

So I tried compiling the berkeley db distrib that comes with your ThirdParty.tar.gz, but I face this error

/usr/bin/ld: .libs/libdb_cxx-4.3.so: undefined versioned symbol name __frame_state_for@@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
make: *** [libdb_cxx-4.3.la] Error 1


any clues please help!
:)

Comments

  • You are correct. You need Berkeley DB 4.3.29 to build Ice.
    /usr/bin/ld: .libs/libdb_cxx-4.3.so: undefined versioned symbol name __frame_state_for@@GLIBC_2.0
    /usr/bin/ld: failed to set dynamic section sizes: Bad value
    collect2: ld returned 1 exit status
    make: *** [libdb_cxx-4.3.la] Error 1

    I'm not sure why you are getting this build error. Did you follow the instructions provided by Sleepycat for building Berkeley DB? Failing that, it looks like there could be something wrong with your environment or compiler installation. If you are using a 'stock' compiler/binutils installation that came with your Linux distribution, you might want to check with that distribution's publisher to see if there are known issues. If you built and installed GCC yourself, try checking the version of binutils you are using as well as the configuration options you used for building GCC.
  • Thanks!

    I don't want the dependency of Berkeley Db. Is there a way I can take it out? I just want ICE, I do not want Freeze/FreezeScript etc etc..

    Right now, I have just commented out Freeze/FreezeScript etc from the top level makefile. Is this an OK approach?

    I want the most minimalistic distribution... :(
  • bernard
    bernard Jupiter, FL
    Freeze is also used by IceGrid and IceStorm. If you want a really minimal Ice, maybe you should try Ice-E.

    Cheers,
    Bernard
  • Thanks!

    I've downloaded ICE-E and looking at the demo. Hmm, can I use Dynamic Interface Invocation (DII) with ICE-E ?

    is there some documentation on this?
  • mes
    mes California
    orphean wrote:
    I've downloaded ICE-E and looking at the demo. Hmm, can I use Dynamic Interface Invocation (DII) with ICE-E ?

    is there some documentation on this?
    Dynamic invocation is not supported in Ice-E. See the Ice-E README file for a detailed description of the differences between Ice and Ice-E. You can refer to the Ice manual for information on the features supported by Ice-E.

    Take care,
    - Mark
  • another problem now...

    While compiling ICE-3, this is the error I get..

    c++ -Xlinker -rpath -Xlinker /tmp/pradhan/ICE/Ice-3.0.0/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 -L/tmp/pradhan/DB/lib -ldb_cxx -lexpat
    /usr/lib/libdb_cxx-3.3.so: undefined reference to `cerr'
    /usr/lib/libdb_cxx-3.3.so: undefined reference to `ostream::operator<<(char const *)'
    collect2: ld returned 1 exit status
    make[2]: *** [../../bin/transformdb] Error 1
    make[2]: Leaving directory `/home/pradab/Ice-3.0.0/src/FreezeScript'
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/home/pradab/Ice-3.0.0/src'
    make: *** [all] Error 1

    :(
  • Something still doesn't seem right with your Berkeley DB installation. The error message seems to indicate that the libdb_cxx you are linking to is for version 3.3 of Berkeley DB. Did you install Berkeley DB 4.3 to /usr/lib? If so, you should verify that the libdb_cxx symbolic link references libdb_cxx-4.3.so. If you installed it somewhere else, you need to specify Berkeley DB's location by setting the DB_HOME environment variable or directly modifying the config/Make.rules file in your Ice source distribution.

    Cheers
  • Thank you!

    Yes, that was the problem. I had to have a symbolic link...

    ln -s libdb_cxx-4.4.so libdb_cxx-3.3.so

    ICe built for me.

    cheers! and thanks for all your support!!
    abhay
  • hi,
    I am compiling the ice in Red Hat Linux Enterprise 4 and getting some errors:

    c++ -shared -Xlinker -rpath -Xlinker /opt/Ice-3.0.0/lib -ftemplate-depth-128 -Wall -D_REENTRANT -fPIC -g -L../../lib -o ../../lib/libFreeze.so.3.0.0 -Wl,-h,libFreeze.so.30 CatalogData.o Catalog.o ConnectionF.o ConnectionI.o Connection.o DB.o EvictorF.o EvictorI.o EvictorIteratorI.o Evictor.o EvictorStorage.o Exception.o IndexI.o Index.o MapI.o ObjectStore.o PingObject.o SharedDbEnv.o SharedDb.o TransactionHolder.o TransactionI.o Transaction.o Util.o -lIce -lIceUtil -ldb_cxx -lpthread
    /usr/bin/ld: cannot find -ldb_cxx

    I have set the DB_HOME to the right path and has the lib named libdb_cxx . Even I changed -ldb_cxx in the make rule to the -libdb_cxx , the errors are same except the "can not find -libdb_cxx".

    I have fellowed Benard's post and complied successfuly the erkeleyDB.4.3 ( ../dist/config --enable_cxx --enable-java).

    What did I miss?

    TIA

    OrNot
  • bernard
    bernard Jupiter, FL
    It's a problem with DB_HOME. You should see -L$(DB_HOME)/lib on this link-line.

    Did you export DB_HOME? If for some reason the env variable does not work, you can also edit config/Make.rules to set DB_HOME.

    Cheers,
    Bernard
  • sorry, I haven't crawled out of my hole yet .:(
    Here are the errors:


    c++ -Xlinker -rpath -Xlinker /opt/Ice-3.0.0/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 -L/usr/local/BerkeleyDB.4.3/lib -ldb_cxx -L/usr/local/lib -lexpat

    ../../lib/libFreeze.so: undefined reference to `Db::set_errcall(void (*)(char const*, char*))'
    ../../lib/libFreeze.so: undefined reference to `Db::stat(void*, unsigned int)'
    collect2: ld returned 1 exit status

    It seems a lib was not found. But I have set

    LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.3
  • benoit
    benoit Rennes, France
    Did you do a make clean after setting DB_HOME?

    I suspect that you have compiled Ice with an old BerkeleyDB version (the one installed with your system, check /usr/include/db_cxx.h) but you're linking it with a recent version (the one from /usr/local/BerkeleyDB.4.3).

    The easiest to use the BerkeleyDB build from your /usr/local/BerkeleyDB.4.3 directory is to edit Ice-3.0.0/config/Make.rules and set the DB_HOME variable to /usr/local/BerkeleyDB.4.3.

    Note that you'll need to do a "make clean" after this change and start the build from scratch again. You should see the argument "-I/usr/local/BerkeleyDB.4.3/include" when Freeze is being compiled and "-L/usr/local/BerkeleyDB.4.3/lib" when it's being linked.

    Benoit.
  • Thank you Benoit.
    OK now. Making clean is necessary.