Closed d10sfan closed 1 year ago
Hello. There were few changes between versions 1.10.2 and 1.10.3.
First change: -mtune=generic has been replaced in CMakeLists.txt with -march=native to be compatible with Raspberry PI. https://github.com/tx00100xt/SeriousSamClassic-VK/commit/dd84a2180bd0cccaa5d74e3c19503dc75752dbbe
If it is done for everyone, then it is better to return -mtune=generic.
find . -name "CMakeLists.txt" -exec sed -i 's/-march=native/-mtune=generic/g' {} +
The second change concerns the timer.
In version 1.10.2, the OPTEX (optimized mutex) section was restored from win32 code. https://github.com/tx00100xt/SeriousSamClassic-VK/commit/9f7e1ccc4c8bd948c35e23185d13b94ca7aa1af6
It worked correctly on GCC 10.xx and it became incorrect to work in GCC 11.xx. Between versions 1.10.2 and 1.10.3 there was a fix for 11.xx. https://github.com/tx00100xt/SeriousSamClassic-VK/commit/a22b4e0d11cc895371a2ae4135b3dea0582d43cd
You can try building with USE_SINGLE_THREAD = TRUE, since I didn't find any difference between builds with USE_SINGLE_THREAD = TRUE and USE_SINGLE_THREAD = FALSE.
find . -name "CMakeLists.txt" -exec sed -i '/^option(USE_SINGLE_THREAD/s/FALSE/TRUE/g' {} +
The third fix looks at the possibility of placing executable files in /usr/bin. libraries in /usr/lib and data in /usr/share https://github.com/tx00100xt/SeriousSamClassic-VK/commit/77712ea8ef6daee5fd91a7677670ff26e6676310 , as well as searching for game data in the home directory https://github.com/tx00100xt/SeriousSamClassic-VK/commit/6276882f2e03edd6cfb505bb3239e193d2e288ef https://github.com/tx00100xt/SeriousSamClassic-VK/commit/48143b121a150e55e9ee386456b92f8060a88655 . And placing all user files in the home directory https://github.com/tx00100xt/SeriousSamClassic-VK/commit/d9d3386a0060af95d4581d3d95972adb94ea3bbf. I don't think this should cause the game to crash.
Other changes between versions 1.10.2 and 1.10.3 are not fundamental
Since the Github Action is used for building and subsequent use for everyone https://github.com/luxtorpeda-dev/packages/actions/runs/4560400259/workflow https://github.com/luxtorpeda-dev/packages/actions/runs/4560400259/jobs/8045305806, I would recommend trying to change -march=native to -mtune=generic first.
find . -name "CMakeLists.txt" -exec sed -i 's/-march=native/-mtune=generic/g' {} +
For the sake of interest, I inserted the lines into the Workflow file:
echo "=== native ==="
gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1
echo "=== generic ==="
gcc -v -E -x c /dev/null -o /dev/null -mtune=generic 2>&1 | grep /cc1
https://github.com/tx00100xt/SE1-TSE-OddWorld/actions/runs/4565752992/jobs/8057310670#step:3:255
As you can see, with the "-march=native" key, the compilation will be optimized for the server running gcc. In addition,
Illegal instruction.
hints to us that the execution is on a hardware different from the one for which it was optimized. I think that changing "-march=native" to "-mtune=generic" in the "CMakeLists.txt " file should solve the problem.
Thanks! mtune=generic fixed it for me, and now the build works on my system. Thanks for the help!
I'm seeing a strange crash immediately after starting on Linux, 1.10.2 works fine, so it seems like something was introduced after that.
This happens immediately after attempting to launch the game, I see the following if I try running with gdb, I get the following stack trace. Let me know if there's anything other information you need or if you see something I'm doing wrong here.
I'm making a build script, you can see it here for reference: https://github.com/luxtorpeda-dev/packages/blob/44560873121aebbf2240b77892933197647fdf47/engines/serious-engine/build.sh