THE GREMLINS strike again. Unfortunately two vital commands were missed out in the script, which build the erlang beam files. Now added in ver2 which is shown below.
I have spent some time working on a script to enable you to build Sonic Pi 3.2.0 release tag version on Raspbian Buster.
This has been tried out on a pristine SD card containing version 2020-02-05, with sudo apt update and sudo apt upgrade applied.
The script is only about 40 lines long, and does everything, including downloading the source, plus a patch folder (from my own website), and it then builds a working version.
Included in the download is a separate install folder, which lets you install the build sonic-pi in /opt where the original versions used to be before a deb was produced. It also creates a desktop file and inserts an entry in the main memu so that you can start it from there. The install folder also contains instructions on reducing the size of the built install folder, to remove all the files whicdh are not needed after you have done the build, thus resulting in a smaller installed file. There is also a remove script which copies the sonic-pi folder back out from /opt and deletes the desktop entry.
EDIT ver 3 of script shown below. Make sure you use this one if you downloaded the first or secondversion. This version says #version 3
#!/usr/bin/env bash
#script by Robin Newman to build Sonic Pi 3.2.0 release on Raspbian Buster 2020-02-05
#version 3 with correct build of erlang beam files included
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SOURCE_DIR=$SCRIPT_DIR/spsrc
echo $SCRIPT_DIR
echo $SOURCE_DIR
sudo apt-get install -y \
g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev \
libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake \
libqt5svg5-dev qt5-qmake qt5-default \
qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
qtpositioning5-dev libqt5sensors5-dev libqt5opengl5-dev qtmultimedia5-dev libffi-dev \
curl python erlang-base libssl-dev libaubio5 supercollider-server
mkdir -p $SOURCE_DIR
cd $SOURCE_DIR
wget https://github.com/samaaron/sonic-pi/archive/v3.2.0.tar.gz
wget http://r.newman.ch/rpi/sp32RpiPatches.tar.gz
echo "extracting Sonic Pi source.."
tar -zxf v3.2.0.tar.gz
echo "extracting patch scripts.."
tar -zxf sp32RpiPatches.tar.gz
extract install folder
mv sp32RpiPatches/spInstall ./
cd sp32RpiPatches
echo "applying patches..."
rsync -a qt/ ../sonic-pi-3.2.0/app/gui/qt/
cd ../sonic-pi-3.2.0/app/gui/qt/
echo "compiling vendor extensions..."
../../server/ruby/bin/compile-extensions.rb
echo "running unix-prebuild script..."
./unix-prebuild.sh
echo "build beam files.."
cd ../../server/erlang
/usr/bin/erlc osc.erl
/usr/bin/erlc pi_server.erl.erl
cd ../../gui/qt
echo "running unix_config script..."
./unix-config.sh
echo "building gui and sonic-pi app..."
cd build
cmake --build .
echo "build complete"
The script could be more polished, but it does the job in around 25 minutes from scratch.
ISSUES
I have noticed an erl.crashdump file being produced as the program starts. However the system works despite this. (midi and OSC all tested) This needs more investigation. It may be due to the version of erlang-base on the pi.
TRANSPARENCY
a small external script can be run to enable/disable this, which I hope to add tomorrow. There are ways of incorporating it in the system for it to be enabled automatically on startup.
OTHER LINUX
A similar script could be produced for other distro, but there are differences. Ubuntu for example needs libaubio5 to be built (at least for 18.04.4) but this is built in to the Sonic Pi source, althouhg i have disabled it on the Pi build as the apt package for libaubio5 works fine. Also I needed to install more up to date ruby and cmake on Ubuntu 18.04.
FINALLY
I would appreciate feedback on how it works.
There is further work going on to make the build process better, but this script will work with the released source at 3.2.0