Home Patches

patch for Ice-2.0.0 for gcc on Solaris.

JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
Hello

I'm new to ICE and I wanted to build for Solaris using gnu compilers
but I found out that by default it uses Sun C++ 5.4.

So I have created some patches for GCC 3.4.1. Is there any chance of
seeing them folded into the official sources so I don't have to this
patching again next time?

I edited the master makefiles to allow a general way to optionally
use gnu compilers for any platform not just Solaris.

To select gnu compilers you set a new variable `USE_GCC' in Make.rules
that will cause it to select:

Make.rules.<UNAME>-gcc

I implemented a SunOS version `Make.rules.SunOS-gcc' for my purposes.

Patches are attached.


Thanks,
-john

Comments

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

    I am updating the build system (and INSTALL.SOLARIS) to add support for GCC 3.4.x (probably 3.4.2 since it's the version on www.sunfreeware.com) on Solaris 9. It will be in the 2.1 release (32bit only for now), but I don't know yet if it will become an officially supported OS/Compiler combination.

    I noticed in your patch that you updated the DB_FLAGS to:
    DB_FLAGS = -I$(DB_HOME)/include -DHAVE_CXX_STDHEADERS

    Why, since it's the first #define in <db_cxx.h>? Obviously you need to build Berkeley DB configured with --enable-cxx using the same C++ compiler as the one you use for Ice (or at least a compatible compiler)

    You also made some changes to IceXML and the Freeze backup demo ... could you provide more info?

    Thanks,
    Bernard
  • JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
    > I noticed in your patch that you updated the DB_FLAGS to:
    > DB_FLAGS = -I$(DB_HOME)/include -DHAVE_CXX_STDHEADERS


    That was a mistake that didn't pan out. When I discovered it I later
    went back to re-configure Berkeley DB with --enable-cxx as you
    suggested but then forget to remove it from DB_FLAGS. I removed the
    removed 'src/FreezeScript/DumpDB.o' and did test build. It worked
    fine so you're right it's not needed.

    > Why, since it's the first #define in <db_cxx.h>? Obviously you need
    > to build Berkeley DB configured with --enable-cxx using the same
    > C++ compiler as the one you use for Ice (or at least a compatible
    > compiler)

    > You also made some changes to IceXML and the Freeze backup demo
    > ... could you provide more info?


    ** Regarding IceXML

    I apparently downloaded a slightly different version of expat than was
    expected. In particular `IceXML/Parser.cpp' was #including `expat.h'
    but the version I downloaded had `xmlparse.h' instead. I didn't want
    to just change the source so tried to come up with a way to allow it
    to work with both versions of expat.

    The expat I found with goggle search was:
    ftp://ftp.jclark.com/pub/xml/expat.zip

    If I need to get a different version of expat let me know. If this
    version is the correct one and if you decide to support both versions
    of expat then I can download the updated Makefiles and sources once
    you come up with a way to support it.


    What I did was put `-DICE_USE_XMLPARSEAPI' in Make.rules and then put
    this in Parser.cpp:

    #ifdef ICE_USE_XMLPARSEAPI
    # include <xmlparse.h>
    #else
    # include <expat.h>
    #endif

    Certainly this is not the only way to do this.

    ** Next regarding Freeze backup demo.

    I checked the sources into CVS so I can track changes I might make and
    so that I can use cvs to merge in future changes I might download from
    zeroc. However the way CVS works it creates a CVS subdirs:

    full/CVS
    include/CVS

    to hold cvs state info. When I did a make clean using original
    Makefile it removed the CVS dir as follows:

    rm -rf full/* incremental/*


    So I removed the empty dires full & incremental for the CVS repository
    and adjusted the Makefile to creat them on demand. If you don't want
    to keep this change that's fine I can deal with it.

    Thanks,
    -john
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi John,

    You should use expat 1.95.x from http://sourceforge.net/projects/expat
    or http://www.sunfreeware.com (for binary distributions).

    (where to find third party packages is listed in the various INSTALL.<uname> files)

    Regarding the Freeze backup demo, you're right, this cleaning is not good, I'll fix it!

    Bernard
  • JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
    Ok I downloaded expat 1.95.8 and backed out may changes in IceXML (and associated change Make.rules)

    Rebuilt just fine and tests pass.

    -john
Sign In or Register to comment.