Home Help Center

problems when compile Ice2.0.0 in redhat 9

hi ,everyone
some info of my platform
os:Redhat 9
gcc :2.3.2

I also install db-4.2.52,expat1.95.8 and openssl-0.9.7e,

but when compiling Ice2.0.0 ,there is some errors as follow:

c++ -c -I.. -I../../include -DFREEZE_API_EXPORTS -g -ftemplate-depth-128 -fP
IC -Wall -D_REENTRANT TransactionI.cpp
TransactionI.cpp: In member function `virtual void
Freeze::TransactionI::commit()':
TransactionI.cpp:24: parse error before `&' token
TransactionI.cpp:28: `dx' undeclared (first use this function)
TransactionI.cpp:28: (Each undeclared identifier is reported only once for each
function it appears in.)
TransactionI.cpp: At global scope:
TransactionI.cpp:31: parse error before `catch'
TransactionI.cpp:34: 'DatabaseException' is used as a type, but is not defined
as a type.
TransactionI.cpp:35: syntax error before `.' token
TransactionI.cpp:38: ISO C++ forbids declaration of `cleanup' with no type
TransactionI.cpp:39: parse error before `}' token
TransactionI.cpp: In member function `virtual void
Freeze::TransactionI::rollback()':
TransactionI.cpp:51: parse error before `&' token
TransactionI.cpp: At global scope:
TransactionI.cpp:58: parse error before `catch'
TransactionI.cpp:61: 'DatabaseException' is used as a type, but is not defined
as a type.
TransactionI.cpp:62: syntax error before `.' token
TransactionI.cpp:65: ISO C++ forbids declaration of `cleanup' with no type
TransactionI.cpp:66: parse error before `}' token
make[2]: *** [TransactionI.o] Error 1
make[2]: Leaving directory `/home/installprog/ICE/Ice-2.0.0/src/Freeze'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/installprog/ICE/Ice-2.0.0/src'
make: *** [all] Error 1


how to deal with?
thanks !

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    It looks like the compiler is not using the correct BerkeleyDB header file. You should edit config/Make.rules and update the settings to reflect the installation directories of the third-party dependencies.

    Take care,
    - Mark
  • libaolilibaoli Member
    thanks!

    I have set environment variant:

    DB_HOME="/usr/local/BerkeleyDB.4.2"
    LD_LIBRARY_PATH="/usr/local/BerkeleyDB.4.2/lib:$LD_LIBRARY_PATH
    PATH="/usr/local/BerkeleyDB.4.2/bin:$PATH

    but there are some other problems:

    ++ -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT -L../../lib -o ../../bin/
    transformdb TransformAnalyzer.o TransformVisitor.o Transformer.o TransformDB.o G
    rammar.o Scanner.o AssignVisitor.o Data.o Error.o Functions.o Exception.o Parser
    .o Print.o Util.o -lSlice -lIceXML -lIce -lIceUtil -lpthread -L/usr/local/Berk
    eleyDB.4.2/lib -ldb_cxx -lexpat
    TransformDB.o(.text+0x440a): In function `run':
    /home/lbl/ICE/Ice-2.0.0/src/FreezeScript/TransformDB.cpp:572: undefined referenc
    e to `Db::open(DbTxn*, char const*, char const*, DBTYPE, unsigned, int)'
    TransformDB.o(.text+0x4833):/home/lbl/ICE/Ice-2.0.0/src/FreezeScript/TransformDB
    .cpp:603: undefined reference to `Db::open(DbTxn*, char const*, char const*, DBT
    YPE, unsigned, int)'
    TransformDB.o(.text+0x4cc3):/home/lbl/ICE/Ice-2.0.0/src/FreezeScript/TransformDB
    .cpp:628: undefined reference to `Db::open(DbTxn*, char const*, char const*, DBT
    YPE, unsigned, int)'
    collect2: ld returned 1 exit status
    make[2]: *** [../../bin/transformdb] Error 1
    make[2]: Leaving directory `/home/lbl/ICE/Ice-2.0.0/src/FreezeScript'
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/home/lbl/ICE/Ice-2.0.0/src'
    make: *** [all] Error 1


    please help me!
  • libaolilibaoli Member
    when I install db-4.2.52
    There is a warning :Clock skew detected. You build may be incomplete.
    I do not know that is or not related to installation of Ice

    Mr Spruiell ,could you tell me??
    thanks
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Did you install BerkeleyDB with C++ support? Look in $DB_HOME/lib to see if there is a file libdb_cxx.so. If not, your BerkeleyDB installation did not include C++ support, and the compiler is attempting to use an incompatible library that already existed on your system.

    - Mark
  • libaolilibaoli Member
    yes ,you are right
    libdb_cxx.so is not existed ;
    Should I uninstall BerkeleyDB, and install it again?
    I think it doesn't solve the problem!
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    The best thing to do is to download the source from www.sleepycat.com and build it yourself, making sure that you include the options --enable-cxx and possibly --enable-java.

    Take care,
    - Mark
  • libaolilibaoli Member
    installing BerkeleyDB,how to enable-cxx
    Mr Spruiell
  • libaolilibaoli Member
    thanks a lot ,Mark!
    I know how to do!
Sign In or Register to comment.