Open VioletGiraffe opened 1 year ago
Guessed qt_prfxpath to be /usr/lib/aarch64-linux-gnu/qt5
This is the issue. It is wrong (assumig you want Qt6). We need to fx it. Volunteers?
This whole guessing is not reliable. What would be a more robust way to know which Qt to use, and from where?
That is a good question, I navigated the Qt folders a bit and it all looks like a bunch of mess. But it does work. How do the Qt .so libraries know where to look for plugins? They're not in the same parent folders as is the case on Windows.
> qmake -v
Using Qt version 6.4.2 in /usr/lib/aarch64-linux-gnu
> ldd bin/myapp
libQt6Gui.so.6 => /lib/aarch64-linux-gnu/libQt6Gui.so.6 (0x0000007fa97a0000)
libQt6Core.so.6 => /lib/aarch64-linux-gnu/libQt6Core.so.6 (0x0000007fa92b0000)
So the question is, as far as I understand, how to locate the plugins. They're not in /usr/lib/aarch64-linux-gnu/
but instead in /usr/lib/aarch64-linux-gnu/qt6/
.
How do the Qt .so libraries know where to look for plugins?
The string qt_prfxpath
is hardcoded in one of the Qt .so libraries. It's pretty much under-documented, though.
And sometimes, it's even outright wrong.
Okay, judging from the appimagetool
s log the string says just /usr
, that's wrong as there are no plugins there. But somehow Qt works fine.
Black magic!
So the question is, as far as I understand, how to locate the plugins. They're not in /usr/lib/aarch64-linux-gnu/ but instead in /usr/lib/aarch64-linux-gnu/qt6/.
... but currently go-appimage (wrongly)
Guessed qt_prfxpath to be /usr/lib/aarch64-linux-gnu/qt5
All I can tell you at the moment is that the bug is somewhere in
In the meantime, try export QTDIR=/usr/lib/aarch64-linux-gnu/qt6/
before running linuxdeployqt
. Do this on a new AppDir (one which linuxdeployqt
was never run on before).
As for the code: you take the 1st result which happened to be qt5 (or it will always be qt5 based on alphabetical sorting), instead you should check whether it's Qt5 or 6 - you already know that Qt 6 is required. I'm not a fan of writing even more complex fragile heuristics, but in this case seems inevitable as the current solution simply doesn't support Qt 6 .
Upd: or you can remove the guessing altogether and require QTDIR
to be defined if qt_prfxpath does not contain "plugins".
In the meantime, try
export QTDIR=/usr/lib/aarch64-linux-gnu/qt6/
before runninglinuxdeployqt
.
That worked! The correct paths are in the log now, and the AppImage size is reduced. However, it still doesn't run:
Failed to load the image at
Press any key to exit.
Any ideas? What can I do to troubleshoot this?
Is that message coming from your program?
You're right, sincere apologies. I was so puzzled by the message that I was certain it's from the AppImage runtime. And many thanks for your help!
The problem is well illustrated by this log. Qt 6 dependency is detected (correctly), but Qt 5 is deployed. Looks like it could be because Qt 5 was the first folder where it found
libqxcb.so
?..