Home Help Center

Problem compiling ICE 1.2.0 on Mandrake 9.1

amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
Hello.

First off, I was able to compile ICE 1.1.1 successfully on this machine. I was upgrading it to 1.2. I went the usual way of typing:
$ make

It was chugging along then it choked with this message:
In file included from ../Freeze/ConnectionI.h:20,
from ConnectionI.cpp:15:
../Freeze/TransactionI.h:19:20: db_cxx.h: No such file or directory

I would have loved to compare my configuration with my original ICE 1.1.1 but the finger was faster than my brain and said Yes to the delete directory dialog box. ;)

Alex

Comments

  • kutsuyakutsuya Member
    Same problem on Gentoo

    Hi amrufon,

    I had the same problem on Gentoo. Found db_cxx.h in /usr/include/db3 && /usr/include/db4. So I had to patch the Make.rules file.
    -#DB_HOME ?= /opt/db
    +DB_HOME = /usr
    ifneq ($(DB_HOME),)
    - DB_FLAGS = -I$(DB_HOME)/include
    + DB_FLAGS = -I$(DB_HOME)/include/db4
    DB_LIBS = -L$(DB_HOME)/$(libsubdir) -ldb_cxx
    else

    But now I have another problem (which might be caused by the above hack):
    TransactionI.cpp: In member function `virtual void
    Freeze::TransactionI::commit()':
    TransactionI.cpp:29: syntax error before `&' token
    TransactionI.cpp:33: `dx' undeclared (first use this function)

    Now to track this problem down. :)

    Regards,
    --kutsuya
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hello,

    It's a bug in the INSTALL.LINUX. It should include a line like:
    Ice 1.2 requires Berkeley DB 4.1.25 with C++ support enabled, and built with a C++ compiler compatible with the one you are using.

    So unless your Linux distribution includes such a Berkeley DB, you will need to build and install it (which is quite straightforward).

    On Windows (unlike Linux), C++ is enabled by default. And if you are using Visual Studio .NET, you can download a full Ice binary distribution, or just the binaries of the third party packages used by Ice (including Berkeley DB).
    If you use Visual C++ 6.0, you need to setup your Visual Studio environment to use STLPort before building Berkeley DB.

    Best regards,
    Bernard
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello Bernard,

    Thanks for the heads up.

    I checked my system and I found out that I'm actually using Berkeley DB 4.0.14.

    I'll be updating this ASAP. Again, thanks.

    Alex
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello.

    I found out the hard way that Mandrake 9.1 takes installed product dependencies very seriously.

    I tried removing my existing Berkeley DB to upgrade it to the latest version and the Mandrake Uninstall informed me that doing so will force it to automatically remove a lot of dependent applications.

    So I didn't do that and recompiled the latest DB and installed it even though an older version of the DB is still active in my box. Now my problem worsened. I mucked around with the system settings ... now nothing would compile anymore. :(

    Do you think its adviseable to upgrade to Mandrake 9.2? If not, what other windows-user friendly Linux distribution would you recommend? Btw, the previous statement precludes the use of Gentoo. I've tried it already and I couldnt get it to work. Im so n00b. ;)

    Thanks.

    Alex
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alex,

    The simplest solution is to install Berkeley DB 4.1.25 in a different location (different from the Berkeley DB in your distribution). Try configure --help and look at the --prefix option.

    When you run configure, don't forget to pass the --enable-cxx option.

    Cheers,
    Bernard
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello Bernard,

    Thanks for the info. Much as I would like to try your suggestions ... the linux box won't compile anything anymore. :D

    I'm planning to reinstall the whole thing again in the next few days. I'm biding my time since its also my teams CVS server so bringing it down would disrupt operations.

    Looking at the bright side ... I'm getting a fresh Linux box. :rolleyes:

    Thanks.

    Alex
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hello,

    Here are more detailed instructions on Linux:
    • Download the Berkeley DB 4.1.25 source distribution
    • Uncompress it in some directory, e.g.:
      ~/tmp> tar xzvf db-4.1.25.tar.gz
    • If you use RedHat 9, set LD_ASSUME_KERNEL to 2.4.1
      ~/tmp> export LD_ASSUME_KERNEL=2.4.1
    • Configure Berkeley DB with C++ enabled
      ~/tmp> cd db-4.1.25/build_unix
      ~/tmp/db-4.1.25/build_unix> ../dist/configure --enable-cxx
      If you want to install Berkeley DB 4.1.25 in a directory other than the default (/usr/local/BerkeleyDB.4.1) use the --prefix option to select another directory.
      You also need to pass --enable-java if you want to use this Berkeley DB installation with IceJ.
    • make
    • Make install (as a user with write permission to the installation directory, for example root)
      ~/tmp/db-4.1.25/build_unix # make install
    • Add the lib directory of this installation to your /etc/ld.so.conf, and then run ldconfig
      # ldconfig
      Alternatively you can add the Berkeley DB lib directory to your LD_LIBRARY_PATH environment variable.
    • Either set DB_HOME to your Berkeley DB 4.1.25 installation
      for example:
      > export DB_HOME=/usr/local/BerkeleyDB.4.1
      or edit $ICE_HOME/config/Make.rules to set DB_HOME to the correct directory
    • Build Ice

    Cheers,
    Bernard
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Bernard,

    Thanks for the info ... I've upgraded to Mandrake 9.2 download edition and was able to compile Ice 1.2 successfully.

    A note though, the development files for readline is not installed by default by Mandrake but thats easily fixed. Still, Mandrake 9.2 is now more Windows-user friendly than ever ... I'm looking forward to getting the Mandrake 9.2 Powerpack. :)

    Thanks again for the info.

    Alex
Sign In or Register to comment.