Opened 18 years ago

Closed 18 years ago

Last modified 9 years ago

#8670 closed defect (fixed)

UPDATE inventor-2.1.5-10 — at Version 3

Reported by: bhu@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.2
Keywords: Cc: cssdev@…
Port: inventor

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Inventor-2.1.5-10

Descritption: Inventor-2.1.5-10 doesn't work on Intel Macs because of endian issues. The symptoms are

  1. ivman fails at .../doc/man/man3/ivm/draggers/
  2. Binaries that use SoInput, e.g, SceneViewer seg-faults.

The solution is to patch .../lib/database/include/machine.h. The diff is as follows

--- machine.h   2006-04-30 14:27:27.000000000 -0400
+++ machine.h.new       2006-04-30 14:30:20.000000000 -0400
@@ -156,9 +156,15 @@
  */

 #ifdef __APPLE__
+#ifdef __LITTLE_ENDIAN__
+#define MACHINE_WORD_FORMAT    DGL_LITTLE_ENDIAN
+#define MACHINE_FLOAT_FORMAT   DGL_NON_IEEE
+
+#else

 #define MACHINE_WORD_FORMAT    DGL_BIG_ENDIAN
 #define MACHINE_FLOAT_FORMAT   DGL_BIG_IEEE
+#endif /* __LITTLE_ENDIAN__ */

 #endif /* __APPLE__ */

@@ -321,12 +327,12 @@
  */

 #if MACHINE_FLOAT_FORMAT == DGL_NON_IEEE
-#if __i386__ || __ia64__
+#if __i386__ || __ia64__ || ( __APPLE__ && __LITTLE_ENDIAN__)
 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__ */
+#endif /* __i386__ || __ia64__ || (__APPLE__ && __LITTLE_ENDIAN__) */
 #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)

Change History (5)

comment:1 Changed 18 years ago by cssdev@…

I cannot verify this yet, as I don't have an Intel Mac, but the fix seems pretty straight-forward. It just needs to be set formatted for inclusion within the port. Thanks for the fix!

Changed 18 years ago by cssdev@…

Attachment: patch-machine.h.diff added

Patch machine.h

Changed 18 years ago by cssdev@…

Attachment: patch-Portfile.diff added

Patch inventor Portfile

comment:2 Changed 18 years ago by mww@…

Resolution: fixed
Status: newclosed

o.k. folks, commited;

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: inventor added
Note: See TracTickets for help on using tickets.