How to Build Sonic-Pi on Debian Buster

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

Post Reply
oddy.o.lynx
Established Member
Posts: 115
Joined: Sat Jun 30, 2018 2:54 am
Has thanked: 22 times
Been thanked: 22 times

How to Build Sonic-Pi on Debian Buster

Post 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
Last edited by oddy.o.lynx on Fri Mar 06, 2020 10:06 pm, edited 3 times in total.
oddy.o.lynx
Established Member
Posts: 115
Joined: Sat Jun 30, 2018 2:54 am
Has thanked: 22 times
Been thanked: 22 times

Re: Building Sonic-Pi on Debian Buster

Post 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
oddy.o.lynx
Established Member
Posts: 115
Joined: Sat Jun 30, 2018 2:54 am
Has thanked: 22 times
Been thanked: 22 times

Re: How to Build Sonic-Pi on Debian Buster

Post 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.
Post Reply