info-inventor-dev
[Top] [All Lists]

Re: Open Inventor modifications to build under Linux on Intel Itaniumpl

To: Rasmus Tamstorf <tamstorf@xxxxxxxxxxxxx>
Subject: Re: Open Inventor modifications to build under Linux on Intel Itaniumplatform
From: Mick Pont <mick@xxxxxxxxx>
Date: Fri, 02 Nov 2001 17:36:52 +0000
Cc: info-inventor-dev@xxxxxxxxxxx
References: <Pine.SGI.4.10.10111020750080.2690-100000@annie.fan.fa.disney.com>
Sender: owner-info-inventor-dev@xxxxxxxxxxx
Rasmus Tamstorf wrote:
> 
> On Fri, 2 Nov 2001, Mick Pont wrote:
> 
> >
> > A colleague of mine, Silhacene Aid, needed to build Open Inventor
> > under Linux on Intel Itanium, and did so successfully. Silhacene no longer
> > works with me, but he asked me to try to find out whether the changes
> > he made would be useful to feed back into the OIV source code. I append
> > a README that Silhacene wrote, which gives brief details of the sorts
> > of changes he made. Do they look to be more generally useful?
> > I know that apart from building on the Itanium, the modified
> > code was also tested on several other UNIX machines.
> >
> >  The main modifications are :
> >
> >  - Added IS_64BIT switch for 64-bit platforms.
> >
> >  - Added switch GLU_TESS_VOID to take into account variants
> >    of function type in call to gluTessCallback.
> >
> >  - Added NO_MENU_IN_OVERLAY_PLANES switch to disable overlay
> >    planes if necessary. This follows a suggestion from
> >    Steve Conolly (see the Inventor mailing lists at the
> >    SGI Web site.)
> >
> >  - Added ICONV_BUG switch to account for a possible problem
> >    with the iconv library.
> 
> This one has been discussed many a time, so I sure hope something gets
> done about it !
> 
> >  - Made class destructors virtual whenever a class contains
> >    virtual functions.
> >
> >  - Use of size_t instead of  uint32_t or int.
> >
> >  - Removed redefinition of NULL as 0.
> 
> >  - Use of standard mathematical functions (e.g. sqrt, atan2
> >    rather than sqrtf atan2f.)
> 
> This one is probably not a good idea for performance reasons.

I think that Silhacene replaced them because the f versions don't always exist.
Some machines define them as macros, sometimes they have different
names. Do you think using sqrt instead of sqrtf really makes that big
a difference to performance?

> 
> >  - Renaming of functions, macros or variables to avoid conflicts
> >    with system macros (e.g. abs -> oivabs, _ABS -> _OIVABS,
> >    dprintf -> oiv_d_printf.)
> >
> >  - Moved definitions from header file mysetjmp.h
> >    to a new C++ file mysetjmp.c++.
> >
> >  - Made variables 'const' where necessary.
> >
> >  - Removed some unused variables.
> >
> >  - Added standard header files where necessary (stdlib.h,
> >    unistd.h)
> >
> >  - Replaced malloc.h by stdlib.h.
> 
> Some of the above have been fixed in the latest tar-ball.
> 
> >  - Replaced alloca by malloc.
> 
> This, again, is not a good idea for performance reasons. 'alloca' is
> considered non-portable, but it is *sooo* much faster than malloc, that
> it's worth keeping it wherever possible.

At NAG we've been severely burned by code which used alloca, and wasted
plenty of time tracking down the cause. I don't know if Silhacene had
specifically run into problems with alloca in Open Inventor, or just
replaced it to avoid possible problems.

> 
> >  - Switched off use of dlopen in
> >    inventor/lib/database/src/so/SoType.c++
> 
> Why ?

I guess for portability.

> 
> >  - Fixed sprintf/fprintf formats.
> >
> >  - Removed hard-coded definitions and replaced them by inclusion
> >    of image.h header file in
> >    inventor/lib/database/src/so/SoOffscreenRenderer.c++
> >
> >  - Added support for Itanium in
> >    inventor/lib/database/include/machine.h
> >
> >  - Broke up very long lines into shorter lines
> >    (SoHandleBoxDraggerGeom.h, SoTransformerDraggerGeom.h) since
> >    some compilers cannot handle them.
> 
> Yay :-) I've requested this one too, but to no avail :-/
> 
> >  - Replaced a fixed-length buffer by a call to malloc
> >    (in inventor/libFL/ang/fl.c)
> >
> >  - Changed C++-style comments to C-style comments.
> 
> Why would that be necessary ?

Some C compilers just won't compile C++ style "//" comments!

Mick
mick@xxxxxxxxx

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

<Prev in Thread] Current Thread [Next in Thread>