SpaceCadetPinball
SpaceCadetPinball copied to clipboard
Error when building on PowerPC OSX leopard
Hi, I was trying to build this project on my power mac under OSX and im getting an error when running make:
In file included from /Users/Mac/SpaceCadetPinball/build/CMakeFiles/SpaceCadetPinball.dir/cmake_pch.hxx:5,
from <command line>:1:
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:20:19: error: cstdint: No such file or directory
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:21:48: error: type_traits: No such file or directory
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:22:18: error: chrono: No such file or directory
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:30:18: error: thread: No such file or directory
In file included from /Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:51,
from /Users/Mac/SpaceCadetPinball/build/CMakeFiles/SpaceCadetPinball.dir/cmake_pch.hxx:5,
from <command line>:1:
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/imgui_sdl.h:1: error: stray '\239' in program
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/imgui_sdl.h:1: error: stray '\187' in program
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/imgui_sdl.h:1: error: stray '\191' in program
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/imgui_sdl.h:1: error: stray '#' in program
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:39: error: expected constructor, destructor, or type conversion before 'int'
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/imgui_sdl.h:1: error: 'pragma' does not name a type
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:56: error: expected constructor, destructor, or type conversion before 'char'
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:82: error: expected constructor, destructor, or type conversion before 'int'
/Users/Mac/SpaceCadetPinball/SpaceCadetPinball/pch.h:104: error: expected constructor, destructor, or type conversion before 'const'
make[2]: *** [CMakeFiles/SpaceCadetPinball.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/SpaceCadetPinball.dir/all] Error 2
make: *** [all] Error 2
The weird thing is that it just compiles and works under debian on PowerPC so im guessing its not an issue related to endianess.
Any ideas what might be causing it? I'm pretty new to compiling on OSX so please don't laugh about me if I made a really dumb mistake.
Hello.
Based on missing header errors, it looks like your compiler does not support some of c++ 11 features. The game should compile on PPC, but it would not work anyway. To run on PPC, it will need big-endian game data, and it does not exist. Not sure how it works for you in Debian PPC. Big-endian console ports modify game data during loading, my mainline version of the game does not.
If i were to use the loading mechanism from the wii version or just convert the game data by hand and then used a newer gcc release, could it actually run?
Yes, it should run if you use big-endian code or game data. It running mostly depends on working SDL library.
Ok, so its now building and starts but the big endian data files just make it say that there is no data and the little endian files get detected but error out later down the line as expected. Any ideas? maybe a checksum that's now not matching?
I removed the code that threw the error just as a test and it got further but after opening the game window it segfaulted.
So, I went through the code and changed all the loading parts to convert to big endian first and compiled it and now it freaking works! The colors are a bit weird but the game runs fine and at full speed and even sound works. Just need to polish a few things and then ill release my powerpc OSX and powerpc Linux fork to the public.
It is good that the game works for you. Weird colors are probably caused be wrong ARGB color order in BE.
Working version is available here: https://github.com/iAmInActions/SpaceCadetPinballPPC
I also made a pull request that adds the universal loading mechanism that works with big and little endian systems.
I have figured out the cause of the weird colors too: nouveau was to blame as always.
As of now it only builds under linux but im going to add instructions and prebuild binaries for OSX soon.
Closed the PR again as I had an unfixed bug in my code that i want to fix first.
@iAmInActions nice work mate. If you are plan to restart the universal loading mechanism, let me know. I could help you test with ppc64le/be on Linux