Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
04318 Compiling Major Always Apr 22, 2011, 17:16 Apr 22, 2011, 23:15
Tester jordi View Status Public Platform SDLMAME
Assigned To Resolution Open OS Linux
Status [?] Acknowledged Driver
Version 0.141 Fixed in Version Build
Fixed in Git Commit Github Pull Request #
Summary 04318: memory alignment issues for several Linux architectures
Description SDLMAME fails to build on several Linux architectures supported by Debian, all with a common problem:

Compiling src/osd/sdl/sdlsocket.c...
Compiling src/osd/sdl/sdlmisc_unix.c...
In file included from src/emu/emucore.h:38:0,
                 from src/emu/emu.h:53,
                 from src/osd/sdl/sdlsocket.c:26:
src/lib/util/astring.h:367:6: note: the mangling of 'va_list' has changed in GCC 4.4
cc1plus: warnings being treated as errors
In file included from src/emu/emu.h:69:0,
                 from src/osd/sdl/sdlsocket.c:26:
src/emu/memory.h: In member function 'UINT16 direct_read_data::read_raw_word(offs_t, offs_t)':
src/emu/memory.h:805:84: error: cast from 'UINT8*' to 'UINT16*' increases required alignment of target type
src/emu/memory.h: In member function 'UINT16 direct_read_data::read_decrypted_word(offs_t, offs_t)':
src/emu/memory.h:812:90: error: cast from 'UINT8*' to 'UINT16*' increases required alignment of target type
src/emu/memory.h: In member function 'UINT32 direct_read_data::read_raw_dword(offs_t, offs_t)':
src/emu/memory.h:825:84: error: cast from 'UINT8*' to 'UINT32*' increases required alignment of target type
src/emu/memory.h: In member function 'UINT32 direct_read_data::read_decrypted_dword(offs_t, offs_t)':
src/emu/memory.h:832:90: error: cast from 'UINT8*' to 'UINT32*' increases required alignment of target type
src/emu/memory.h: In member function 'UINT64 direct_read_data::read_raw_qword(offs_t, offs_t)':
src/emu/memory.h:845:84: error: cast from 'UINT8*' to 'UINT64*' increases required alignment of target type
src/emu/memory.h: In member function 'UINT64 direct_read_data::read_decrypted_qword(offs_t, offs_t)':
src/emu/memory.h:852:90: error: cast from 'UINT8*' to 'UINT64*' increases required alignment of target type
Compiling src/osd/sdl/sdlos_unix.c...
src/osd/sdl/sdlsocket.c: In function 'file_error sdl_open_socket(const char*, UINT32, osd_file**, UINT64*)':
src/osd/sdl/sdlsocket.c:59:48: error: cast from 'char*' to 'in_addr*' increases required alignment of target type

Affected are, at least: ARM, ia64, MIPS and SPARC64.

See the build logs in https://buildd.debian.org/status/logs.php?pkg=mame&ver=0.141-2.

I'm not sure if fixing this would allow builds to succeed for these “exotic” architectures using NOASM, but if it did, it'd pave the path to use MAME on cheap ARM-based boards, which sounds like a good thing. :)

(Note that s390 failed in a totally unrelated way; I'll have a look at that at some point, but I would be incredibly suprised if a single person in this planet does install and run MAME on a s390 server. :)
Steps To Reproduce
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
2
User avatar
No.07393
Tafoid
Administrator
Apr 22, 2011, 17:33
Also, since this appears to be an SDL specific issue, you would be better served by posting at the SDLMAME forum if the problem persists with 0.142 (current working base is 0.142u1):
http://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=8
User avatar
No.07395
R. Belmont
Developer
Apr 22, 2011, 23:15
I'm not sure this is fixable - MAME assumes all over the place (not just there) that you're running on something with fairly relaxed alignment restrictions like x86 or PowerPC. I'll run it by Aaron though since he knows that area of the code better.