sonic-pi icon indicating copy to clipboard operation
sonic-pi copied to clipboard

Can't install the flatpak

Open tallestlegacy opened this issue 3 years ago • 24 comments

I've been getting this problem for months, shame on me for not reporting sooner

1. [✗] org.kde.Platform       5.15-21.08   i    flathub     44.7 MB / 306.3 MB
2. [ ] net.sonic_pi.SonicPi   stable       i    flathub  < 255.6 MB

Error: Error pulling from repo: GPG verification enabled, but no signatures found (use gpg-verify=false in remote config to disable)
error: Failed to install org.kde.Platform: Error pulling from repo: GPG verification enabled, but no signatures found (use gpg-verify=false in remote config to disable)

how do I fix this?

tallestlegacy avatar Jul 03 '22 15:07 tallestlegacy

Hi! Not a dev, just another Linux user. From the error message, it looks like the issue is with the KDE flatpak, not Sonic Pi per se. Unfortunately I can't reproduce this: the Sonic Pi flatpak installs and runs correctly on my machine, and oddly, it doesn't even give org.kde.Platform as a dependency. Which distribution and desktop environment do you use, and what command were you using to install Sonic Pi? (for comparison, I used flatpak install net.sonic_pi.SonicPi)

You might try using flatpak remote-delete org.kde.Platform to reset the cached stuff on your end, as suggested in this AskUbuntu question.

pashultz avatar Jul 04 '22 19:07 pashultz

Hi, unfortunately I can only echo @pashultz's comments. The flatpak build isn't something that we create or maintain - hopefully you can figure out who the maintainer is and contact them directly.

Otherwise, another route to installing on Linux is to build from source: https://github.com/sonic-pi-net/sonic-pi

samaaron avatar Jul 08 '22 20:07 samaaron

If I remember correctly, @hfiguiere is the person who maintains the flatpak

lilyinstarlight avatar Jul 08 '22 20:07 lilyinstarlight

This is a flatpak setup issue.

first: which distro are you on? Which architecture?

hfiguiere avatar Jul 08 '22 21:07 hfiguiere

@hfiguiere out of interest, are you considering updating the flatpack to v4? If so, do you need any help with it?

samaaron avatar Jul 21 '22 07:07 samaaron

Elixir is THE problem.

hfiguiere avatar Jul 21 '22 12:07 hfiguiere

@hfiguiere could you expand a little? What is it about Elixir that’s causing the issue(s)?

samaaron avatar Jul 21 '22 12:07 samaaron

Simply: there is no network access during the build phase, and Elixir require installing a ton of packages that way.

hfiguiere avatar Jul 21 '22 12:07 hfiguiere

Simply: there is no network access during the build phase, and Elixir require installing a ton of packages that way.

Where and when does the build phase happen? Does flatpak compile everything from source somewhere?

samaaron avatar Jul 21 '22 13:07 samaaron

Hi @hfiguiere! See #3022 - the guidance in that thread is a little dated, but I've worked on allowing building in offline sandboxes and I'm making a better write-up I'll contribute soon (the most notable differences from that thread are that esbuild is not required any longer and you have to separate the -n and -o options now)

Edit: you can also look at my Nix package, which might help too: https://github.com/NixOS/nixpkgs/blob/e939d920d5f430147b127d9f2e3e6b7dc926b9c3/pkgs/applications/audio/sonic-pi/default.nix

lilyinstarlight avatar Jul 21 '22 13:07 lilyinstarlight

Where and when does the build phase happen? Does flatpak compile everything from source somewhere?

Compiling in a sandbox is a pretty standard thing to do for ensuring reproducible builds (i.e. that any build from a different machine but compatible specs will produce a functionally identical program), so preventing any potentially unstable sources like file timestamps or internet access from creeping into the build is expected

lilyinstarlight avatar Jul 21 '22 13:07 lilyinstarlight

Yeah hex is part of the problem.

hfiguiere avatar Jul 21 '22 13:07 hfiguiere

Where and when does the build phase happen? Does flatpak compile everything from source somewhere?

