[omniORB] omniORB2.8.0pre1 on FreeBSD-CURRENT

Thimble Smith tim@desert.net
Sun, 22 Aug 1999 20:38:10 -0700


Hi.  I just compiled omniORB2.8.0pre1 on FreeBSD-CURRENT (4.0).  I want
to share what I did, and find out how to make it easier for others to do
the same thing.

I copied mk/platforms/x86_freebsd_3.2.mk to x86_freebsd_4.0.mk and made
some minor changes (egcc => cc, eg++ => c++, bumped os version number).
I added platform = x86_freebsd_4.0 to config/config.mk.

I ran:

    $ cd src
    $ gmake


I had three problems.  First, FreeBSD's <ctype.h> has this define:

    #define _T      0x00100000L     /* Special */

lib/omniORB2/bootstrap.hh, which is included after <ctype.h>, has this
code:

      class ObjIdList_var {
      public:
        typedef ObjIdList _T;
        typedef ObjIdList_var _T_var;

        inline ObjIdList_var() : pd_seq(0) {}
        inline ObjIdList_var(_T* s) : pd_seq(s) {}

There are other uses of _T, then, throughout the file.  There are
probably other places where this occurs.  I added these lines after
every #include <ctype.h>:

    #ifdef _T
    #undef _T
    #endif

I've read / been told that ANSI C reserves names beginning with two
underscores, and names consisting of an underscore and a single capital
letter, for the implementation.  I don't know how hard it would be for
omniORB2 to not use those names.  If those names have to be used, then
it would be good to have some mechanism for making sure they are not
defined when they are used in the source.


My second problem was with building several of the binaries (omniNames
and the appl/utils/* programs).  The problem was that the required
libraries were not listed on the linking line.  For example,

    c++ -pthread -s -o omniNames -O2 -Wall -Wno-unused -L../../../lib/x86_f
    reebsd_4.0 omniNames.o NamingContext_i.o log.o

Most of the utils were missing only -lomnithread.  For example,

    c++ -pthread -s -o convertior -O2 -Wall -Wno-unused -L../../../../lib/x
    86_freebsd_4.0 convertior.o -lomniORB2 -lomniDynamic2 -ltcpwrapGK

nameclt was missing all of the libraries, just like omniNames.


My third problem was with making the examples.  I actually only made the
echo/eg1 example so far.  But there was no rule to create the echo.hh and
echoSK.cc files from echo.idl.  Once I did that with omniidl2, the make
rules did not make echoSK.o or link echoSK.o with echo.o when creating
the eg1 executable.


If there's anything I can do (provide more information, make diffs, test
patches, etc.) please let me know.

Tim