Bug 447150 - AppImage 7.4 does not work on Fedora
Summary: AppImage 7.4 does not work on Fedora
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-AppImage (show other bugs)
Version: 7.4.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-17 21:58 UTC by Nicofo
Modified: 2021-12-28 11:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicofo 2021-12-17 21:58:22 UTC
While appimage 7.3 works well, appimage 7.4 does not start on Fedora:

$ ./digiKam-7.4.0-x86-64.appimage 
-- digiKam Linux AppImage Bundle
-- Use 'help' as CLI argument to know all available options for digiKam application.
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
libudev.so.0 
libxcb-dri3.so.0 
-- Preloading shared libs: :/usr/lib64/libxcb-dri3.so.0
digikam: /tmp/.mount_digiKaWHGnVV/usr/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libk5crypto.so.3)

WORKAROUND
It works however with the following command line:
LD_PRELOAD=/usr/lib64/libssl.so.1.1:/usr/lib64/libcrypto.so.1.1 ./digiKam-7.4.0-x86-64.appimage 

SYSTEM
Fedora 35 (X, not Wayland)
Comment 1 Maik Qualmann 2021-12-17 22:03:56 UTC
Wayland or X doesn't matter, the problem has already been reported here: Bug 445629.

Maik
Comment 2 Nicofo 2021-12-18 09:05:27 UTC
(In reply to Maik Qualmann from comment #1)
> Wayland or X doesn't matter, the problem has already been reported here: Bug
> 445629.
> 
> Maik

OK. I saw that bug, but thought it was Wayland-related (that's why I said I'm on X).
At least, if it can help, I gave the "LD_PRELOAD" command that workarounds the problem.
Comment 3 caulier.gilles 2021-12-25 09:03:26 UTC
Git commit e106aa64e8e18f23fc87266ecd0888c9581768c9 by Gilles Caulier.
Committed on 25/12/2021 at 08:57.
Pushed by cgilles into branch 'dev'.

add more details about host OS compatibility, especially AppImage and glibc version which must be >= to 2.29.
Related: bug 447391, bug 447304

M  +1    -1    TODO.org
M  +4    -4    themes/hugo-theme-digikam/layouts/partials/downloads.html

https://invent.kde.org/websites/digikam-org/commit/e106aa64e8e18f23fc87266ecd0888c9581768c9
Comment 4 caulier.gilles 2021-12-25 10:50:54 UTC
Git commit 73c722d7ed726e649b160f29ba7359f978ede7c9 by Gilles Caulier.
Committed on 25/12/2021 at 10:49.
Pushed by cgilles into branch 'master'.

add preload libssl and libcrypto if available on host Linux
FIXED-IN: 7.5.0

M  +4    -2    project/bundles/appimage/data/AppRun

https://invent.kde.org/graphics/digikam/commit/73c722d7ed726e649b160f29ba7359f978ede7c9
Comment 5 Nicofo 2021-12-26 17:20:15 UTC
Thanks for trying to fix this, even during Christmas day ;)

Unfortunately it is not working yet. With the last appimage version (that includes well your last commit), I still get the following message. It is slighlty different from what I got in the Description of the bug: as you can see, libssl.so.1.1 and libcrypto.so.1.1 are now well displayed (lines <------) - proof that your commit does "something".
Again, if I "export LD_PRELOAD=/usr/lib64/libssl.so.1.1:/usr/lib64/libcrypto.so.1.1" before launching the appimage, it will work.

$ ./digiKam-7.5.0-20211225T124151-x86-64.appimage 
-- digiKam Linux AppImage Bundle
-- Use 'help' as CLI argument to know all available options for digiKam application.
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
libudev.so.0 
libxcb-dri3.so.0 
libssl.so.1.1        <-----------------
libcrypto.so.1.1    <----------------
-- Preloading shared libs: :/usr/lib64/libxcb-dri3.so.0:/tmp/.mount_digiKa3AXE3R/usr/lib64/libssl.so.1.1:/tmp/.mount_digiKa3AXE3R/usr/lib64/libcrypto.so.1.1
digikam: /tmp/.mount_digiKa3AXE3R/usr/lib64/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libk5crypto.so.3)
Comment 6 caulier.gilles 2021-12-26 17:35:19 UTC
Well, look the bash script used internally of AppImage bundle :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/data/AppRun#L119

It load listed shared libraries using this function before to start digiKam binary :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/data/AppRun#L14

You can try to tune this script on your system easily. Extract all AppImage bundle contents :

# ./digiKam-7.5.0-20211225T124151-x86-64.appimage --appimage-extract
...
squashfs-root/.DirIcon
squashfs-root/AppRun
squashfs-root/digikam.png
squashfs-root/org.kde.digikam.desktop
squashfs-root/usr
squashfs-root/usr/bin
squashfs-root/usr/bin/QtWebEngineProcess
squashfs-root/usr/bin/data
squashfs-root/usr/bin/data/LICENSE.txt
squashfs-root/usr/bin/data/audio
squashfs-root/usr/bin/data/audio/KDE-Sys-App-Positive.ogg
squashfs-root/usr/bin/data/audio/KDE-Sys-List-End.ogg
squashfs-root/usr/bin/data/bitmaps
squashfs-root/usr/bin/data/bitmaps/airport.png
squashfs-root/usr/bin/data/bitmaps/annotation.png
squashfs-root/usr/bin/data/bitmaps/antarctic_shelves.png
squashfs-root/usr/bin/data/bitmaps/audio-x-generic.png
squashfs-root/usr/bin/data/bitmaps/bookmark.png
squashfs-root/usr/bin/data/bitmaps/border_1.png
squashfs-root/usr/bin/data/bitmaps/border_2.png
squashfs-root/usr/bin/data/bitmaps/border_disputed.png
squashfs-root/usr/bin/data/bitmaps/border_maritime.png
squashfs-root/usr/bin/data/bitmaps/city_1_orange.png
...

The script to patch is located here : ./squashfs-root/AppRun

After to modify, run it, that all, and look if it work better on your computer.

Best

Gilles Caulier
Comment 7 Nicofo 2021-12-27 11:03:46 UTC
Hello Gilles,
I made some tests in AppRun file.

In "preload_shared_library" function, I see you prioritize the libraries from the bundles instead of those of the system. I suppose there is good reason for that, but for the sake of the test I change that (e.g. change https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/data/AppRun#L14 :
if   [ -f "$DIR/usr/slib64/$FILE" ] ; then           --->        if   [ -f "$DIR/usrxxx/slib64/$FILE" ] ; then
so that the libraries from the bundle are discarded)
As a result, I got the same kind of error, but related to uname function ! (uname called at line L19) (see <======== below).


$ ./AppRun 
-- digiKam Linux AppImage Bundle
-- Use 'help' as CLI argument to know all available options for digiKam application.
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
libudev.so.0 
libxcb-dri3.so.0 
libssl.so.1.1 
libcrypto.so.1.1 
uname: /home/nicolas/Downloaded/squashfs-root/usr/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib64/libssl.so.1.1)              <================= error with uname called by "preload_shared_library libcrypto.so.1.1" !!
-- Preloading shared libs: :/usr/lib64/libxcb-dri3.so.0:/usr/lib64/libssl.so.1.1:/home/nicolas/Downloaded/squashfs-root/usr/lib/libcrypto.so.1.1
digikam: /home/nicolas/Downloaded/squashfs-root/usr/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib64/libssl.so.1.1)
digikam: /home/nicolas/Downloaded/squashfs-root/usr/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libk5crypto.so.3)



If now I swap the 2 lines https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/data/AppRun#L119 :
preload_shared_library libssl.so.1.1
preload_shared_library libcrypto.so.1.1
-->
preload_shared_library libcrypto.so.1.1
preload_shared_library libssl.so.1.1

then digikam starts correctly (no more error with uname neither).
Very strange behaviour (but I'm not familiar at all with ssl...).
So there seem to be some incompatibilities with openssl of the bundle and the system.


Note: in the bundle, there is a broken link: squashfs-root/usr/lib/libssl.so -> libssl.so.1.0.0 : should be libssl.so.1.1
Comment 8 caulier.gilles 2021-12-27 11:47:28 UTC
Hi,

I prioritize the bundle libs in first because the binaries was compiled with these dependencies. So the resolving symbols will match fine at first time.

The preloading function is more and less necessary when you want to force to use a library with a different patch revision which is not present in the bundle. Typically the resolving symbols will be fine because it's a patch changes, but the use of system version will more tuned with inter-dependencies from the system.

The order to  preload is important. I will fix it

Gilles Caulier
Comment 9 caulier.gilles 2021-12-27 11:48:45 UTC
Git commit f65f214e914be297e3665d7d05b1e33faf2d05f6 by Gilles Caulier.
Committed on 27/12/2021 at 11:48.
Pushed by cgilles into branch 'master'.

fix order to preload libcrypto

M  +1    -1    project/bundles/appimage/data/AppRun

https://invent.kde.org/graphics/digikam/commit/f65f214e914be297e3665d7d05b1e33faf2d05f6
Comment 10 caulier.gilles 2021-12-27 11:51:54 UTC
And you are right libssl.so link is broken in the bundle :

[root@localhost lib]# ll libssl*
lrwxrwxrwx 1 root root     15 Dec 25 14:34 libssl.so -> libssl.so.1.0.0
-rwxr-xr-x 1 root root 488328 Dec 25 14:35 libssl.so.1.1*

Gilles Caulier
Comment 11 caulier.gilles 2021-12-27 11:54:05 UTC
Git commit 5a806f69a82d1a5e70843e516cbab4f80daf917f by Gilles Caulier.
Committed on 27/12/2021 at 11:53.
Pushed by cgilles into branch 'master'.

Fix broken libssl.so link in the bundle

M  +1    -1    project/bundles/appimage/04-build-appimage.sh

https://invent.kde.org/graphics/digikam/commit/5a806f69a82d1a5e70843e516cbab4f80daf917f
Comment 12 caulier.gilles 2021-12-27 14:21:17 UTC
Nicofo,

New AppImage build today will be on-line asap to test:

https://files.kde.org/digikam/

Best

Gilles Caulier
Comment 13 Nicofo 2021-12-27 14:53:27 UTC
Thanks. Yes, I see your last commits in that AppImage.
It is still not working, unless like in comment #7 I give priority to system libraries.
Here is the result with your last bundle (not changed):

$ ./digiKam-7.5.0-20211227T120913-x86-64.appimage 
-- digiKam Linux AppImage Bundle
-- Use 'help' as CLI argument to know all available options for digiKam application.
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
Check library libudev.so.0
Check library libxcb-dri3.so.0
Check library libcrypto.so.1.1
Check library libssl.so.1.1
-- Preloading shared libs: :/usr/lib64/libxcb-dri3.so.0:/tmp/.mount_digiKaBl0myc/usr/lib64/libcrypto.so.1.1:/tmp/.mount_digiKaBl0myc/usr/lib64/libssl.so.1.1
digikam: /tmp/.mount_digiKaBl0myc/usr/lib64/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libk5crypto.so.3)


To summarize, to get it work I need to:
1) prioritize system libraries (in preload_shared_library function). I do that for the test, but I understand that it should not be changed
2) OR it works also with the following command:
$ LD_PRELOAD=/usr/lib64/libssl.so.1.1:/usr/lib64/libcrypto.so.1.1 ./digiKam-7.5.0-20211227T120913-x86-64.appimage 
or simply:
$ LD_PRELOAD=/usr/lib64/libcrypto.so.1.1 ./digiKam-7.5.0-20211227T120913-x86-64.appimage
Comment 14 caulier.gilles 2021-12-27 16:05:19 UTC
Git commit a40083e09d8b026df0f150b0c4640d2042b19fb1 by Gilles Caulier.
Committed on 27/12/2021 at 15:56.
Pushed by cgilles into branch 'master'.

drop 32 bits support.
exit if trying to run on 32 bits system.
Temporaly disable the bundle based libraries and always pre-load in prior system based files.

M  +18   -29   project/bundles/appimage/data/AppRun

https://invent.kde.org/graphics/digikam/commit/a40083e09d8b026df0f150b0c4640d2042b19fb1
Comment 15 caulier.gilles 2021-12-27 17:37:16 UTC
Nicofo,

Around in one hour, a new appimage bundle will be published at usual place. I disabled the bundle libraries pre-loading priority in favor of Linux host. We will see if this have a side effects with others users/systems.

Gilles
Comment 16 Nicofo 2021-12-28 08:38:06 UTC
Hi Gilles,
Great, without surprise, it works with the last Appimage.
Let's see if there is no regression for other users/systems...
Thanks !
Comment 17 caulier.gilles 2021-12-28 09:02:02 UTC
Ok, i close this file file. 

Happy new year

Gilles
Comment 18 Nicofo 2021-12-28 11:03:29 UTC
(In reply to caulier.gilles from comment #17)
> Ok, i close this file file. 
> 
> Happy new year
> 
> Gilles

Best wishes for 2022 for digiKam team 🎄
Always great to see how digiKam continues to evolve version after version and to see the developers so much caring about users comments.