Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2005
JohnB JohnB is offline
Registered User
 
 
Join Date: Feb 2005
Posts: 17
patch for Ice-2.0.0 for gcc on Solaris.

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
Attached Files
File Type: txt ice.gcc-build.patch.txt (15.8 KB, 355 views)

Last edited by JohnB : 02-09-2005 at 06:59 PM.
Reply With Quote
  #2 (permalink)  
Old 02-09-2005
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 763
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
Reply With Quote
  #3 (permalink)  
Old 02-10-2005
JohnB JohnB is offline
Registered User
 
 
Join Date: Feb 2005
Posts: 17
> 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
Reply With Quote
  #4 (permalink)  
Old 02-10-2005
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 763
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
Reply With Quote
  #5 (permalink)  
Old 02-10-2005
JohnB JohnB is offline
Registered User
 
 
Join Date: Feb 2005
Posts: 17
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 8 or 10 dgdillaman Help Center 3 10-12-2006 09:13 AM
I can use the Ice on Solaris 8 and Solaris 10? tjl02040 Help Center 1 09-07-2006 09:06 AM
Ice on Solaris 2.6/Sparc ? Garric Comments 9 01-30-2006 06:28 PM
Building with gcc for Solaris 5.9 mwilson Help Center 1 09-20-2005 03:42 PM
Small Patch to Support gcc on Solaris acbell Patches 0 02-02-2005 11:50 AM


All times are GMT -4. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.