[omniORB] omniORB on WinNT and Pharlap ETS

jon.kristensen@kongsberg-simrad.com jon.kristensen@kongsberg-simrad.com
Thu, 8 Jul 1999 10:47:09 +0200



Hi,

I am using omniORB in a project targeted for the Pharlap ETS kernel. Debugging
and development is done using Windows NT.
The compiler used is Microsoft Visual C++ v6.0.

When working with different Win32 configurations, it is often nesecarry to work
with different configurations within the same project. VC60 supports different
build configurations and builds each configuration to a different output
directory. It is possible to set different compiler switches and macros for each
configuration. It is however not possible (as far as I know) to specify
different library paths unless the complete path name is given. When working
with Pharlap ETS and NT this is a problem as the omniORB libraries are built to
separate library directories:

     ...\lib\x86_win32        for NT
     ...\lib\x86_win32_ets    for Pharlap ETS

I have the following build configurations:

     Win32 debug         for debugging on NT
     Win32 ETS debug     for debugging on Pharlap ETS
     Win32 ETS release   release version on Pharlap ETS

To make this work I had to rename the Pharlap ETS libraries and move them to the
...\lib\x86_win32 directory, and then specify this directory as a common library
directory.

I think that similar problems exist with projects that are build for both
Win95/98 and WinNT.

My suggestion is:
   All win32 libraries are installed in the ...\lib\x86_win32 directory
   Library files for different configurations have different names, eg.
   omniorb2_NT.lib, omniorb2_95.lib, omniorb2_ETS.lib

Also, the different configurations (re-)uses the same directory structure. Thus,
I need to do a "make clean" every time a want to build a new configuration to
make sure that I do not end up with mixed files. As the build time are
significant, this is a nuisance. A better solution would have been to use a
separate subdirectory for the build output of each configuration.

I do not know the syntax and structure of the omniORB make files well enough to
propose the nesecarry changes. Also, this is a "strategy" type issue, and should
be resolved by the omniORB people. I would otherwise like to assist in any way I
can.

--

A second issue is cross-compilation problems on win32 configurations.

The Pharlap ETS configuration  is an "embedded" configuration in the sense that
development is performed on a platform which is not the target platform.
It should also be possible to generate Win95/98 code on an NT platform and
vice-versa.

This introduces the need to have applications and tools build for the host
environment and libraries for a variety of target environments. This is not
properly dealt with in the make files.

A specific issue is that the Pharlap ETS readme file states that this
configuration builds only the library files. This is not correct. In addition,
there is some confusion with regard to the directory where the binaries are
built to/expected. I have made a couple of changes to my make files to overcome
this, but I do not know if these will break others code, so I would rather have
the issue resolved on a more general basis.

My changes are:

<orbhome>\mk\platforms\x86_ets.mk

Change line 15 from:

BINDIR = bin/x86_win32_ets
to:

BINDIR = bin/x86_win32


This ensures that the NT4.0 utility binaries are used also when building for the
ETS kernel.

This actually removes the need for the macro HOSTBINDIR.



<orbhome>\src\dir.mk

Change the lines at the beginning from:

SUBDIRS += tool
SUBDIRS += lib appl
to:

ifndef EmbeddedSystem

SUBDIRS += tool
endif
SUBDIRS += lib
ifndef EmbeddedSystem
SUBDIRS += appl
endif

This ensures that only the library files are built when making the ETS version
(or any configuration that defines EmbeddedSystem).


--

At last, I would like to report a small bug which prevents the Pharlap ETS
configuration from compiling:

<orbhome>\src\lib\omniORB2\orbcore\initFile.cc

initFile::~initFile at line 153 (v2.7.1), line 161 (v2.8.0 pre 1) :

Change the conditional preprocessor statement from:

#if defined(NTArchitecture)
to:

#if defined(__WIN32__) && !defined(__ETS_KERNEL__)


The conditional statement then matches the statement in the constructor.



--



I hope some of this makes it into the next/final release of v2.8.0.

Please contact me for comments or additional information.



Best regards,

Jon Kristensen
Kongsberg Simrad AS, Norway
phone:    +47 33 03 43 62
fax: +47 33 04 76 19
email:    jon.kristensen@kongsberg-simrad.com