HarbourMasters / Shipwright

3.18k stars 482 forks source link

Compile failed at final step (raspberry Pi) #3870

Open TotalCoolness opened 8 months ago

TotalCoolness commented 8 months ago

Im trying to compile for raspberry pi 5.

At the final step of compilation I get this error:

` [278/872] Building CXX object soh/CMakeFiles/soh.dir/soh/resource/type/Skeleton.cpp.o In file included from /home/pifive/shipofhark/Shipwright/soh/soh/resource/type/Skeleton.cpp:3: In file included from /home/pifive/shipofhark/Shipwright/soh/./soh/OTRGlobals.h:7: /home/pifive/shipofhark/Shipwright/soh/./soh/Enhancements/item-tables/ItemTableTypes.h:46:1: warning: typedef requires a name [-Wmissing-declarations] typedef struct GetItemEntry { ^~~ In file included from /home/pifive/shipofhark/Shipwright/soh/soh/resource/type/Skeleton.cpp:3: In file included from /home/pifive/shipofhark/Shipwright/soh/./soh/OTRGlobals.h:19: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/Context.h:8: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/config/Config.h:8: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/window/Window.h:9: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/window/gui/Gui.h:12: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/window/gui/InputEditorWindow.h:13: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/controller/controldevice/controller/Controller.h:13: In file included from /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/controller/controldevice/controller/ControllerButton.h:8: /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h:6:1: warning: typedef requires a name [-Wmissing-declarations] typedef enum KbEventType { ^~~ /home/pifive/shipofhark/Shipwright/soh/../libultraship/src/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h:13:1: warning: typedef requires a name [-Wmissing-declarations] typedef enum KbScancode { ^~~ In file included from /home/pifive/shipofhark/Shipwright/soh/soh/resource/type/Skeleton.cpp:3: In file included from /home/pifive/shipofhark/Shipwright/soh/./soh/OTRGlobals.h:21: In file included from /home/pifive/shipofhark/Shipwright/soh/./soh/Enhancements/randomizer/randomizer.h:13: /home/pifive/shipofhark/Shipwright/soh/./soh/Enhancements/custom-message/CustomMessageManager.h:206:17: warning: variable 'message' is uninitialized when used here [-Wuninitialized] sprintf(message, "Message from table %s with textId %u was not found", messageTableId.c_str(), textId); ^~~ /home/pifive/shipofhark/Shipwright/soh/./soh/Enhancements/custom-message/CustomMessageManager.h:205:22: note: initialize the variable 'message' to silence this warning char* message; ^ = nullptr /home/pifive/shipofhark/Shipwright/soh/soh/resource/type/Skeleton.cpp:52:23: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare] for (int i = 0; i < skeletons.size(); i++) ~ ^ ~~~~ 5 warnings generated. ninja: build stopped: subcommand failed.

`

Any help please ?

gustavostuff commented 8 months ago

It may not be the case but maybe it's the RAM (8GB at least are recommended), how much RAM do you have in your PI?

TotalCoolness commented 8 months ago

It may not be the case but maybe it's the RAM (8GB at least are recommended), how much RAM do you have in your PI?

4 GB

Alto1772 commented 8 months ago

I could not determine your given output log above if what caused the build to fail as the error by the compiler is overshadowed by the other warnings from other compiler processes. You can try to rerun the build command again by appending the -j1 flag at the end then copy & paste the output here when it finishes.

retropieuser commented 7 months ago

Afraid it runs out on memory even with -j1 used:-

https://pastebin.com/7Hr8wkJM

Anyone who sees this and wants to attempt with a pi 5 8GB I'd like to know the result

retropieuser commented 7 months ago

I got it working, I wrote my process down here but essentially the advice I got was to increase the swap memory. I'm curious if that's a requirement of the 8gb pi 5 (or pi4)

https://retropie.org.uk/forum/topic/35182/guide-how-to-add-ocarina-of-time-pc-port-to-retropie-pi5-64bit

JoshuaPettus commented 7 months ago

Better yet, I would look into enabling ZRAM for swap on the raspberry pi rather than using your sdcard as swap. Doing so is much better performant and avoids a lot of compiling issues for larger applications without possibly hurting the life of your sd card.

fac3l3ss79 commented 6 months ago

I managed to compile and run soh successfully on RPI 4/400 with bullseye 32 bit. GCC-11 and SDL2 2.26.5 were need and used to compile and soh will run with necessary shared libraries. It seems to be totally playable (only major slowdown is in the screen were you create and choose save file, but that happens on pi 5 as well).