1

I'm using appimage http://appimage.org to pack my application in a standalone excutable.

I'm doint this on debian testing lenny.

My application uses a lot of opensource libraries (qt, python pythonqt fftw hdf4/5 gsl netpbm qwt) and everything was ok using Qt4. I can compile my app on debian and create an appdir image that run smoothly on mint (with xfce).

This stopped working when I switch to Qt5.

Now the appimage runs on debian, but not on mint, I get this error:

This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted

Notice that the messege is non-consistent: firts it says I lack xcb and than it maks as available.

I did copied the plugins directory in my app usr/lib tree. I have xcb installed on host apt-get install libx11-xcb1

My AppRun file looks like this:

#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
cd "${HERE}/usr/"
export LD_LIBRARY_PATH="${HERE}/usr/lib/:${LD_LIBRARY_PATH}"
export PATH="${HERE}/usr/bin:${PATH}"
export QT_PLUGIN_PATH="${HERE}/usr/lib"
exec "${HERE}/usr/bin/Neutrino" "$@"
cd -

What am I missing?

bibi
  • 3,671
  • 5
  • 34
  • 50

1 Answers1

4

Many Qt5 applications such as Krita, Scribus, and Subsurface are being distributed as AppImages, so it is definitely possible.

Probably you are missing some components that need to be bundled inside the AppImage. Especially, Qt plugins need to be bundled inside the AppImage for it to work.

See here for an example of a Qt5.5 app being packaged as an AppImage.

Note that it is generally recommended to use an old base system such as CentOS 6 for compiling, because the resulting AppImages will be compatible to more distributions rather than just the latest ones.

If you post a link to your project or open an issue on https://github.com/probonopd/AppImages/issues I can possibly give you more detailed directions.

probono
  • 1,620
  • 1
  • 8
  • 5
  • Thanks! I saw this line in the scribus appimage script: `ldd usr/lib/qt5/plugins/platforms/libqxcb.so | grep "=>" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./usr/lib` which might help, I'll try that tomorrow – bibi Apr 17 '16 at 21:14
  • sorry @probono, but it doesn't work... and of course I installed the plugins directory in the appdir `/usr/lib/plugin` and I also copied all the libraries required by each plugin... with no success. – bibi Apr 18 '16 at 08:19
  • The code is here: https://github.com/aflux/neutrino but due to some missing libraries on the testing Debian (qwt for qt5) and not fully compiled libs (pythonqt with qt_all support) it's a mess to build (that's why I wanted something like appimage) – bibi Apr 18 '16 at 08:27
  • Please make sure you are using Qt 5.9.2 (the latest version currently available for Ubuntu trusty) from https://launchpad.net/~beineri/+archive/ubuntu/opt-qt592-trusty - this is the combination we are testing with. See if it works using that, then try experimenting with other Qt versions if needed. – probono Jan 06 '18 at 14:02
  • 3
    The link to the example in the answer is broken. – kawing-chiu Jan 17 '20 at 12:22