Open Aurnytoraink opened 5 years ago
@RavengamerSpace if you'd be interestedin creating a Flatpak package for Linux that would be amazing! Unfortunately currently I don't have enough resources to support Linux, I'm hoping that the community might be able to step up and help make this happen :-)
I'm trying to flatpak 3.2.2.
However the build / install doc is lacking or inaccurate (it refer to scripts that no longer exist), and the result is that SonicPi seems to be unable to launch the server.
A few problems:
dbus-launch
but this is not available in the flatpak sandbox (and unecessary).--devel
(a flatpak option).If I can get it to work I'll definitely submit it to flathub.
Also I'll need to create a .desktop
and appstream metainfo file.
@hfiguiere - awesome that you're looking to get a flatpack version of Sonic Pi.
Apologies that the instructions are slightly outdated. We've gone through significant changes to how we build Sonic Pi. I've personally been focussing on improving the build instructions for macOS and Windows as these are our main supported platforms.
At this stage, I would take the macOS instructions as your starting point before I get round to updating things. I'd also look towards v3.3 as this is not so far from being released. There are just a couple of niggling issues with the new MIDI infrastructure but I don't expect any major changes - just minor tweaks :-)
I would have thought the Raspberry Pi would be supported. That would be a better starting point as all the issues I have encountered are mostly Linux specific.
I don't personally have the resources to support Raspberry Pi OS or any Linux at this stage. However, @rbnpi has been working extensively on the Pi and is the creator of the v3.2 binary deb that we distribute. He might be able to help you if you're sure you want to work on v3.2.2.
However, as I mentioned v3.3 isn't so far off and the build instructions will be pretty similar to macOS with the exception of having to pull a bunch of deps in - which of course, will vary depending on your linux distro and version.
The policy is to only submit releases so yes I look at 3.2.2. I don't mind changing things if a new version comes out.
Hi, this sounds like a cool idea :) I've had some experience with building and running sonic pi on linux, but in terms of packaging I don't have any experience. In terms of packages, @rbnpi made a binary .deb package for raspberry pi, and some people have packaged sonic pi for Debian Bullseye (https://packages.debian.org/bullseye/sonic-pi https://salsa.debian.org/multimedia-team/sonic-pi)
When you say the server doesn't start, does the GUI give a boot/startup error? If so could you post it here so we can help debug? (I wouldnt be surprised if it's an issue with starting jack)
Making a .desktop file should be fairly easy (I remember making one for it a while ago) Would we need a different one for flatpak and for a standard system package? (Since the commands to run sonic pi are different)
I found the debian packaging since.
No difference needed for the .desktop file. I'm using the one in the debian package for now.
I found why the server didn't start. Lack of ruby in the runtime (--devel uses the SDK which has it). Problem solved.
As a note the flatpak won't be supported on arm (32 bits) but will be supported aarch64. This is because the SDK/runtime needed is no longer built for arm, and an older SDK can't be used because of JACK.
Concering 3.3 building sp_midi doesn't work because it doesn't find the erl_nif.h
header. There is no way to tell it were to find the erlang headers...
That file is provided on Debian by the erlang-dev
package, if that helps?
that doesn't.
/usr/include
. The other platforms reflect that too: $PREFIX/lib/erlang/usr/include
I was just looking at the json file, and I saw this: https://github.com/flathub/flathub/blob/468b62395a3ab130e6beead0a12b3aeac43da137/net.sonic_pi.SonicPi.json#L70-L74 Could this remove the erlang header files before building sp_midi? (Sorry, I don't know a lot about how flatpaks work)
About the erlang path, https://github.com/sonic-pi-net/sonic-pi/issues/2444#issue-638082208 has a command line that could be run in the prebuild script to pass down to the cmake.
I opened #2543 for the erlang path issue.
It's available for x86_64 and aarch64 (ARM 64-bits, which is not the default OS on raspberry pi).
https://flathub.org/apps/details/net.sonic_pi.SonicPi
Note that because of JACK, there are still rough edges with the Flatpak, depending on the host Linux distro.
For reference, the Pipewire issue for the Flatpak + JACK issue https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/446
(Pipewire JACK is what is available to Flatpak apps)
What don't you use Flatpak packages for Linux ? It would be more easy to build and more people will be able to test it.