The build phase happen after the download phase. It compile from source everything that's not in the runtime. Including erlang, elixir, Ruby (that one is only in the Sdk)

hfiguiere avatar Jul 21 '22 13:07 hfiguiere

The problem is all the elixir package needed.

Generating docs for the Qt GUI...
Compiling Erlang/Elixir files...
Compiling 14 files (.erl)
src/osc/osc_tests.erl:16:2: Warning: export_all flag enabled - all functions will be exported
%   16| -compile(export_all).
%     |  ^

Compiling 14 files (.ex)
warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/tau_web/live/log_live.ex:30


== Compilation error in file lib/tau_web/telemetry.ex ==
** (CompileError) lib/tau_web/telemetry.ex:3: module Telemetry.Metrics is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module

Error: module sonicpi: Child process exited with code 1

(I have ZERO knowledge of elixir / erlang)

hfiguiere avatar Jul 23 '22 22:07 hfiguiere

That was with 4.0.1

Now it's 4.0.3:

Running: cd app && ./linux-config.sh --config RelWithDebInfo
Creating build directory...
Generating makefiles...
-- CMakeLists: Sonic Pi
CMake Error at /usr/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file:
  /run/build/sonicpi/app/vcpkg/scripts/buildsystems/vcpkg.cmake
Call Stack (most recent call first):
  CMakeLists.txt:39 (project)

hfiguiere avatar Jul 23 '22 22:07 hfiguiere

Ah yeah --offline-build everywhere. It seem the Elixir problem are gone on 4.0.3

hfiguiere avatar Jul 23 '22 22:07 hfiguiere

Still can't find QScintilla despite building it. Not sure what CMake expect to find but it doesn't come with a .pc file....

hfiguiere avatar Jul 24 '22 00:07 hfiguiere

Still can't find QScintilla despite building it. Not sure what CMake expect to find but it doesn't come with a .pc file....

It looks in defined library paths from environment (it didn't come with a CMake file or pkg-config file on my system...). Set QSCINTILLA_ROOT in the CMake vars to help it find it, if you know where it is

Edit: see stuff around https://github.com/sonic-pi-net/sonic-pi/blob/a63f5b6bf7c6013dcf7260aebd641c2be30540f4/app/gui/qt/cmake/FindQScintilla.cmake#L16

lilyinstarlight avatar Jul 24 '22 01:07 lilyinstarlight

Ah yeah the wrapper script mean the prefix isn't set. Works better now. Back to the elixir / erlang errors above.

hfiguiere avatar Jul 24 '22 02:07 hfiguiere

For the elixir stuff, you need to have a copy of the Mix deps folder copied into the build environment from downloading them manually (or if your build stuff has something analogous to fixed-output derivations from Nix, you can use that -- I wish I had more helpful info, but I haven't messed with flatpak before)

lilyinstarlight avatar Jul 24 '22 02:07 lilyinstarlight

So basically it's impossible, since:

  1. I have no clue how to build elixir stuff.
  2. I don't even have a URL to get the packages.

We have tools for python, go, dotnet, node (yarn or npm), rust (cargo), to generate manifest.

hfiguiere avatar Jul 24 '22 02:07 hfiguiere

Yeah I don't know what the direct URLs to the Hex package registry would be (Mix will build them for you when the package sources are put in the deps folder though -- it actually works fairly similar to Cargo from a user perspective)

I can zip up a deps sources folder from my machine for you if it would help. You would only have to get it into the build environment, unzip it, then run the build scripts the same as you otherwise would

lilyinstarlight avatar Jul 24 '22 02:07 lilyinstarlight

it wouldn't work. Upstream source are not allowed.

(Cargo has a Cargo.lock, so you can parse it, also Rust is far more popular)

hfiguiere avatar Jul 24 '22 03:07 hfiguiere

Building telemetry_metrics require telemetry. telemetry require rebar3, and rebar3 requires.... a lot. And that's not the only thing. (I already figured out mix)

Update rebar3 require bbmustache which requires... rebar3

hfiguiere avatar Jul 24 '22 03:07 hfiguiere