# Ver 3: Build script for Sonic Pi 3.2.0 for Raspberry Pi

**URL:** <https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369>\
**Category:** Support, Help & Resources\
**Created:** [February 29, 2020, 6:46pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369 "2020-02-29T18:46:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 29, 2020, 6:46pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/1 "2020-02-29T18:46:43Z")

</div>

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

```ruby
#!/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

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [February 29, 2020, 7:21pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/2 "2020-02-29T19:21:44Z")

</div>

good evening !

Tonight no raspberry pi on my side to test right now. So gonna try under ubuntu 18.04.04.

> [@robin.newman](#):
>
> Also I needed to install more up to date ruby and cmake on Ubuntu 18.04.

Could you tell us which version for both of them ?

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [February 29, 2020, 7:24pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/3 "2020-02-29T19:24:26Z")

</div>

` CMake 3.12 or higher is required. You are running version 3.10.2`  
ok the script output tells me 🙂

> <https://stackoverflow.com/questions/49859457/how-to-reinstall-the-latest-cmake-version>

building in progress now 🙂

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [February 29, 2020, 8:50pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/4 "2020-02-29T20:50:03Z")

</div>

Yes ! ! !

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/e/e0eca93fdda0af8986fcc4c69cab4834e70de405.png)

Thanks a lot @robin.newman !

So i can confirm your script works under ubuntu 18.04.04.

First remove the cmake too old version from your ubuntu 18.04.04 and install cmake as said before.

then copy / paste this into a file scriptInstallSpi3.2-RobinWay.sh

```ruby
#!/usr/bin/env bash
#script by Robin Newman to build Sonic Pi 3.2.0 release on Raspbian Buster 2020-02-05

# nlb test for ubuntu 18.04.04 - good !

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# you can change the name of the installation sources
SOURCE_DIR=$SCRIPT_DIR/sp_Src
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" running unix_config script..."
./unix-config.sh
echo "building gui and sonic-pi app..."
cd build
cmake --build .
echo "build complete" 

```

then make this executable  
` chmod +x script scriptInstallSpi3.2-RobinWay.sh`

then launch the script :  
`./scriptInstallSpi3.2-RobinWay.sh`  
Take a beer or a coffee or an English Tea

When you see `build complete`, go ahead and :

```ruby
nlb@devbox:~/audio/robinNewmanWay$ 
nlb@devbox:~/audio/robinNewmanWay$ cd sp_Src/sonic-pi-3.2.0/
nlb@devbox:~/audio/robinNewmanWay/sp_Src/sonic-pi-3.2.0$ cd bin/
nlb@devbox:~/audio/robinNewmanWay/sp_Src/sonic-pi-3.2.0/bin$ ./sonic-pi &

```

you can test and play a little game of “tennis de table”

```ruby
live_loop :tennis_de_table do
  use_synth :piano
  with_fx :ping_pong do
    play [:c3, :c2, :b6, :b6+0.15,
          72, 72.25,72.5, :c2-0.15].tick, sustain: 0.1
    sleep 0.5
  end
end

```

EDIT : No midi and osc for the moment. will see tomorrow.

Hope it works for you !

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 29, 2020, 8:53pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/5 "2020-02-29T20:53:46Z")

</div>

I’m out at a show tonight! Will try later. You can also amend my patches to build libaubio5 as well. Well done with your build.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [February 29, 2020, 9:08pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/6 "2020-02-29T21:08:02Z")

</div>

yes you’re right osc and midi can’t work for now. Tomorrow ia another day. Have a good show !

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 29, 2020, 10:55pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/7 "2020-02-29T22:55:00Z")

</div>

I have put a different set of patches on my website and if you substitute the qt folder contained in these for the qt folder contained in sp32RPiPatches then the build should include libaubio5 which will be stored in the folder /app/server/native/lib  
you can get them from `wget http://r.newman.ch/rpi/sp32scripts.tar.gz`  
If you extract the folder `tar zxf sp32scripts.tar.gz` you should then use the contained folder qt instead of the qt folder inside the sp32RPiPatches folder for building on Ubuntu 18.0.4

For Ubuntu 18.04.4 I installed cmake using [https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86\_64.sh](https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.sh)  
and installed it in `/opt/cmake/cmake-3.16.4-Linux-x86_64/`

I did a` ln -s /opt/cmake/cmake-3.16.4-Linux-x86_64/bin/cmake /usr/local/bin/cmake`

for ruby I installed rvm using this page [https://github.com/rvm/ubuntu\_rvm](https://github.com/rvm/ubuntu_rvm)  
following the instructions on the page.  
I then did `rvm install 2.6.3-dev`  
and made it the default ruby using  
`rvm --default use 2.6.3-dev`

The packages installed I think were.

```ruby
sudo apt-get install -y \
     g++ pkg-config git build-essential jackd libjack-jackd2-dev \
     libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
     libreadline6-dev libfftw3-dev libxt-dev libudev-dev \
     libqt5svg5-dev qt5-qmake qt5-default libqt5websockets5-dev qtwebengine5-dev \
     qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
     qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev \
     libqt5opengl5-dev curl python erlang-base qjackctl

```

I’m working on a script similar to the Raspberry Pi one to put all this together.  
You also need to build supercollider and sc3-plugins. I used version 3.10.4 and  
3.10.0 respectively.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [March 1, 2020, 7:32pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/8 "2020-03-01T19:32:05Z")

</div>

Hi,

> [@robin.newman](#):
>
> You also need to build supercollider and sc3-plugins

I got already on my computer `scide` aka SuperCollider Ide installed. version 3.9.1

So i just have installed rvm to installthe ruby version you mentioned and add your two lines and midi works

```ruby
#!/usr/bin/env bash
#script by Robin Newman to build Sonic Pi 3.2.0 release on Raspbian Buster 2020-02-05

# nlb test on ubuntu 18.04.04 - midi and osc ok 

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# you can change the name of the installation sources
SOURCE_DIR=$SCRIPT_DIR/sp_Src
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" running unix_config script..."
./unix-config.sh

echo "build beam files.."
/usr/bin/erlc ../../server/erlang/osc.erl
/usr/bin/erlc ../../server/erlang/pi_server.erl.erl

echo "building gui and sonic-pi app..."
cd build
cmake --build .
echo "build complete" 

```

So the situation is as this :

- midi is detected and receive midi note and midi control change

```ruby
use_synth :piano
# only one note no chords possible
live_loop :test_midi do
  use_real_time
  note, velocity = sync "/midi:apc_key_25_midi_1:5:2/note_on"
  puts note
  play note
  sleep 0.125
end

```

- can’t send midi note or maybe because the new syntax
- osc seems not to work

Could you tell me if i have missed a step for osc to work ?

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 1, 2020, 9:02pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/10 "2020-03-01T21:02:39Z")

</div>

Yes there is a mistake in the script…however I am just doing final testing on a similar script dedicated to installing in Ubuntu18.04.4 Hopefully published tomorrow.

In the meantime I think that the beam files are probably not set up for you.  
You can do this by navigating to sp-source/app/server/erlang  
then running

```ruby
/usr/bin/erlc osc.erl
/usr/bin/erlc pi_server.erl

```

That should produce files osc.beam and pi\_server.beam  
Then try running again.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [March 1, 2020, 9:09pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/11 "2020-03-01T21:09:59Z")

</div>

Great ! ! ! ! Solved : osc is working and midi can send notes !

"Last night @robin.newman saved my life with that script "

Thanks for all your work and patience !

---

<div class="post-metadata">

**Author:** ![lozdown](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@lozdown](https://in-thread.sonic-pi.net/u/lozdown)\
**Post date:** [March 10, 2020, 11:51pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/12 "2020-03-10T23:51:28Z")

</div>

I’ve followed this build process on ubuntu 19.10 using the script posted by @robin.newman 29/2, and revised with the update posted by @robin.newman Mar 1.

I now have a working spi3.2 on ubuntu 19.10 with OSC working. Great work by everyone and thank you all very much.

I am not able to control spi using sonic-pi-tool.py ( python cli for sonic-pi [https://github.com/emlyn/sonic-pi-tool](https://github.com/emlyn/sonic-pi-tool) which (mostly) works on earlier versions of sonic-pi. I’ve put more information on this posting [http://in-thread.sonic-pi.net/t/what-spi-3-2-control-port-to-use-for-cli-tool/3433](http://in-thread.sonic-pi.net/t/what-spi-3-2-control-port-to-use-for-cli-tool/3433)

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 11, 2020, 7:13am UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/13 "2020-03-11T07:13:36Z")

</div>

see this answer [here](http://in-thread.sonic-pi.net/t/what-spi-3-2-control-port-to-use-for-cli-tool/3433/3)

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [March 11, 2020, 5:09pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/14 "2020-03-11T17:09:34Z")

</div>

Hi @nlb, hi @robin.newman

I tried to run your @nlb’s script based on Robin’s work, and get (last 13 lines of the otherwise seemingly successful run of the script):

```ruby
Scanning dependencies of target sonic-pi
[100%] Building CXX object CMakeFiles/sonic-pi.dir/sonic-pi_autogen/mocs_compilation.cpp.o
[100%] Linking CXX executable sonic-pi
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In Funktion »_start«:
(.text+0x20): Warnung: undefinierter Verweis auf »main«
collect2: error: ld returned 1 exit status
CMakeFiles/sonic-pi.dir/build.make:92: recipe for target 'sonic-pi' failed
make[2]: *** [sonic-pi] Error 1
CMakeFiles/Makefile2:98: recipe for target 'CMakeFiles/sonic-pi.dir/all' failed
make[1]: *** [CMakeFiles/sonic-pi.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
build complete

```

The result is that:

```ruby
/app/gui/qt/build/sonic-pi

```

will not be build.

Any suggestions?

Note: The german warning “Warnung: undefinierter Verweis auf …” says something like: “Warning: undefined reference to …”

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 11, 2020, 6:39pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/15 "2020-03-11T18:39:33Z")

</div>

Are you building on Ubuntu 18.04.4? or on Raspbian Buster?

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [March 11, 2020, 7:47pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/16 "2020-03-11T19:47:30Z")

</div>

Oh, sorry… I am building on Ubuntu 18.04, Bionic Beaver (actually Mint 19.3 based on that).

Right now my actual goal is to build a version based on the latest developement tree, because of [Runtime - temporarily patch memory leak (partially)](https://github.com/samaaron/sonic-pi/commit/c3895b5f09eb332929db5853ed5df85c560ef4c1) and my hope is that this will fix some issues for an upcoming gig (this is really hazardous, I know, but isn’t live coding this anyway, plus: if all breaks I have another system to boot with a SP 3.1 which is at least enough to make music 😉 ) I don’t even need Midi and/or OSC.

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 11, 2020, 10:12pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/17 "2020-03-11T22:12:15Z")

</div>

I’ve just built the latest version of the distribution successfully on Ubuntu18.04.4  
I am using ruby-2.6.3-dev installed via rvm  
I am also using cmake 3.16.4 installed from a binary.  
I think I had to install a ruby bundler gem to get the new fast-osc version to build. Also, compile-extensions tries to build the gem interception but stops the program. It is the last vendor gem processed and in fact doesn’t need building so it doesn’t matter.  
Other than that I used my script.  
Looking at the errors you have.

```ruby
CMakeFiles/sonic-pi.dir/build.make:92: contains 
sonic-pi_autogen/EWIEGA46WW/qrc_SonicPi.cpp: ../images/toolbar/default/dark-size-up.png

```

Don’t know if this is helpful. They are dynamically built files and may well differ in your case.

But at least my experience is that the build should be possible.

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [March 12, 2020, 6:43am UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/18 "2020-03-12T06:43:46Z")

</div>

Hi Robin,

thanks for the feedback. I did not update Ruby (currently using 2.5.1p57), maybe that’s it? Well, I will do and try again this afternoon.

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [March 12, 2020, 5:13pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/19 "2020-03-12T17:13:02Z")

</div>

Yeah. It works (I guess because I did install the latest Ruby, which I skipped before). I still have to test but seem to have a running 3.2… now. Thanks Robin!

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 12, 2020, 6:45pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/20 "2020-03-12T18:45:51Z")

</div>

Great. Well done. It will be interesting to hear your comments on memory leaks with the work that has gone on to reduce it,

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [March 12, 2020, 7:00pm UTC](https://in-thread.sonic-pi.net/t/ver-3-build-script-for-sonic-pi-3-2-0-for-raspberry-pi/3369/21 "2020-03-12T19:00:47Z")

</div>

Yes, will be one of the first things to look at…

EDIT: Seems to be much, much better now 🙂 .
