sonic-pi-net / sonic-pi

Code. Music. Live.

Home Page:https://sonic-pi.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building v4.5.0 on Linux

siiky opened this issue · comments

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:

Starting Sonic Pi...
                                ╘
                         ─       ╛▒╛
                          ▐╫       ▄█├
                   ─╟╛      █▄      ╪▓▀
         ╓┤┤┤┤┤┤┤┤┤  ╩▌      ██      ▀▓▌
          ▐▒   ╬▒     ╟▓╘    ─▓█      ▓▓├
          ▒╫   ▒╪      ▓█     ▓▓─     ▓▓▄
         ╒▒─  │▒       ▓█     ▓▓     ─▓▓─
         ╬▒   ▄▒ ╒    ╪▓═    ╬▓╬     ▌▓▄
         ╥╒   ╦╥     ╕█╒    ╙▓▐     ▄▓╫
                    ▐╩     ▒▒      ▀▀
                         ╒╪      ▐▄

       _____             __        ____  __
      / ___/____  ____  /_/____   / __ \/_/
      \__ \/ __ \/ __ \/ / ___/  / /_/ / /
     ___/ / /_/ / / / / / /__   / ____/ /
    /____/\____/_/ /_/_/\___/  /_/   /_/

   The Live Coding Music Synth for Everyone

            http://sonic-pi.net

sh: 1: pw-jack: not found
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
ERROR SuperCollider:in_1 not a valid port
ERROR SuperCollider:in_2 not a valid port
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QPainter::begin: Paint device returned engine == 0, type: 1
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

 8< -------------------------------------------------

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
[API] [INFO ] : API deconstructor initiating shutdown...
[API] [INFO ] : Initiating shutdown...
[API] [INFO ] : Shutdown already initiated...
QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled

I'll continue investigating this. Hopefully just a few missing dependencies and/or incorrect environment variables.

Installed pipewire-jack (for pw-jack) and it goes just a little bit further. A window titled "Audio Server Boot Error" appears saying "Sorry, the Audio Server failed to start..." etc.

SuperCollider Log:

Found 0 LADSPA plugins
could not initialize audio.
terminate called without an active exception

Output is:

Starting Sonic Pi...
                                ╘
                         ─       ╛▒╛
                          ▐╫       ▄█├
                   ─╟╛      █▄      ╪▓▀
         ╓┤┤┤┤┤┤┤┤┤  ╩▌      ██      ▀▓▌
          ▐▒   ╬▒     ╟▓╘    ─▓█      ▓▓├
          ▒╫   ▒╪      ▓█     ▓▓─     ▓▓▄
         ╒▒─  │▒       ▓█     ▓▓     ─▓▓─
         ╬▒   ▄▒ ╒    ╪▓═    ╬▓╬     ▌▓▄
         ╥╒   ╦╥     ╕█╒    ╙▓▐     ▄▓╫
                    ▐╩     ▒▒      ▀▀
                         ╒╪      ▐▄

       _____             __        ____  __
      / ___/____  ____  /_/____   / __ \/_/
      \__ \/ __ \/ __ \/ / ___/  / /_/ / /
     ___/ / /_/ / / / / / /__   / ____/ /
    /____/\____/_/ /_/_/\___/  /_/   /_/

   The Live Coding Music Synth for Everyone

            http://sonic-pi.net

Error. Unable to write to log file: closed stream
#<IOError: closed stream>
QLayout: Attempting to add QLayout "" to MainWindow "", which already has a layout

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.
There is also an environmental variable QT_INSTALL_LOCATION which is set in pi_build-gui.sh It will be needed on the linux build if using qt6. I think from memory the value was /usr/lib/qt6 for a 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 VCPKG_BRANCH=master.

$> VCPKG_BRANCH=master ./linux-build-all.sh

New version of vcpkg: https://github.com/microsoft/vcpkg/releases/tag/2023.11.20

Can you update again @samaaron ? :)