probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.22k stars 414 forks source link

missing libxcb-xinerama0 breaks an AppImage #562

Open cryptozoidberg opened 1 year ago

cryptozoidberg commented 1 year ago

I'm having a problem with generating AppImage for my qtWebEngine-based app using linuxdeployqt: I was following Custom wrapper script instead of AppRun instructions, and the script was working pretty much fine, resulted AppImage was launching on the machine that generated it and was working just fine. When i've put this AppImage to new Ubuntu 22.04, the launch was failed with this errors:

QFactoryLoader::QFactoryLoader() checking directory path "/home/roky/Downloads/ZanoApp/usr/bin/platforms" ...
Cannot load library /home/roky/Downloads/ZanoApp/usr/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/roky/Downloads/ZanoApp/usr/plugins/platforms/libqxcb.so" : "Cannot load library /home/roky/Downloads/ZanoApp/usr/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

After quick googling i found out that most of the solutions is recommend to install missing library on the user's machine(which worked fine too in my case): sudo apt-get install libxcb-xinerama0

Obviously installing thirdparty lib might not be suitable for users, so I was wondering if there are any solution for this, or did i make something wrong in the build script? (App image available under this link: https://build.zano.org/builds/zano-linux-x64-release-devtools-v1.5.0.144[a4c332e].AppImage in case someone willing to look at it)

probonopd commented 1 year ago

Good question why it is not bundled in the first place. This library is not on the excludelist, so at least in theory it should get bundled. The question is why that doesn't happen.