probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.22k stars 414 forks source link

libgio incompatible #526

Open Zaraka opened 2 years ago

Zaraka commented 2 years ago

So I have this app image that for some reason links to libgio, the build system is much older than the running system, build system has an older kernel, glibc e.t.c. but still when AppImage is run on the Run system, following error appears:

symbol lookup error: /lib64/libgio-2.0.so.0: undefined symbol: g_module_open_full

What is most curious, these are the library version

So I have two questions:

Zaraka commented 2 years ago

To clarify, I workarounded around this by manually copying /lib64/libgio-2.0.so.0 to appdir usr/lib directory before running linuxdeployqt but obviously I want to have a cleaner solution.

probonopd commented 2 years ago

Why is GLib in excluded libraries?

The assumption is that all mainstream desktop Linux distributions ship GLib by default in a version that is at least as new as on the build machine.

the build system is much older than the running system, build system has an older kernel, glibc e.t.c. but still when AppImage is run on the Run system, following error appears

https://abi-laboratory.pro/index.php?view=navigator&symbol=g_module_open_full#result finds nothing on g_module_open_full.

Possibly this is somehow related to

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2169/diffs?commit_id=ee589aaa3206041bf0a5b7dbbc487208c1a48530

but I am not sure.

If a binary compiled against libgio-2.0.so.0.5600.4 refuses to run with a later version of the library with the same major version number like libgio-2.0.so.0.7000.2, then it appears that the library is breaking binary compatibility and a bug against that library should be filed, probably at https://gitlab.gnome.org/GNOME/glib/-/issues.

yakimant commented 10 months ago

Same issue.

Built with glib 2.64.6, failing on Ubuntu 22.04 with glib 2.72.4.

Found an issue: https://github.com/AppImageCommunity/pkg2appimage/pull/500

Why libgio was removed from here https://github.com/AppImageCommunity/pkg2appimage/blob/master/excludelist but not here https://github.com/probonopd/linuxdeployqt/blob/master/tools/linuxdeployqt/excludelist.h ?

yakimant commented 10 months ago

Related: https://github.com/AppImage/AppImageKit/issues/1162

yakimant commented 10 months ago

Runnin linuxdeployqt with -exclude-libs=libgmodule-2.0.so.0,libgthread-2.0.so.0 helped. Github is full of this workaround.

As I understand all the libs from the list should be either added or excluded from packing: https://packages.debian.org/bullseye/amd64/libglib2.0-0/filelist

Correct me if I'm wrong.

probonopd commented 10 months ago

As I understand all the libs from the list should be either added or excluded from packing: https://packages.debian.org/bullseye/amd64/libglib2.0-0/filelist

You are most likely correct there, but I am unsure how to handle https://github.com/probonopd/linuxdeployqt/issues/544

yakimant commented 10 months ago

Hm, I'm actually not sure, how it relates.

https://github.com/probonopd/linuxdeployqt/issues/544 is an issue, where bundled libglib-2.0.so.0 and libgobject-2.0.so.0 were causing troubles.

In this issue I didn't see those files bundled, but libgmodule-2.0.so.0 and libgthread-2.0.so.0.

Could it be a proper solution to bundle none of the libs from glib package?