-
-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building v4.5.0 on Linux #3353
Comments
Installed SuperCollider Log:
Output is:
Guess I have to learn how to configure sound stuffs now. |
The latest source code calls the code in pw-jack directly so you don't need to use it explicitly but you do need to have it installed. Have a look at the build instructions for raspberry pi. They include running the pi_setup.sh script which install all the dependencies necessary to build using pipewire and wayland on Raspberry Pi. Linux should be very similar, but I don't think the build instructions have been updated yet. As of version 4.5 all linux 4.5 source code will expect pipewire environment. The biggest changes are in the daemon.rb file which is in sonic-pi/app/server/bin/ It certainly works on Debian bookworm. I had that running before we finalised Raspberry Pi. It is worth looking at the full log files in .sonic-pi/log if things go wrong. Expecially the daemon.log the scsynth.log but others also. |
This saved my week! Be sure to check out the stable branch, and build with environment variable $> |
New version of Can you update again @samaaron ? :) |
There is a new version of vcpkg: (https://github.com/microsoft/vcpkg/releases/tag/2023.12.12 @samaaron: This resolves an issue where The issue went away after I changed the VCPKG_BRANCH date from 2023.10.19 to its most current version of 2023.12.12 around line 32 in sonic-pi/app/linux-pre-vcpkg.sh and removed the sonic-pi/app/lvcpkg directore before running the build script again. |
I was able to compile on Ubuntu 22.0.4 LTS (jammy) after adding some packages. Also: Install dependency Using qpwgraph I was able to direct sound to HDMI (screen connected speakers) and bluetooth devices on top of default computer audio. To check what is going on with sonic-pi, actually Supercollider scsynth, and pipewire one can use the command I also recommend to install wireplumber as it seems to detect and connect to paired bluetooth devices when they are activated: 🙂 |
I've written a lengthy article about installing Sonic Pi v4.50 in Linux Mint 21.3 Virginia, which has a few significant differences from the build for Debian 12, a few packages that are required and have different names, and how to get Elixir 1.14 and qpwgraph, and issues with pipewire, and turning off pulseaudio so that pipewire becomes your default audio Added below, sorry it's a bit long winded, but it is gives all the reasons and how to pre-avoid the pitfalls from the start, rather than fix them as they crop up. So here goes: Building Sonic Pi v4.50 on Linux MintThese ideas for building Sonic Pi v4.50 work on Linux Mint 21.3 Virginia There are a few differences and difficulties you will find if you try to follow the instructions for building on Debian Bookworm https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-LINUX.md Firstly there are some packages on that page that do not exist in Linux Mint, namely qpwgraph You will also need to install a later version of Elixir as v4.50 needs Eixir 1.14, not 1.12. And you need to fix a couple of problems to switch over to using Qt6 and fix a missing Qt6 program that is no longer there by default. This Qt6 missing package is qt6-l10n-tools which adds lconvert And the biggest problem I found was swapping my sound input and output to Pipepwire, but more of that later. So let us fix some of those problems in advance before we even start building Sonic Pi Lets do the major, modified, apt get first, including that qt6-l10n-tools and also wireplumber - installing this latter program at the start might fix all the issues I had getting sound out of Sonic Pi with Pipewire. $ sudo apt-get install -y build-essential git libssl-dev ruby-dev erlang-dev erlang-xmerl qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev libqt6opengl6-dev supercollider-server sc3-plugins-server alsa-utils libasound2-dev cmake ninja-build libspa-0.2-jack qt6-wayland libwayland-dev libxkbcommon-dev libegl1-mesa-dev libx11-dev libxft-dev libxext-dev qt5-qmake compton wireplumber qt6-l10n-tools libspa-0.2-bluetooth This will ask if you wish to enable Realtime (RT) in your kernel, you should answer yes This will add /etc/security/limits.d/audio.conf You need to edit that file and uncomment the final line so that it reads: @Audio - rtprio 95 You also need to add your user to the audio group, although you might already be in that group if you have a more mature system... sudo usermod -aG audio $USER At this point, you have to logout to make yourself a member of the group, but a reboot is probably best, as that will also give you all the Realtime benefits - you do at least need to logout / close all sessions so why not reboot? Now let's use Elixir's own PPA repositories to get Elixir 1.14 See https://elixir-lang.org/install.html sudo add-apt-repository ppa:rabbitmq/rabbitmq-erlang You also need to make sure you are using the Qt6 qmake This involves using qtchooser $ sudo qtchooser -install qmake6 /usr/lib/qt6/bin/qmake Then use qtchooser to list versions $ qtchooser --list-versions and you should see 4 $ qmake6 --version Lets sort out qpwgraph now. I had to install this via a flatpak, otherwise you run into dependency issues if you search for the various .deb. packages that are available for Debian Bookworm or Ubuntu $ sudo flatpak install flathub org.rncbc.qpwgraph This will run it, but you will find it in your Mutimedia menu as qpwgraph $ flatpak run org.rncbc.qpwgraph (This runs it from the command line, it will be in your Multimedia menu by now, though) I don't think qpwgraph is necessary for the actual build, but it is useful if you have sound problems with Pipewire after the successful build. So that's all the prep and fixes to the issues that will crop up if you just follow the instructions for building on Debian Bookworm on the sonic Pi GitHub site So lets do the git clone, now git clone https://github.com/sonic-pi-net/sonic-pi.git ~/Development/sonic-pi cd ~/Development/sonic-pi/app and to build, now we've fixed all the potential problems Run the linux-build-all.sh script ./linux-build-all.sh This could take a 10 or more minutes, it also downloads extras it requires for the build, so you do need internet access to do the build It should complete without error, if you follow the guide above To run Sonic Pi, you can run ~/Development/sonic-pi/bin/sonic-pi However what I found was that I had no sound output, but I could record and play back So this is where you run into Pipewire vs Pulseaudio I found that I had to disable pulseaudio and make sure that pipewire (especially pipewire-media-session.service) was running pulseaudio runs as a user session, so to disable it: systemctl --user disable pulseaudio pulseaudio.socket and then enable the pipewire-media session: systemctl --user enable pipewire-media-session.service Then I rebooted In a VirtualBox VM running LinuxMint I found I had to install the libspa-0.2-bluetooth package as it was not there by default on a "Virtual" VM, so the pipewire-media-session was not running. I've included this in the big apt-get at the start of this guide. (edited to correct some bad typing) |
Related to #3344. microsoft/vcpkg#34709 has been fixed but there's no fixed release yet -- I'll keep an eye for it. Will leave this issue open as a reminder.
As a sort of update: I managed to build Sonic Pi in a Debian testing PC with the following:
VCPKG_BRANCH=master ./linux-build-all.sh
It's not there yet, however. When I run
./build/gui/qt/sonic-pi
the window is not rendered correctly, and I get the following in the terminal:I'll continue investigating this. Hopefully just a few missing dependencies and/or incorrect environment variables.
The text was updated successfully, but these errors were encountered: