Problems in building Sonic Pi from source on Ubuntu 20.04

I have tried to build Sonic Pi on Ubuntu 20.04 but at the last step the process fails in building Sonic Pi. This is the error I get in the terminal window:
verbgio@verbgio-S500CA:~/Development/sonic-pi/app/gui/qt/build$ cmake --build . --config Release
[ 0%] Automatic MOC for target QScintilla
[ 0%] Built target QScintilla_autogen
[ 98%] Built target QScintilla
[ 99%] Automatic MOC for target sonic-pi
[ 99%] Built target sonic-pi_autogen
[ 99%] Linking CXX executable sonic-pi
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main’
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sonic-pi.dir/build.make:93: sonic-pi] Errore 1
make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/sonic-pi.dir/all] Errore 2
make: *** [Makefile:84: all] Errore 2

Hopefully you have sorted this out by now, but if not please try the latest source. At a guess I would say you were having problems linking with Qt. The github action on Sonic Pi builds on Linux, so you could also consult the build script to see what is different about your setup.

2 Likes

Oh yes, good point! @verbgio - definitely worth trying the latest source, and otherwise like Chris says checking the build script for any possible clues about differences :slightly_smiling_face:

1 Like

This is the build workflow; you need to look at the generic sections or the ones with ‘ubuntu-latest’ as a filter.

sonic-pi/build.yml at main · sonic-pi-net/sonic-pi (github.com)