Advance MAME won't make a working compile on Ubuntu 17.10
-
Advance MAME (advmame) doesn't work on ubuntu 17.10 (x64) with Retropie 4.3.7
It seemed to compile OK, but games would not start.
Looking at /dev/shm I get the error:*** stack smashing detected ***: <unknown> terminated
-
@neo-rio It's probably because Ubuntu 17.10 turned on the
-fstack-protector
compiler option by default. Try to disable this when compiling advmame and see if it fixes the error. -
@mitu
Do you know which config file this is in so that I can turn it off and try compiling again? -
@neo-rio Try modifying the advmame compile line in
~/RetroPie-Setup/scriptmodules/emulators/advmame.sh
(make a backup of the file first). Around line 40 (https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/emulators/advmame.sh#L40) replace/configure --prefix="$md_inst"
with
CFLAGS="-fno-stack-protector" /configure --prefix="$md_inst"
After this modification, try to re-build from source and see if you get the same error while running a ROM. Make sure you revert the change after you're done, since an update of the RetroPie-Setup script will fail because of a local modification.
-
Good news is that this fix worked. I got advanceMame working now.
I suppose this mod will have to be added to updated versions of retro-pie.
-
@neo-rio IMHO it should be reported upstream, since this error is triggered when checking for buffer overflows:
-fstack-protector
Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with vulnerable objects. This includes functions that call alloca, and functions with buffers larger than 8 bytes. The guards are initialized when a function is entered and then checked when the function exits. If a guard check fails, an error message is printed and the program exits. -
@mitu said in Advance MAME won't make a working compile on Ubuntu 17.10:
CFLAGS="-fno-stack-protector"
I created a pull request in github.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.