Build sonic-pi 5.0#dev on Linux Mint 22.1 (Xia)
Hi Sonic Pi linux builders
Introduction
This is a very basic description of what is needed to build and run the development branch of Sonic-Pi on Linux Mint 22.1 (Xia)
(as requested by @samaaron )
Machine used is a VirtualBox clean install of the latest version of Linux Mint - and during the install I did agree to install all the media codecs. Pipewire is the default sound system on this version of Linux Mint and Sonic-Pi (above 4.5.0 ) expects to use this
Preparation
Use apt to install necessary packages
sudo apt-get install build-essential git curl qt6-tools-dev qt6-tools-dev-tools gcc-12 g++-12 libssl-dev ruby-dev erlang-dev erlang-xmerl cmake libaubio-dev libpng-dev libboost-filesystem-dev libboost-thread-dev qt6-svg-dev libxkbcommon-dev supercollider-server sc3-plugins-server alsa-utils libasound2-dev pipewire-audio-client-libraries pipewire-jack
The install of the jack will ask you whether you want to enable real-time priority - you should answer Yes
This will also create a file:
/etc/security/limits.d/audio.conf
which you will need to edit and un-comment the last line so it looks like this
@audio - rtprio 95
@audio - memlock unlimited
@audio - nice -19
You also need to be a member of the audio group, which in a Mint (and Ubuntu) install you are not a member of by default
sudo usermod -aG audio $USER
Add the Erlang PPA and install elixir and erlang packages
sudo add-apt-repository ppa:rabbitmq/rabbitmq-erlang
sudo apt update
sudo apt install elixir erlang-dev erlang-xmerl
You also need to create a link in /usr/bin for qmake to link to qmake6
sudo ln -s /usr/bin/qmake6 /usr/bin/qmake
( In my previous documentation, I did some stuff with qtchooser - but now you should avoid it, it appears to be broken and fixated on qt5 even if qt5 is not installed)
For these changes to be applied it is probably best to reboot at this point
Doing the Build of Sonic-Pi
mkdir Development
git clone https://github.com/sonic-pi-net/sonic-pi.git ~/Development/sonic-pi
cd Development/sonic-pi/app
We need to build with gcc-12 - not the default gcc-13 that is installed with build-essential. We installed gcc-12 and g++-12 at the start
We tell the build to use those by simply doing (one at a time):
export CC=gcc-12 CXX=g++-12 && ./linux-prebuild.sh
export CC=gcc-12 CXX=g++-12 && ./linux-config.sh
export CC=gcc-12 CXX=g++-12 && ./linux-build-gui.sh
export CC=gcc-12 CXX=g++-12 && ./linux-post-tau-prod-release.sh
OR
export CC=gcc-12 CXX=g++-12 && ./linux-build-all.sh
This script does all the previous 4 steps in one go
Running Sonic-Pi
After completion you can use the sonic-pi script in ~/Development/sonic-pi/bin
cd ~/Development/sonic-pi/bin
./sonic-pi &
This builds Sonic-Pi v5.0.0-beta-2 at the time of writing
Good luck and happy music making!
this is what i have done - but did not work maybe somebody could help to run with debian too
kernel: 6.1.0-37-amd64 arch: x86_64 bits: 64 Distro: LMDE 6 Faye System: Apple product: MacBookAir6
followed the installation
install necessary packages -> did run and i did not see any error but enable real-time priority have not been asked
this file is not there /etc/security/limits.d/audio.conf
in the directory i have two file 95-pipewire.conf audio.conf.disabled which i did not touch
sudo add-apt-repository ppa:rabbitmq/rabbitmq-erlang did not work on debian
but the sudo apt install elixir erlang-dev erlang-xmerl did work no error
export CC=gcc-12 CXX=g++-12 && ./linux-build-all.sh
is doing a error
Development/sonic-pi/app$ export CC=gcc-12 CXX=g++-12 && ./linux-build-all.sh
Compiling native ruby extensions...
Clearing /Development/sonic-pi/app/server/ruby/bin/../rb-native/3.1.0
Creating /Development/sonic-pi/app/server/ruby/bin/../rb-native/3.1.0
/usr/lib/ruby/3.1.0/fileutils.rb:243:in mkdir': Permission denied @ dir_s_mkdir - /Development/sonic-pi/app/server/ruby/bin/../rb-native (Errno::EACCES) from /usr/lib/ruby/3.1.0/fileutils.rb:243:in fu_mkdir'
from /usr/lib/ruby/3.1.0/fileutils.rb:221:in block (2 levels) in mkdir_p' from /usr/lib/ruby/3.1.0/fileutils.rb:219:in reverse_each'
from /usr/lib/ruby/3.1.0/fileutils.rb:219:in block in mkdir_p' from /usr/lib/ruby/3.1.0/fileutils.rb:211:in each'
from /usr/lib/ruby/3.1.0/fileutils.rb:211:in mkdir_p' from /Development/sonic-pi/app/server/ruby/bin/compile-extensions.rb:41:in
using sudo too
$ sudo export CC=gcc-12 CXX=g++-12 && ./linux-build-all.sh sudo: export: Befehl nicht gefunden
Hi
I'll see if I can build a virtualbox LMDE 6 Faye in a bit
Firstly, I think with "vanilla" Debian the default user is a member of the audio group by default. I'm not sure about whether the Mint version of Debian preserves that
to fix the issue with /etc/security/limits.d/audio.conf you can run
sudo dpkg-reconfigure -p high jackd2
I'm guessing you already had jackd2 installed, so that will be why it didn't ask you about enabling realtime priority
The other part of your issue - and this may just be a typo in your post - is to do with permissions in the folder you appear to be installing in.
ie. - /usr/lib/ruby/3.1.0/fileutils.rb:243:in mkdir': Permission denied @ dir_s_mkdir
This might be because you appear to be building in
/Development - which is in the root of your filesystem and you might not have full permissions there
which is different from
~/Development - which is a subfolder of your home folder, where you will have ownership of all the files and permissions to create sub directories
(Which is what the error you posted seems to indicate)