First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 61529
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Maciej J. Woloszyk <mat@esi.com.pl>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
duke3d-20040817-endian_patch duke3d-20040817-endian_patch patch Maciej J. Woloszyk 2004-08-24 09:58 0000 772 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 61529 depends on: Show dependency tree
Show dependency graph
Bug 61529 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-08-24 09:48 0000
After emerging Duke Nukem 3D (duke3d-20040817.ebuild) I found out that while
it compiles fine it refuses to start with the message "Not enough memory for
file grouping system".

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




After some digging I found that there is an endianness problem - game does 
necessary byte-swapping only on Mac. Below is the patch that solved the 
problem for me. 
 
------------------------------ duke3d-20040817-endian_patch  
--- duke3d/source/buildengine/platform.h        2003-08-07 
12:06:17.000000000+0200 
+++ duke3d.new/source/buildengine/platform.h    2004-08-24 
18:35:05.292291088+0200 
@@ -5,6 +5,7 @@ 
 #include "win32_compat.h" 
 #elif (defined PLATFORM_UNIX) 
 #include "unix_compat.h" 
+#include <endian.h> 
 #elif (defined PLATFORM_DOS) 
 #include "doscmpat.h" 
 #else 
@@ -60,9 +61,15 @@ 
 #define BUILDSWAP_INTEL16(x) _swap16(x) 
 #define BUILDSWAP_INTEL32(x) _swap32(x) 
 #else 
+#if __BYTE_ORDER == __LITTLE_ENDIAN 
 #define PLATFORM_LITTLEENDIAN 1 
 #define BUILDSWAP_INTEL16(x) (x) 
 #define BUILDSWAP_INTEL32(x) (x) 
+#else 
+#define PLATFORM_BIGENDIAN 1 
+#define BUILDSWAP_INTEL16(x) _swap16(x) 
+#define BUILDSWAP_INTEL32(x) _swap32(x) 
+#endif 
 #endif 
 
 extern int has_altivec;  /* PowerPC-specific. */ 
-----------------------------------------------------------

------- Comment #1 From Maciej J. Woloszyk 2004-08-24 09:58:59 0000 -------
Created an attachment (id=38105) [edit]
duke3d-20040817-endian_patch

------- Comment #2 From Chris Gianelloni (RETIRED) 2004-08-24 10:12:28 0000 -------
Just curious, but have you checked to see if this has been fixed upstream?

------- Comment #3 From Maciej J. Woloszyk 2004-08-24 10:14:24 0000 -------
Nope. I just wanted to see it running on my machine _now_ ;)

------- Comment #4 From Lars Weiler (RETIRED) 2004-08-24 21:27:39 0000 -------
Curious, the homepage just describes a Linux/x86 and a Mac OS X/ppc port.  No
Linux/ppc port.  So I'm not sure if it will run on Linux/ppc.

dholm, you set the ~ppc keyword.  Tell us more ;-)

------- Comment #5 From Maciej J. Woloszyk 2004-08-24 23:15:27 0000 -------
Well... Without the change I did it compiled but crashed (wrong byte swapping
due to wrong endianness). After the change it starts fine, plays the intros
etc. Then I started the game - it worked too but not fast enough as for my
liking so I played for maybe two minutes and quited. So for me - now it is
properly marked as ~ppc as it does run to some extent.

------- Comment #6 From SpanKY 2004-08-26 19:44:36 0000 -------
awesome, added to cvs, thanks ... also e-mailed it upstream

------- Comment #7 From Ryan C. Gordon 2004-08-26 23:10:45 0000 -------
(This is in the upstream CVS now. Thanks for the patch!)

--ryan.

First Last Prev Next    No search results available      Search page      Enter new bug