Opened 19 years ago

Closed 19 years ago

Last modified 9 years ago

#8670 closed defect (fixed)

UPDATE inventor-2.1.5-10

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)

Attachments (2)

patch-machine.h.diff (1.0 KB) - added by cssdev@… 19 years ago.
Patch machine.h
patch-Portfile.diff (728 bytes) - added by cssdev@… 19 years ago.
Patch inventor Portfile

Download all attachments as: .zip

Change History (5)

comment:1 Changed 19 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 19 years ago by cssdev@…

Attachment: patch-machine.h.diff added

Patch machine.h

Changed 19 years ago by cssdev@…

Attachment: patch-Portfile.diff added

Patch inventor Portfile

comment:2 Changed 19 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.