Open tallestlegacy opened 2 years ago
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.
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
If I remember correctly, @hfiguiere is the person who maintains the flatpak
This is a flatpak setup issue.
first: which distro are you on? Which architecture?
@hfiguiere out of interest, are you considering updating the flatpack to v4? If so, do you need any help with it?
Elixir is THE problem.
@hfiguiere could you expand a little? What is it about Elixir that’s causing the issue(s)?
Simply: there is no network access during the build phase, and Elixir require installing a ton of packages that way.
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?
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
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
Yeah hex
is part of the problem.
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)
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)
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)
Ah yeah --offline-build
everywhere. It seem the Elixir problem are gone on 4.0.3
Still can't find QScintilla despite building it. Not sure what CMake expect to find but it doesn't come with a .pc file....
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
Ah yeah the wrapper script mean the prefix isn't set. Works better now. Back to the elixir / erlang errors above.
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)
So basically it's impossible, since:
We have tools for python, go, dotnet, node (yarn or npm), rust (cargo), to generate manifest.
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
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)
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
I've been getting this problem for months, shame on me for not reporting sooner
how do I fix this?