Skip to content

Fails to launch in Ubuntu 24.01 #3445

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

Open
imeckler opened this issue Feb 17, 2025 · 7 comments
Open

Fails to launch in Ubuntu 24.01 #3445

imeckler opened this issue Feb 17, 2025 · 7 comments

Comments

@imeckler
Copy link

Error report below.

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 3.2.2
  • OS: Ubuntu 24.04.1 LTS

GUI Log

/home/izzy/.sonic-pi/log/gui.log

[GUI] - Welcome to the Sonic Pi GUI
[GUI] - ===========================
[GUI] -                            
[GUI] - {b53c7b41-f641-46c6-8d0e-73c9ea89673d}
[GUI] - Discovering port numbers...
[GUI] - Port entry server-listen-to-gui : 51235 : 51235
[GUI] - Port entry gui-send-to-server : 51235 : 51235
[GUI] - Port entry gui-listen-to-server : 51236 : 51236
[GUI] - Port entry server-send-to-gui : 51236 : 51236
[GUI] - Port entry scsynth : 51237 : 51237
[GUI] - Port entry scsynth-send : 51237 : 51237
[GUI] - Port entry osc-midi-out : 51238 : 51238
[GUI] - Port entry osc-midi-in : 51239 : 51239
[GUI] - Port entry server-osc-cues : 4560 : 4560
[GUI] - Port entry erlang-router : 51240 : 51240
[GUI] - Port entry websocket : 51241 : 51241
[GUI] - Detecting port numbers...
[GUI] - GUI listen to server port 51236
[GUI] -    port: 51236 [OK]
[GUI] - Server listen to gui port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Server incoming OSC cues port 4560
[GUI] -    port: 4560 [OK]
[GUI] - Scsynth port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Server send to GUI port 51236
[GUI] -    port: 51236 [OK]
[GUI] - GUI send to server port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Scsynth send port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Erlang router port 51240
[GUI] -    port: 51240 [OK]
[GUI] - OSC MIDI out port 51238
[GUI] -    port: 51238 [OK]
[GUI] - OSC MIDI in port 51239
[GUI] -    port: 51239 [OK]
[GUI] - Websocket port 51241
[GUI] -    port: 51241 [OK]
[GUI] - All ports OK
[GUI] - launching Sonic Pi Runtime Server:
[GUI] - Ruby server pid registered: 4630
[GUI] - hiding main window
[GUI] - initialising toolbar icons
[GUI] - setting up window structure
[GUI] - restoring scope states 
[GUI] - creating status bar
[GUI] - creating info panel
[GUI] - creating shortcuts
[GUI] - creating tool bar
[GUI] - initialising documentation window
[GUI] - wait for sync
[GUI] - waiting for Sonic Pi Server to boot...
[GUI] - starting UDP OSC Server on port 51236...
[GUI] - UDP OSC Server ready and listening
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - Critical Error. Unable to connect to server..
[GUI] - UDP OSC Server no longer listening

Server Errors

/home/izzy/.sonic-pi/log/server-errors.log

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
no message buffer overruns
no message buffer overruns
no message buffer overruns
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
JackTemporaryException : now quits...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
terminate called without an active exception

Server Output

/home/izzy/.sonic-pi/log/server-output.log

Sonic Pi server booting...
This is version 3.2.0 running on Ruby 3.2.3.
The time is 2025-02-16 20:39:09 -0800
Using primary protocol: udp
Detecting port numbers...
Listen port: 51235
  - OK
Scsynth port: 51237
  - OK
Scsynth send port: 51237
  - OK
OSC cues port: 4560
  - OK
Erlang port: 51240
  - OK
OSC MIDI out port: 51238
  - OK
OSC MIDI in port: 51239
  - OK
Websocket port: 51241
  - OK
Opening UDP Server to listen to GUI on port: 51235
Starting Server Runtime
Booting server...


Booting Sonic Pi
----------------

