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

Missing AppImage dependencies #146

Closed
ReenigneArcher opened this issue May 1, 2022 · 23 comments · Fixed by #190
Closed

Missing AppImage dependencies #146

ReenigneArcher opened this issue May 1, 2022 · 23 comments · Fixed by #190
Labels
fixed This issue has been fixed and will be available in the next release.

Comments

@ReenigneArcher
Copy link
Member

ReenigneArcher commented May 1, 2022

Describe the Bug

The AppImage is missing libraries required to work on some distros. If you test the AppImage on another distro and get an error about a library missing, that isn't in this list, please let us know so we can work on fixing it.

Library Undefined Symbol Distro / Version Fixed at commit / version
libgio-2.0.so.0 g_module_open_full SteamOS 3 AppImageCommunity/pkg2appimage@5c8ea76
libpango-1.0.so.0 g_memdup2 Manjaro Linux 84fd2c5
libpangoft2-1.0.so.0 pango_matrix_get_slant_ratio Manjaro Linux 84fd2c5

Expected Behavior

No response

Additional Context

Replaces #8

Sunshine Host Operating System and Version

Linux

Architecture

64 bit

Sunshine Version

0.13.0

GPU Type

GPU Model

GPU Driver/Mesa Version

Capture Method (Linux Only)

@ReenigneArcher ReenigneArcher pinned this issue May 1, 2022
cazzoo added a commit to cazzoo/Sunshine that referenced this issue May 7, 2022
cazzoo added a commit to cazzoo/Sunshine that referenced this issue May 7, 2022
@lsascha

This comment was marked as resolved.

@ReenigneArcher

This comment was marked as resolved.

@cazzoo
Copy link
Contributor

cazzoo commented May 8, 2022

After some research I can find this issue is occurring on other open-source projects as well (see opentoonz/opentoonz#4406).
Some people already tried to find solutions but unable to get a proper one for now (see https://bbs.archlinux32.org/viewtopic.php?id=3066)

@ReenigneArcher
Copy link
Member Author

After some research I can find this issue is occurring on other open-source projects as well (see opentoonz/opentoonz#4406). Some people already tried to find solutions but unable to get a proper one for now (see https://bbs.archlinux32.org/viewtopic.php?id=3066)

@cazzoo So just installing the dependencies on the runner I don't believe is enough, correct?

I think you're on to something with adding -l /usr/lib/x86_64-linux-gnu/libpango1.0-0.so to the linuxdeploy command. I think it could work if we know where its installed to? https://github.com/cazzoo/Sunshine/runs/6343522902?check_suite_focus=true#step:6:178

@cazzoo
Copy link
Contributor

cazzoo commented May 9, 2022

I'm trying to figure that out but indeed, this path isn't recognized even though this is the path where I can find the lib in an Ubuntu 20.04 from docker...
I tried to install updated deb from 21.10 to 20.04 but there are too many upgraded dependencies so I guess this is not the right approach.
Finally, I tried to get a runner in 21.10 but it just doesn't exist...

@ReenigneArcher
Copy link
Member Author

I'm trying to figure that out but indeed, this path isn't recognized even though this is the path where I can find the lib in an Ubuntu 20.04 from docker... I tried to install updated deb from 21.10 to 20.04 but there are too many upgraded dependencies so I guess this is not the right approach. Finally, I tried to get a runner in 21.10 but it just doesn't exist...

I'm sure that it's best to build on the oldest possible distro we can to have the most compatibility going forward. The issue is just that linuxdeploy is specifically excluding specific libraries from being packaged. They're exclude list comes from here: https://github.com/AppImage/pkg2appimage/blob/a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d/excludelist#L179

Can you try this path? /usr/lib64/libpango-1.0.so.0

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

Unfortunately it didn't work (or maybe I'm doing the wrong way...)
See https://github.com/cazzoo/Sunshine/runs/6365779750?check_suite_focus=true for CI output.
I've been checking apk2appimage exclusion list but couldn't get something else interesting.

@ReenigneArcher
Copy link
Member Author

Unfortunately it didn't work (or maybe I'm doing the wrong way...) See https://github.com/cazzoo/Sunshine/runs/6365779750?check_suite_focus=true for CI output. I've been checking apk2appimage exclusion list but couldn't get something else interesting.

In that case might need to use dpkg to locate where it's installed to. See here: https://askubuntu.com/a/115504

@axolotlek

This comment was marked as duplicate.

@ReenigneArcher
Copy link
Member Author

On Fedora 35: ./sunshine.AppImage: symbol lookup error: /lib64/libgio-2.0.so.0: undefined symbol: g_module_open_full

@IgorPuchkov03 this is already listed... AND already fixed in nightly.

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

Ok, good point! I successfully identified the lib path from a docker container.
I successfully added as lib path but now we face another issue:
/sunshine.AppImage: symbol lookup error: /usr/lib/libpangoft2-1.0.so.0: undefined symbol: pango_matrix_get_slant_ratio
I tried to add libpangoft2 as library using the same flag argument but apparently it's not enough despite build is success (see build #10 on my fork).

I'll try some other stuff later

@ReenigneArcher
Copy link
Member Author

@cazzoo Weird, seems like it packaged correctly according to this: https://github.com/cazzoo/Sunshine/runs/6376358517?check_suite_focus=true#step:6:478

These are just ideas, I have no idea if they will resolve the issue or not.

Idea 1:
Can you try these paths instead of the /usr path?

https://github.com/cazzoo/Sunshine/runs/6376358517?check_suite_focus=true#step:6:210
https://github.com/cazzoo/Sunshine/runs/6376358517?check_suite_focus=true#step:6:327 (we might need this library?)
https://github.com/cazzoo/Sunshine/runs/6376358517?check_suite_focus=true#step:6:366

Idea 2:
Add libpangocairo-1.0.so.0. Probably some kind of dependency that's missing for libpango according to these lines.

https://github.com/AppImage/pkg2appimage/blob/a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d/excludelist#L175
https://github.com/AppImage/pkg2appimage/blob/a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d/excludelist#L180

Idea 3:
linuxdeploy has plugins: https://github.com/linuxdeploy/linuxdeploy#plugins

Which are listed here: https://github.com/linuxdeploy/awesome-linuxdeploy

I don't know if libpango is related to GLib, but I wonder if using this plugin would resolve the issue: https://github.com/linuxdeploy/linuxdeploy-plugin-gtk

Lastly
I don't think you need to manually install these libraries. They seem to be already included. https://github.com/cazzoo/Sunshine/runs/6376358517?check_suite_focus=true#step:3:2360

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

Definitely I'll try those.

1# /lib path appears to be the same as for /usr/lib path in docker container (but worth to try anyway):

root@e4f1a0acd927:/# ls /lib/x86_64-linux-gnu/libpango-1.0.so.0 -la
lrwxrwxrwx 1 root root 24 Apr 21  2020 /lib/x86_64-linux-gnu/libpango-1.0.so.0 -> libpango-1.0.so.0.4400.7
root@e4f1a0acd927:/# ls -la /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
lrwxrwxrwx 1 root root 24 Apr 21  2020 /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 -> libpango-1.0.so.0.4400.7

2# I'll also try to add cairo, because I've seen this dep in linuxdeploy as well.

3# Last resort in case this is not working as expected, but you're right also on this one. It appears pango relies on Glib.

I'll let you know

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

@ReenigneArcher Adding libpangocairo helped to move forward, but still I think there are bit not working.
Now it's not related to dependencies anymore but somehow to Sunshine itself (or permissions):

./sunshine.AppImage          
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: cannot copy file: No such file or directory [sunshine.AppImage.config/sunshine.conf] [sunshine.AppImage.config/sunshine.conf]
zsh: IOT instruction (core dumped)  ./sunshine.AppImage

(I will not share the coredump extract since it doens't contain anything relevant, thus the error raised is pretty much explicit)

I've been extracting the appImage itself (./sunshine_orig.AppImage --appimage-extract) but we cannot find any sunshine.conf file anywhere. Perhaps it's missing the bundle.

image

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

Well, maybe that's my fault, I extracted only the AppImage from the zip file but still, I don't understand why the appImage is generated as a Zip and the home & config folders are to be copied manually to the end-user filesystem...
Maybe I'm wrong also here, please advice.

Here's what I have when downloading resource from CI (zip file, containing another zip file, containing a sunshine folder that contains appImage and config/home folders):
image

@cazzoo
Copy link
Contributor

cazzoo commented May 10, 2022

My gosh, just replying myself because I found the way to go. Just extracted the 3 files (appImage + 2 folders) to the same folder and ran the app, it worked!
image
image

cazzoo added a commit to cazzoo/Sunshine that referenced this issue May 10, 2022
@ReenigneArcher
Copy link
Member Author

My gosh, just replying myself because I found the way to go. Just extracted the 3 files (appImage + 2 folders) to the same folder and ran the app, it worked!
image
image

Awesome! I'm trying a different packaging strategy of the AppImage in the add cpack PR.

cazzoo added a commit to cazzoo/Sunshine that referenced this issue May 10, 2022
@lsascha
Copy link

lsascha commented May 12, 2022

Just as information:
I patched the latest release AppImage myself according to this description:
https://bbs.archlinux.org/viewtopic.php?pid=1994258#p1994258

which worked perfectly and streaming works nicely now.

Since i don't see any libgio-2.0.so.0 added in the Pull request, i am not 100% confident that it will also fix the error mentioning libgio-2.0.so.0 🤔

@ReenigneArcher When i should try it with some nightly, let me know where i can find the nightly AppImage i should try.

@ReenigneArcher
Copy link
Member Author

Just as information: I patched the latest release AppImage myself according to this description: https://bbs.archlinux.org/viewtopic.php?pid=1994258#p1994258

which worked perfectly and streaming works nicely now.

Since i don't see any libgio-2.0.so.0 added in the Pull request, i am not 100% confident that it will also fix the error mentioning libgio-2.0.so.0 🤔

When i should try it with some nightly, let me know where i can find the nightly AppImage i should try.

libgio-2.0.so.0 was fixed upstream as indicated by the table in the original comment.

You can test these.

https://github.com/SunshineStream/Sunshine/actions/runs/2303519447 (artifact: sunshine-appimage)
https://github.com/SunshineStream/Sunshine/actions/runs/2310958227 (artifact: sunshine-linux ... I'm aware the paths are not correct)

@lsascha
Copy link

lsascha commented May 12, 2022

@ReenigneArcher
Thanks. Tested the AppImage nightly from the artifact and streaming works perfectly fine without patching the AppImage. 👍

@ReenigneArcher
Copy link
Member Author

@lsascha I'm guessing you only tested the first one I linked?

@ReenigneArcher ReenigneArcher added the fixed This issue has been fixed and will be available in the next release. label May 12, 2022
@github-actions
Copy link

This issue has been fixed and will be available in the next release.

@ReenigneArcher ReenigneArcher unpinned this issue May 12, 2022
@lsascha
Copy link

lsascha commented May 14, 2022

@lsascha I'm guessing you only tested the first one I linked?

Yes. only tested the first one, since SteamOS more or less requires AppImages or Flatpaks. Didn't check that the other file includes an AppImage as well

@ReenigneArcher ReenigneArcher mentioned this issue Jun 15, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed This issue has been fixed and will be available in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants