[omniORB] omniORB_280 and Sun C++ 5.0 - and omniEvents

Robert Jonsson ddskrjo@dataductus.se
Wed, 12 Apr 2000 07:02:20 +0200


Hi everybody,

I spent eons trying to compile omniORB and omniEvents on Solaris 7 and Sun C++
5.0, I think we have everything working now.
I'm sorry to say though that it has been a while since I got it working and I
don't remember all the strange things we where faced with.

Firstly, we are NOT using compatibility mode which makes a lot of difference.
Also we are using Rogue Wave which also makes some difference.

Looking at our current makefile I think there are two changes that are
necessary.

The AR line should be declared as:
AR = CC -xar -o        # I think it has to do with new object file format,
perhaps it isn't needed

Also add -library=iostream to the propriate FLAG, I seem to have put it under
CXXDEBUGFLAGS seems strange but works.

As far as omniEvents are concerned we have yet to test it consistently but it
seems to work. The changes where quite a few, I won't try to remember all the
changes if there is any interest I'll try to find out. As I remember it most had
to do with namespaces.

But then again I've tried so many different compile changes it isn't at all
certain the above achieves anything!
Cheers,

Robert

Brian Tolley wrote:

> I had similar error messages when using the Sun C++ 5.0 in version 4.0
> compatibility mode with C++ namespace support enabled.
>
> In my case it was apparently caused because the compiler objected to there
> being two routines with different signatures in the same C++ namespace.
> When I forced omniORB to declare 'omniORB' as a C++ class rather than having
> it as a
> C++ namespace (by editing the 'CORBA_sysdep.h' so that
> 'HAS_Cplusplus_Namespace'
> is not defined) the problem went away. I assumed this was a compiler fault,
> but perhaps someone with more C++ knowledge than me will say whether or
> nor C++ allows overloaded functions in the same C++ namespace.
>
> However I do not know however why you are getting the fault with the Sun C++
> 5.0 compiler (not in V4.0 compatibility mode), perhaps there are still C++
> namespace
> bugs in the compiler.
>
> Brian
>
> > -----Original Message-----
> > From: Dr. Uwe C. Hinze [mailto:uhinze@ford.com]
> > Sent: 04 April 2000 10:20
> > To: omniORB, MailingList
> > Subject: [omniORB] omniORB_280 and Sun C++ 5.0
> >
> >
> > I cannot compile the following file in
> >     omniORB_280src/lib/omniORB2/orbcore
> > giopServer.cc,  exception.cc, policy.cc, scavenger.cc, objectRef.cc
> >
> > using Sun C++ 5.0 with all new Compiler patches installed
> > using sun4_sosV_5.6.mk
> > I get error messages like
> >
> > CC -c -O2 -g   -DUsePthread -D_REENTRANT -mt -I. -I./..
> > -I./../.. -DUSE_omniORB_logStream -D_OMNIORB2_LIBRARY
> > -DUnixArchitecture
> > -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"' -I.
> > -I../../../../include -D__sparc__ -D__sunos__
> > -D__OSVERSION__=5 -o giopServer.o
> > giopServer.cc
> > "giopServer.cc", line 980: Error:
> > omniORB::MaxMessageSize(unsigned), returning unsigned, was
> > previously declared returning void.
> > 1 Error(s) detected.
> > or:
> > "objectRef.cc", line 827: Error: CORBA::UnMarshalObjRef(const
> > char*, MemBufferedStream&) already had a body defined.
> > "objectRef.cc", line 914: Error:
> > CORBA::MarshalObjRef(CORBA::Object*, const char*, unsigned,
> > MemBufferedStream&) already had a body
> > defined.
> >
> > what can I do, to get omniORB_280 compiled with Sun C++ 5.0
> >     best regards
> >         Uwe
> >
> > [demime 0.97b removed an attachment of type text/x-vcard
> > which had a name of uhinze.vcf]