Booting on Linux
Jackd already running. Not starting another server...
Boot - Starting the SuperCollider server...
Boot - scsynth -u 51237 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 -B 127.0.0.1
Started [4643] [-] scsynth -u 51237 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 -B 127.0.0.1 [-] /tmp/sonic-pi-pids/4643
Failed to start server: SIGTERM
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/util.rb:599:in `wait'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/util.rb:599:in `kill_and_deregister_process'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb:224:in `rescue in boot_and_wait'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb:221:in `boot_and_wait'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb:443:in `boot_server_linux'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb:151:in `boot'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb:37:in `initialize'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/server.rb:78:in `new'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/server.rb:78:in `initialize'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:192:in `new'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:192:in `init_scsynth'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/studio.rb:57:in `initialize'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/lang/sound.rb:89:in `new'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/lang/sound.rb:89:in `block (2 levels) in included'
/usr/lib/sonic-pi/app/server/ruby/lib/sonicpi/lang/ixi.rb:72:in `block (2 levels) in included'
/usr/lib/sonic-pi/app/server/ruby/bin/sonic-pi-server.rb:302:in `new'
/usr/lib/sonic-pi/app/server/ruby/bin/sonic-pi-server.rb:302:in `<main>'

Scsynth Output

/home/izzy/.sonic-pi/log/scsynth.log

# Starting SuperCollider 2025-02-16 20:39:09
Found 0 LADSPA plugins
jackdmp 1.9.21
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2022 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
Released audio card Audio0
audio_reservation_finish
could not initialize audio.

Process Log

/home/izzy/.sonic-pi/log/processes.log

No pids store found here: /tmp/sonic-pi-pids
Exiting
Creating pids store: /tmp/sonic-pi-pids
Started [4630] [-] /usr/bin/ruby -E utf-8 /usr/lib/sonic-pi/app/server/ruby/bin/sonic-pi-server.rb -u 51235 51236 51237 51237 4560 51240 51238 51239 51241 [-] /tmp/sonic-pi-pids/4630
Started [4643] [-] scsynth -u 51237 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -b 4096 -B 127.0.0.1 [-] /tmp/sonic-pi-pids/4643


Clearing pids: ["4630", "4643"]

Clearing [4630]
  -- command /usr/bin/ruby -E utf-8 /usr/lib/sonic-pi/app/server/ruby/bin/sonic-pi-server.rb -u 51235 51236 51237 51237 4560 51240 51238 51239 51241
  -- removing /tmp/sonic-pi-pids/4630
  -- politely killing 4630

@rbnpi
Copy link
Contributor

rbnpi commented Feb 17, 2025

Unfortunately version 3.2.2 is not suitable to run on Ubuntu 24.04.1 as you have foun. In common with most modern Linux it uses pipewire to handle audio, and version 3.2.2 is setup to use jackd This linux package is produced externally and independently of the Sonic Pi developers, and has not been upgraded. Sonic Pi does not lend itself very well to the creation of a standard debian package, although it does build fairly easily from source. In the past I have produce binary packages to install Sonic Pi on Ubuntu, but unfortunately I only have access to Macs, and thus can only build for arm based cpu on virtual machines.
There is however an altenative flatpak Sonic Pi which will run on 24.04.1 although I have seen a report of difficulties with it on 24.10. You might life to try using that instead. https://flathub.org/apps/net.sonic_pi.SonicPi

@idommason
Copy link

Just as a note

I built v4.5.1 on a VirtualBox Ubuntu 24.04 yesterday

PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"

I followed my write up of installing on Linux Mint Virginia that can be found here:

#3396

Differences:

Install the following additional packages:

sudo apt install curl python3-jinja2 gcc-12 gxx-12

(So don't do the pip3 install jinja2 )

and the method of installing qpwgraph was not correct, but that isn't required for building so I didn't look at that

The main problem I found is that Ubuntu comes with gcc 13 so you have to install gcc 12 alongside and use that, as part of the build process fails with gcc 13 (13.3.0) - something to do with gmake (I think)

The proper way to do this is use an export line:

export CC=gcc-12 CXX=g++-12 && ./linux-prebuild.sh

export CC=gcc-12 CXX=g++-12 && ./linux-build-all.sh

This successfully built and plays sounds, I think there may be some limitations with virtualbox VMs though, especially as my host system is still using pulseaudio (to get audio in and out of VirtualBox), and the Ubuntu VM is using pipewire...

But it was a successful build

@samaaron
Copy link
Collaborator

BTW, sorry for dropping the ball earlier - but if you'd like to roll this into your mint-specific build docs - it would be great to see a pull request so that I could merge it into the source so it can help all the other mint users out there :-)

@idommason
Copy link

@samaaron I'll see what I can do

I did upload a BUILD-LINUX-MINT.md previously on that #3396 post

Here:

https://github.com/sonic-pi-net/sonic-pi/files/15283663/BUILD-LINUX-MINT.md

(I'm more of an OS support person, not a dev (at all) and I'm not much of a git user, so a bit scared of pushing something to someone else's public git repo)

@samaaron
Copy link
Collaborator

samaaron commented Mar 6, 2025

@idommason - I've actually made quite a few changes to the build system to (hopefully) make things easier for Linux users. The main highlight is that vcpkg is no longer used on Linux builds - which was something constantly causing friction.

It would be really great if when you next have a spare moment, you can try building Sonic Pi from the latest dev branch and amend your build files if necessary. Then I can pull them into the source :-)

@idommason
Copy link

@samaaron Hi Sam

I've just downloaded the current latest version of Linux Mint (22.1) , so I'll get a VirtualBox install of that, and do a build of 5.0 #dev

... and see what happens

@idommason
Copy link

idommason commented Mar 8, 2025

@samaaron

I've now done a build of 5.0.0 beta2 on (a vanilla VirtualBox install of) Linux Mint 22.1) and have ran all of the build scripts individually and then fixed all the things that broke

QT6 needs fixing (as a linux mint issue) so I cheated that, there's probably a better way than what I used. I did a workaround which someone familiar with QT development will probably sneer at, but I couldn't find a specific answer for. qtchooser appears to
have been deprecated in the debian / ubuntu systems as it is broken on anything above QT5, and sonic-pi requires QT6

and it looks as though gcc-13 is still broken so you have to use gcc-12 and g++-12

I'll do a new thread on the specifics in a while. And then see if I can do a .md

But on the whole it looks a though the build process is a lot simpler - but then again I've got some familiarity of what to look for when it breaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants