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

Unable to run Appimage on NixOS due to hardcoded location of shared libraries #24

Closed
eyduh opened this issue Dec 20, 2023 · 4 comments
Closed

Comments

@eyduh
Copy link

eyduh commented Dec 20, 2023

Hi,

I'm trying to run the Appimage on NixOS 23.11 without success.

[eyduh@editing-bench:~/Downloads]$ ./DCP-o-matic-2.16.70-x86_64.AppImage 
DCP-o-matic-2.16.70-x86_64.AppImage installed in /home/eyduh/.cache/appimage-run/9d6e44d863d326eaf97b546b666b0b9ad69d8a750b2db417f77ccce429491b5e
/home/eyduh/.cache/appimage-run/9d6e44d863d326eaf97b546b666b0b9ad69d8a750b2db417f77ccce429491b5e/usr/bin/dcpomatic2: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory

If I run the DCP in an environment with the required libraries I encounter the same issue:


[eyduh@editing-bench:~/Downloads]$ nix-shell -p libthai

[nix-shell:~/Downloads]$ ./DCP-o-matic-2.16.70-x86_64.AppImage 
DCP-o-matic-2.16.70-x86_64.AppImage installed in /home/eyduh/.cache/appimage-run/9d6e44d863d326eaf97b546b666b0b9ad69d8a750b2db417f77ccce429491b5e
/home/eyduh/.cache/appimage-run/9d6e44d863d326eaf97b546b666b0b9ad69d8a750b2db417f77ccce429491b5e/usr/bin/dcpomatic2: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory


Since the Appimage depends on shared libraries that are expected to reside in /usr/lib/* it fails to locate these libaries even if installed on the host as the actual location on nixos is in the nix store like a so

[nix-shell:~]$ nix repl
Welcome to Nix 2.18.1. Type :? for help.

nix-repl> :l <nixpkgs>
Added 19749 variables.

nix-repl> "${libthai}"
"/nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29"

nix-repl> :q

[nix-shell:~]$ du -a /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29
4       /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/lib/libthai.la
52      /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/lib/libthai.so.0.3.1
4       /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/lib/libthai.so
60      /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/lib
576     /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/share/libthai/thbrk.tri
576     /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/share/libthai
576     /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29/share
636     /nix/store/7056l05jgksy4l9y2anifdg8p9q7vf85-libthai-0.1.29

Judging by this completely different issue, I would run into a similar issue with a few other libraries as well.

I'll look into setting up a nix derivation to build dcp-o-matic from source based on the instructions on your website but until then, would it be impractical to bundle these libraries into the AppImage? Alternatively, a way for it to find the libraries when in a non-standard location?

Thanks!

@cth103
Copy link
Owner

cth103 commented Dec 21, 2023

Hi, I think this was also reported for Slackware: https://dcpomatic.com/bugs/view.php?id=2642 I'll take a look.

@cth103
Copy link
Owner

cth103 commented Dec 21, 2023

Maybe you could try the builds here: https://dcpomatic.com/build/appimage/39478c7
They add libthai and seem to work to me on a VM running nixOS.

@cth103
Copy link
Owner

cth103 commented Jan 4, 2024

This change has now been merged into the main branch of DoM and will be in 2.16.72.

@eyduh
Copy link
Author

eyduh commented Jan 4, 2024

I only tried the main program thus far but works like a charm c:

Cheers!

@eyduh eyduh closed this as completed Jan 4, 2024
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

2 participants