kiwix-desktop icon indicating copy to clipboard operation
kiwix-desktop copied to clipboard

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

Open Yanestra opened this issue 1 year ago • 2 comments

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

Yanestra avatar Nov 27 '23 06:11 Yanestra

@Yanestra Which version of linux Distribution do you use?

kelson42 avatar Dec 03 '23 15:12 kelson42

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.

Yanestra avatar Dec 03 '23 21:12 Yanestra

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 avatar Apr 18 '24 14:04 veloman-yunkan

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

veloman-yunkan avatar Apr 18 '24 14:04 veloman-yunkan

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

kelson42 avatar Apr 18 '24 15:04 kelson42

@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).

veloman-yunkan avatar Apr 19 '24 14:04 veloman-yunkan

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.

Korne127 avatar Jul 23 '24 22:07 Korne127

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

kelson42 avatar Jul 28 '24 20:07 kelson42

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

Korne127 avatar Jul 28 '24 21:07 Korne127

@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

veloman-yunkan avatar Jul 29 '24 07:07 veloman-yunkan

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.

Korne127 avatar Jul 29 '24 11:07 Korne127

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

kelson42 avatar Jul 29 '24 13:07 kelson42