nitrokey-app icon indicating copy to clipboard operation
nitrokey-app copied to clipboard

AppImage not running on Arch Linux

Open alex-nitrokey opened this issue 6 years ago • 21 comments

I couldn't get the AppImage build (see #286) running on my Arch Linux system.

I did:

$ chmod u+x Nitrokey.App.AppImage
$ ./Nitrokey.App.AppImage
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
zsh: abort (core dumped)  ./Nitrokey.App.AppImage

Another user reported that she/he couldn't get it starting as well (more information will hopefully follow). Does anybody know, what could be done to make it usable for even more distributions?

alex-nitrokey avatar Apr 19 '18 07:04 alex-nitrokey

Hi!

  1. Have you tried the 16.04 build from the beta? v1.3 was built on 14.04.
  2. Do you have Qt libraries installed (it should not be required, but this might give some clues)?

szszszsz avatar Apr 19 '18 08:04 szszszsz

  1. I tried either one. Same results.
  2. I have different Qt libraries installed (e.g. qt5-svg), sure. And I think there is something not working well with theses Qt libraries dependencies (especially for the app installed on system), but I still couldn't manage to figure it out (see #232 as well). Maybe it is connected, maybe not at all. Let's see, what system other user is using, as it is surely not Arch Linux...

alex-nitrokey avatar Apr 19 '18 09:04 alex-nitrokey

I see. I will check was the proper plugin file copied to the archive.

szszszsz avatar Apr 19 '18 09:04 szszszsz

Hyperbola it is... The output reads

Cannot mix incompatible Qt library (version 0x50800) with this library
(version 0x50904)

I guess Hyperbola is even more special, but I thought that is what AppImage is for :thinking: :wink:

alex-nitrokey avatar Apr 19 '18 15:04 alex-nitrokey

@probonopd Hi! Any ideas what could be missed and how to debug it? Perhaps I could fix the first case by copying the missing platform plugin, but what about the library mixing? I think the error message mean that App is trying to access some Qt library in the OS, but all libraries were meant to be provided by the AppImage already.

szszszsz avatar Apr 19 '18 16:04 szszszsz

I could imagine that this causes the issue:

https://github.com/Nitrokey/nitrokey-app.build/blob/1b8b7f18dc1d8bd9d4dbb2a269f5bbb1384f5e37/docker/ubuntu_xenial/_build.sh#L46-L48

Just copying in Qt components (rather than having them deployed by linuxdeployqt) may cause these components to try loading Qt from the system, which leads to incompatible Qt versions being mixed. What happens if you use the -extra-plugins=<list> option instead of the lines above?

Usage examples:

-extra-plugins=sqldrivers/libqmsql.so,iconengines/libqsvgicon.so -extra-plugins=sqldrivers,iconengines/libqsvgicon.so -extra-plugins=sqldrivers,iconengines,mediaservice,gamepads

how to debug it?

Run ldd on every .so in the AppImage and see if it tries to load Qt libraries from the system (/usr/...) rather than the one in the AppImage (/tmp/.mount_...). Running the application with LD_DEBUG=libs may give you this information as well.

probonopd avatar Apr 19 '18 16:04 probonopd

Thank you for the tips! I will check it. I was sure simple copying would suffice, but I forgot about making it depending on the local libraries with a relative path, and here could be the cause indeed. I guess your deploying tool does it.

szszszsz avatar Apr 19 '18 16:04 szszszsz

Yep, that's the problem. How does one fix without using the aur? More importantly is a fix on the way? I just wondered though, is there a way to disable the library temporarily for using the appimage? Aka, for the nitrokey appimage's library to be used instead?

FrostKnight avatar Apr 19 '18 20:04 FrostKnight

Using the -extra-plugins=<list> option instead of the manual copy operations should do the trick. Whenlinuxdeployqt deploys the Qt plugins, it sets the rpath so that they load the bundled rather than system Qt libraries.

probonopd avatar Apr 20 '18 05:04 probonopd

Yeah, I don't have that package, but I did try compiling from source which worked to an extent...

When I opened the nitrokey app from source, and plugged in my nitrokey it wasn't detected. Not sure why though. I wonder if it is debian related error... I ask because, my distro uses debian packages. But also, when I used devuan a debian fork, it had the same problems.

And debian stretch I forget if that had some but I am guessing yes.

FrostKnight avatar Apr 20 '18 10:04 FrostKnight

interesting... I tried sudoing the nitrokey app i compiled from source and it worked. hmm odd though.

FrostKnight avatar Apr 22 '18 17:04 FrostKnight

Hi @FrostKnight ! I have replied on #352.

szszszsz avatar Apr 23 '18 05:04 szszszsz

@szszszsz thank you, I replied just now.

FrostKnight avatar Apr 24 '18 00:04 FrostKnight

Good news, in 1.3.1, your Nitrokey-App.AppImage works the way it is supposed to. I owe you all my thanks. :)

FrostKnight avatar Jun 28 '18 14:06 FrostKnight

Great! I am glad it works for you! :-)

szszszsz avatar Jun 28 '18 15:06 szszszsz

I get the same message as before though :-(

alex-nitrokey avatar Jun 29 '18 08:06 alex-nitrokey

I see. Will check then. I have added whole plugins' platform directory via -extra-plugins=<list>. I wonder should I build it on Arch Linux as well.

szszszsz avatar Jun 29 '18 08:06 szszszsz

Arch has version 1.3.1 already in repository. Hence, no need to get AppImage running on Arch - at least not a priority.

jans23 avatar Jun 29 '18 08:06 jans23

Well the point of the AppImage is to have a executable that can run on every system without the need of higher privileges or installing on every system. I guess this applies for Arch Linux, too ;-)

There are good reasons to avoid the AUR as well (although the Nitrokey App PKGBUILD is indeed trustworthy so far).

@szszszsz I don't know anything about building AppImages, to be honest. But as far as I understand @FrostKnight it does work on Arch, at least for some users...?! I don't know what's the matter here for my system.

alex-nitrokey avatar Jun 29 '18 09:06 alex-nitrokey

@alex-nitrokey Exactly as you said. It should work everywhere in the principle. I had to take after something else now though, especially while workaround in a form of OS package is provided (the latter should be preferred IMO, since it gives automatic updates).

szszszsz avatar Jun 29 '18 09:06 szszszsz

Yes, it would be good to have a perfect AppImage. But we introduced AppImage for distributions where NK App isn't available yet. From this perspective fixing this issue is not a priority.

jans23 avatar Jun 29 '18 09:06 jans23