Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06801 Compiling Major Always Dec 25, 2017, 14:58 Apr 30, 2022, 09:37
Tester cuavas View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Open OS Windows 10 (64-bit)
Status [?] Confirmed Driver
Version 0.192 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 06801: Can't link SDL builds on Windows with GCC 7
Description

SDL builds for Windows fail to link with GCC 7 (it works with GCC 5 or GCC 6).


32-bit link error:


Linking sdlmame.exe...
C:/Users/_merlin/msys64/mingw32/lib\libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x12e): undefined reference to `qMain(int, char**)'
collect2.exe: error: ld returned 1 exit status
mame.make:252: recipe for target '../../../../../sdlmame.exe' failed

64-bit link error:


Linking sdlmame64.exe...                                                                                                        
../../../../mingw-gcc/bin/x64/Release/liblualibs.a: error adding symbols: Malformed archive
collect2.exe: error: ld returned 1 exit status
mame.make:252: recipe for target '../../../../../sdlmame64.exe' failed
make[2]: *** [../../../../../sdlmame64.exe] Error 1

In the 64-bit case, liblualibs.a is not malformed - the same static archive library can be successfully linked into the Win32 OSD version of MAME. Changing the order of the objects in liblualibs.a changes the error message, but it fails to link in any case. The tools link successfully, only the emulator fails.

Steps To Reproduce Build with OSD=sdl in your make arguments.
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
4
User avatar
No.14563
Robbbert
Senior Tester
Dec 26, 2017, 00:51
Fixed typo.
User avatar
No.20117
Robbbert
Senior Tester
Apr 28, 2022, 14:01
GCC 7 is no longer supported, so is this still an issue?
User avatar
No.20123
cuavas
Administrator
Apr 29, 2022, 05:28
GCC 7 is still the minimum supported compiler version for building MAME. I don’t have an MSYS64 setup with such an old GCC version though. It seem odd that this only happens in such specific circumstances – it really looks like a bug in the linker.
User avatar
No.20133
Robbbert
Senior Tester
Apr 30, 2022, 09:37
You're right, 7.2 is the minimum according to the compiling page, so it must apply to 7.x (I assumed 7.0 only).