Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use self-compiled LilyPond #15

Open
jeanas opened this issue Oct 23, 2022 · 10 comments
Open

Can't use self-compiled LilyPond #15

jeanas opened this issue Oct 23, 2022 · 10 comments

Comments

@jeanas
Copy link
Collaborator

jeanas commented Oct 23, 2022

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
Copy link
Collaborator Author

jeanas commented Oct 23, 2022

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
Copy link

hahnjo commented Oct 23, 2022

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
Copy link
Collaborator Author

jeanas commented Oct 23, 2022

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

@hahnjo
Copy link

hahnjo commented Oct 23, 2022

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

@hfiguiere
Copy link
Collaborator

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
Copy link
Collaborator Author

jeanas commented Oct 23, 2022

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

@jeanas
Copy link
Collaborator Author

jeanas commented Oct 23, 2022

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
Copy link
Collaborator

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
Copy link
Collaborator Author

jeanas commented Oct 23, 2022

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants