flathub / org.frescobaldi.Frescobaldi

https://flathub.org/apps/details/org.frescobaldi.Frescobaldi
1 stars 3 forks source link

Can't use self-compiled LilyPond #15

Open jeanas opened 1 year ago

jeanas commented 1 year ago

I am unable to use self-compiled versions of LilyPond in Frescobaldi from Flatpak. This works fine in "normal" Frescobaldi (well, for me, used to work fine -- the reason I'm switching to Flatpak is that Frescobaldi is broken in Fedora 37 beta due to Python 3.11, so I won't be able to test things with "normal" Frescobaldi). The symptom is that Frescobaldi displays a "stop" symbol when trying to add it.

image

To understand the failure, I compiled this file in LilyPond 2.22 inside Flatpak Frescobaldi:

\version "2.22.2"

#(system* "/home/jean/repos/lilypond/build/out/bin/lilypond")

It prints this in the log:

/home/jean/repos/lilypond/build/out/bin/lilypond: error while loading shared libraries: libguile-3.0.so.1: cannot open shared object file: No such file or directory

If I build with Guile 2 instead of Guile 3, I get

/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /usr/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/jean/repos/lilypond/build-guile2/out/bin/lilypond)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /home/jean/lilies/2.22.2/lilypond/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/jean/repos/lilypond/build-guile2/out/bin/lilypond)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /home/jean/lilies/2.22.2/lilypond/usr/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/jean/repos/lilypond/build-guile2/out/bin/lilypond)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /home/jean/lilies/2.22.2/lilypond/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/jean/repos/lilypond/build-guile2/out/bin/lilypond)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/jean/repos/lilypond/build-guile2/out/bin/lilypond)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /home/jean/lilies/2.22.2/lilypond/usr/lib/libz.so.1: no version information available (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
/home/jean/repos/lilypond/build-guile2/out/bin/lilypond: /home/jean/lilies/2.22.2/lilypond/usr/lib/libz.so.1: no version information available (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)

Does Flatpak set environment variables or such related to dynamic loading?

jeanas commented 1 year ago

Oops, these error messages are a red herring. LilyPond 2.22 is distributed as a shell script that sets LD_LIBRARY_PATH.

Is there a way to debug what error Frescobaldi gets when trying to execute LilyPond?

hahnjo commented 1 year ago

From my understanding, this is expected: The Flatpak application is not supposed to use "host" libraries and cannot see them. The official binaries probably work because they are statically built.

jeanas commented 1 year ago

Ah sorry I forgot to mention: I used Flatseal to grant Frescobaldi access to the whole filesystem. (Permission issues are the topic of https://github.com/flathub/org.frescobaldi.Frescobaldi/issues/10)

hahnjo commented 1 year ago

But still, it will prefer libraries from inside the Flatpak image to those installed in the "host" system

hfiguiere commented 1 year ago

Ah sorry I forgot to mention: I used Flatseal to grant Frescobaldi access to the whole filesystem. (Permission issues are the topic of #10)

This doesn't matter. It doesn't do what you think it does.

jeanas commented 1 year ago

OK. Is there a way to do this or should I just give up on it?

jeanas commented 1 year ago

BTW, 2.22 binaries aren't static. I've tried doing what they do (a wrapper shell script setting LD_LIBRARY_PATH) but I didn't get it to work.

hfiguiere commented 1 year ago

It's still unclear what you are trying to do

If your problem is that F37 broke stuff then I'd use toolbox to setup a F36 (if that worked) and to developement there until the problems are solved.

jeanas commented 1 year ago

What I'm trying to do is simple. I have Frescobaldi installed from Flatpak and a LilyPond binary that I compiled from LilyPond master, and I want to use that binary in Flatpak.

In parallel, I'm trying to investigate the problem with running Frescobaldi natively, and if that doesn't work, and there is no way to use Flatpak and a self-compiled binary, I will indeed find a way to run Frescobaldi as it was run in Fedora 36. But my problems aren't completely specific to me, so I'm not just interested in my own case (although, I recognize, running self-compiled LilyPond probably isn't very common).

hfiguiere commented 1 year ago

What I'm trying to do is simple. I have Frescobaldi installed from Flatpak and a LilyPond binary that I compiled from LilyPond master, and I want to use that binary in Flatpak.

Unless you compiled it using the same SDK as the flatpak it won't work. (if it does it's a coincidence) I think that was alreay explained in a previous issues.