kiwix / kiwix-desktop

Kiwix for Windows and GNU/Linux desktops
https://download.kiwix.org/release/kiwix-desktop/
GNU General Public License v3.0
772 stars 100 forks source link

AppImage: libthai.so.0: cannot open shared object file: No such file or directory #1016

Closed Yanestra closed 3 months ago

Yanestra commented 11 months ago

Apparently, there is a lib missing in the file kiwix-desktop_x86_64_2.3.1-4.appimage

kelson42 commented 11 months ago

@Yanestra Which version of linux Distribution do you use?

Yanestra commented 11 months ago

The magic of AppImages is that locally installed libs shouldn't matter at all as long as the platform matches. If I have to install libthai locally, the whole AppImage thing is pointless.

I can answer Gentoo x86_64 current, if that helps but I bet it doesn't.

veloman-yunkan commented 6 months ago

linuxdeployqt (the tool used for creating an appimage) considers libthai.so a core library and excludes it from being added to the appimage.

$ ./linuxdeployqt -show-exclude-libs
linuxdeployqt  (commit 2b38449), build 62 built on 2023-12-27 21:00:01 UTC
("ld-linux-x86-64.so.2", "ld-linux.so.2", "libBrokenLocale.so.1", "libEGL.so.1", "libGL.so.1", "libGLX.so.0", "libGLdispatch.so.0", "libICE.so.6", "libOpenGL.so.0", "libSM.so.6", "libX11-xcb.so.1", "libX11.so.6", "libanl.so.1", "libasound.so.2", "libc.so.6", "libcidn.so.1", "libcom_err.so.2", "libdl.so.2", "libdrm.so.2", "libexpat.so.1", "libfontconfig.so.1", "libfreetype.so.6", "libfribidi.so.0", "libgbm.so.1", "libgcc_s.so.1", "libglapi.so.0", "libgmp.so.10", "libgpg-error.so.0", "libharfbuzz.so.0", "libjack.so.0", "libm.so.6", "libmvec.so.1", "libnss_compat.so.2", "libnss_dns.so.2", "libnss_files.so.2", "libnss_hesiod.so.2", "libnss_nis.so.2", "libnss_nisplus.so.2", "libpthread.so.0", "libresolv.so.2", "librt.so.1", "libstdc++.so.6", "libthai.so.0", "libthread_db.so.1", "libusb-1.0.so.0", "libutil.so.1", "libuuid.so.1", "libxcb-dri2.so.0", "libxcb-dri3.so.0", "libxcb.so.1", "libz.so.1")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^^^^^^^^^^^^^^
veloman-yunkan commented 6 months ago

libthai.so is explicitly "blacklisted" in https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist (since that is a dynamic link to the HEAD of the master branch, here is the permalink to a fixed revision of that file):

libthai.so.0
# Workaround for:
# audacity: /tmp/.mount_AudaciUsFbON/usr/lib/libthai.so.0: version `LIBTHAI_0.1.25' not found (required by /usr/lib64/libpango-1.0.so.0)
# on openSUSE Tumbleweed
kelson42 commented 6 months ago

@veloman-yunkan Thx for the analysis.... but not how the solution should look like!?

veloman-yunkan commented 6 months ago

@kelson42 My tentative solution is to include libthai.so in the appimage. Yet, I am not sure that it won't result in the opposite problem (because of which libthai.so was "blacklisted" in the linuxdeployqt project).

Korne127 commented 3 months ago

Jfyi, libthai has been removed from the excludelist with https://github.com/AppImageCommunity/pkg2appimage/pull/555 so this workaround shouldn't be necessary anymore after linuxdeploy has been updated.

kelson42 commented 3 months ago

@veloman-yunkan Does that mean we should rollback our fix?

Korne127 commented 3 months ago

As a new version of linuxdeploy has been released, the fix shouldn't be necessary anymore (assuming you'll use the newest version).

veloman-yunkan commented 3 months ago

@veloman-yunkan Does that mean we should rollback our fix?

We can to it when linuxdeployqt incorporating the said change is released.

As a new version of linuxdeploy has been released ...

No, as of now the continuous build of linuxdeployqt (that our build system uses) has been released twenty days ago:

$ ./linuxdeployqt --version
linuxdeployqt  (commit 8cb9438), build 67 built on 2024-07-09 18:22:04 UTC
Korne127 commented 3 months ago

Ah, I'm sorry, I think I confused two projects. linuxdeployqt is no longer actively maintained, but if you make an issue, maybe they'll release a new version nevertheless.

kelson42 commented 3 months ago

Closing in favour of https://github.com/kiwix/kiwix-desktop/issues/1165