Page 1 of 1

How to Build Sonic-Pi on Debian Buster

Posted: Thu Dec 12, 2019 11:09 pm
by oddy.o.lynx
Sonic Pi builds well on Debian Stretch but I encountered a few snags on Buster and thought I'd post my work around.

The current build uses older versions of SuperCollider, sc3-plugins and aubio and is looking for a version of rugged unavailable to Buster. Making slight modifcations to two files allows for everything to build without a hitch.

If you have SuperCollider and SC3-Plugins already installed (certainly if via apt) you might want to consider uninstalling/removing them before proceeding. If they are installed via git removing them first is also the safer step to take.

Sonic-Pi will build SuperCollider, sc3-plugins, aubio and osmid so it's a good idea to create a folder to build everything

if that folder is called sp-build, from a command prompt

Code: Select all

mkdir sp-build

Code: Select all

cd sp-build

Code: Select all

git clone https://github.com/samaaron/sonic-pi.git
====================================================

Edited Update March 6, 2020:

Since this tutorial was posted the Sonic Pi github repository has been updated with changes to its file and code structure,
In order to complete the build one more step is required:

Code: Select all

git checkout 27747def881a2c39545df3457d0cfa0ed50a69b9
====================================================

next step is to make a slight change to compile-extensions.rb
change to its folder...

Code: Select all

cd sonic-pi/app/server/ruby/bin
backup compile-extensions.rb

Code: Select all

cp compile-extensions.rb compile-extensions.rb.old
open compile-extensions.rb in a text editor

at line 45 change

Code: Select all

  File.expand_path(File.dirname(__FILE__) + '/../vendor/rugged-0.26.0/ext/rugged'),
to

Code: Select all

  File.expand_path(File.dirname(__FILE__) + '/../vendor/rugged-0.28.0/ext/rugged'),
now to the build folder

Code: Select all

cd ../../../gui/qt
make a backup of build-debian-app

Code: Select all

cp build-debian-app build-debian-app.old
make the following changes to build-debian-app

at line 8 change

Code: Select all

SUPERCOLLIDER_VERSION=3.9.1
SC_PLUGINS_VERSION=3.9.0 # 3.9.1 is currently in pre-release and I've had issues installing it, but 3.9.0 seems to work fine.
AUBIO_VERSION=c6ae035 # v0.4.6
OSMID_VERSION=391f35f789f18126003d2edf32902eb714726802
RUGGED_VERSION=0.26.0
to

Code: Select all

SUPERCOLLIDER_VERSION=3.10.3
SC_PLUGINS_VERSION=3.10.0
AUBIO_VERSION=0.4.9 
OSMID_VERSION=v0.6.8
RUGGED_VERSION=0.28.0
line 194 change

Code: Select all

#sudo gem install rugged
#cp -a "/var/lib/gems/2.3.0/gems/rugged-${RUGGED_VERSION}/." "../../server/ruby/vendor/rugged-${RUGGED_VERSION}/" # You may need to change this path slightly
to

Code: Select all

sudo gem install rugged -v '0.28.0'
cp -a "/var/lib/gems/2.5.0/gems/rugged-${RUGGED_VERSION}/." "../../server/ruby/vendor/rugged-${RUGGED_VERSION}/"
save file

Code: Select all

chmod 755 build-debian-app
./build-debian-app
if all goes well

Code: Select all

cd ../../..
chmod 755 run-debian-app
./run-debian-app

Re: Building Sonic-Pi on Debian Buster

Posted: Thu Dec 19, 2019 5:22 pm
by oddy.o.lynx
forgot to mention that the last step to get MIDI devices recognized is to move the osmid folder up one level

from

Code: Select all

app/server/native/linux/osmid/
to

Code: Select all

app/server/native/osmid

Re: How to Build Sonic-Pi on Debian Buster

Posted: Mon Jun 22, 2020 6:57 pm
by oddy.o.lynx
As an addendum, this tutorial is no longer relevant as Sonic-Pi builds successfully on Debian Buster by following the instructions located here

It now builds using cmake.