[omniORB] Bug reports about Solaris 7 / Sun Workshop 5.0 compiler

Hautesserres, Thomas thomas.hautesserres@managedstorage.fr
Fri Jan 17 15:07:01 2003


Hi,

I have finally managed to compile and install OmniORB 4.0.0 on a Solaris 7
platform with the Sun Workshop 5.0 compiler. I have encountered two main
problems, one with Python and one with ambiguities in constructor calls that
the compiler could not deal with.


1) Python Problem

As we don't have an official Python release installed on our machine, we
chose to use the minimal package found on the omniorb site and named
omnipython-sun4_sosV_5.7.tar.gz. We unzipped and untared this package
directly in the omniORB directory, as specified in the README.unix file.

The problem is that setting the PYTHON variable in the
mk/platforms/sun4_sosV_5.7.mk file didn't work (either by leaving the PYTHON
= $(ABSTOP)/$(BINDIR)/omnipython line or setting it to an absolute path like
PYTHON = /home/diva/Tools/omniORB-4.0.0/bin/sun4_sosV_5.7/omnipython). If we
do that, the configure script doesn't find the python executable (checking
for python... no), makes two more errors while checking python version and
system (?), but finally generates makefiles that won't work. Note: PYTHON
was set to an empty value in build/mk/beforeauto.mk .

The problem was resolved by setting the PYTHON variable directly as a
configure parameter :
../configure
PYTHON=/home/diva/Tools/omniORB-4.0.0/bin/sun4_sosV_5.7/omnipython. 


2) Ambiguities in constructor calls

We had problems with the following calls (repeated a couple of times in the
sources files of src/lib/omniORB/orbcore) :

cdrMemoryStream buf(CORBA::ULong(0),1);
cdrEncapsulationStream e(CORBA::ULong(0),1);

The ambiguity is that the Sun Workshop 5.0 compiler doesn't know that 1 or 0
is a CORBA::Boolean, so it decides that the constructor call is ambiguous
and could also be a call to a constructor like :
  cdrEncapsulationStream(const _CORBA_Octet* databuffer, _CORBA_ULong
bufsize, _CORBA_Boolean allowAlign4 = 0);
(because a long can also be a pointer).

The solution we have used is to add another constructor that explicity
accepts a CORBA::Long and an integer as parameter and does exactly the same
thing as the constructor with the long and the boolean :
  cdrEncapsulationStream(_CORBA_ULong initialBufsize, int clearMemory);
  cdrMemoryStream(_CORBA_ULong initialBufsize, int clearMemory);

If anyone is interested by the detailed modification (maybe to include them
in the official release), feel free to send me an email at
(thomas.hautesserres at managedstorage.fr).

Note: It would be better to modify the original calls to make them more
explicit, like :  cdrMemoryStream buf(CORBA::ULong(0),CORBA::Boolean(1));,
but that would have made more modifications in more files for us, so we have
chosen the other solution.


So omniORB is now compiled and installed, and we are going to start our
first tests : cross-platform (windows and solaris), cross-langage (C++ and
Java), and with wide characters strings. Here we go...

Thomas