sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.81k stars 922 forks source link

Build process error at qrc_SonicPi.cpp.o #2823

Open julynervs opened 3 years ago

julynervs commented 3 years ago

I tried to build sonic-pi on Raspberry Pi OS following https://github.com/sonic-pi-net/sonic-pi/blob/main/BUILD-LINUX.md When I put command cmake --build . --config Release everything runs ok until that at 91% of the build process the machine stops when working on qrc_SonicPi.cpp.o and print this error

c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [gui/qt/CMakeFiles/sonic-pi.dir/build.make:3658: gui/qt/CMakeFiles/sonic-pi.dir/sonic-pi_autogen/EWIEGA46WW/qrc_SonicPi.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:184: gui/qt/CMakeFiles/sonic-pi.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Could someone help me with this?

rbnpi commented 3 years ago

I suspect this may be because of in sufficient virtual RAM during the build process. I have experienced this on some hardware setups. The solution is to create (or increase the size of) your swap file. There are several articles on doing this that you can Google eg https://kalitut.com/raspberry-pi-swapping/ Depending on your SD card free capacity you can set it to 1024 or 2048 and this should enable the build process to complete. Afterwards, you can switch it back to the initial size.

julynervs commented 3 years ago

I did set to 2048 and now the process freezes on building of qrc_help_files.cpp.o

rbnpi commented 3 years ago

Which Pi model are you using? How much RAM does it have? You may have to go even higher. The fact the error has shifted on to building the help files suggest this is the problem. The help files build consumes the largest amount of memory. As long as you have sufficient free space on your SD card this is the way to go I think. You can revert once the build is complete.

julynervs commented 3 years ago

Raspberry Pi 3 Model B Rev 1.2 with 1024Mb of RAM and my SD card has 128GB...

rbnpi commented 3 years ago

I'm sure the lack of RAM is the build problem.

ethancrawford commented 3 years ago

Hi @julynervs - have you tried increasing the swap size any further?