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

Re: inventor on linux/alpha

To: Ognen Duzlevski <ogd116@xxxxxxxxxxxxx>
Subject: Re: inventor on linux/alpha
From: "Steve M. Robbins" <steven.robbins@xxxxxxxxxxxx>
Date: Thu, 11 Jul 2002 20:25:49 -0400
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.44.0207111450080.19615-100000@xxxxxxxxxxxxxxx>
References: <Pine.LNX.4.44.0207111450080.19615-100000@xxxxxxxxxxxxxxx>
Sender: owner-info-inventor-dev@xxxxxxxxxxx
User-agent: Mutt/1.4i
On Thu, Jul 11, 2002 at 03:42:31PM -0600, Ognen Duzlevski wrote:

> several people were interested in compiling inventor on linux/alpha - 

Hello.  The Debian project has been building inventor on several
architectures for some time now.  The alpha port succeeds in building
libInventor and libInventorXt, but then falls down building man pages :-/


> You will need the freetype2 stuff installed. I also built and installed 
> latest Mesa and lesstif. Then I downloaded a patched libFL from 
> http://www.cc.gatech.edu/~bbb/2001/Inventor/libFL-ben1.tar.gz

I have found that the "libFL/ang" shipped with inventor also works
(without all the hackery you required).  It's not clear to me which
copy of the library is newer.


> Backing down one level, if you do a make in the /inventor directory, it 
> will fail on the machine.h file in the lib/database/include since there is 
> no definition for a linux/alpha machine. The libFL that comes with 
> inventor is, I think, built for a intel x86 so that wont do but we took 
> care of that in the previous step. Now we need to update the machine.h 
> file - I just did the following:
> 
> #include <endian.h>
> #define MACHINE_WORD_FORMAT DGL_LITTLE_ENDIAN
> #define MACHINE_FLOAT_FORMAT DGL_BIG_IEEE

Here is an alternate & more general version of that change that we're
using at Debian:

Index: lib/database/include/machine.h
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/lib/database/include/machine.h,v
retrieving revision 1.1.1.2
diff -u -b -B -r1.1.1.2 machine.h
--- lib/database/include/machine.h      25 Sep 2001 00:45:32 -0000      1.1.1.2
+++ lib/database/include/machine.h      19 Feb 2002 19:11:41 -0000
@@ -164,6 +164,28 @@
 #endif
 
 
+/* Added for Debian by Steve M. Robbins */
+#if !defined(MACHINE_WORD_FORMAT)
+#   include <endian.h>
+
+#   if __BYTE_ORDER == __BIG_ENDIAN
+#       define MACHINE_WORD_FORMAT     DGL_BIG_ENDIAN
+#   elif __BYTE_ORDER == __LITTLE_ENDIAN
+#       define MACHINE_WORD_FORMAT      DGL_LITTLE_ENDIAN
+#   else
+#       error Inventor needs to be set up for your CPU type.
+#   endif
+
+#   if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+#       define MACHINE_FLOAT_FORMAT    DGL_BIG_IEEE
+#   else
+#       define MACHINE_FLOAT_FORMAT     DGL_NON_IEEE
+#   endif
+
+#endif
+
+
+
 
 /*
  * 32/64-bit architecture dependent statements
@@ -309,12 +331,10 @@
  */
 
 #if MACHINE_FLOAT_FORMAT == DGL_NON_IEEE
-#if __i386__ || __ia64__
 void mem_hton_float(float *t, float *f);
 void mem_ntoh_float(float *t, float *f);
 void mem_hton_double(double *t, double *f);
 void mem_ntoh_double(double *t, double *f);
-#endif /* __i386__ || __ia64__ */
 #define DGL_HTON_FLOAT(t,f) mem_hton_float(&t,&f)
 #define DGL_NTOH_FLOAT(t,f) mem_ntoh_float(&t,&f)
 #define DGL_HTON_DOUBLE(t,f) mem_hton_double(&t,&f)



With this change, the build on linux/alpha proceeds until "ivman" is used to 
build the manpage SoCenterballDragger.3iv, at which point it apparently 
coredumps [http://buildd.debian.org/build.php?arch=&pkg=inventor].
I haven't investigated further.

However, it builds successfully on several other architectures: arm,
i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc.

Cheers,
-Steve


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