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

Mint 20.1 Could not load the Qt platform plugin "xcb" #469

Open luisclaudiogama opened 3 years ago

luisclaudiogama commented 3 years ago

Hi, I need a help to deploy my project using Linux Mint 20.1 and Qt 5.12.4

I have another computer using Mint 19.1 and it´s working fine.

At the second computer with Mint 20.1 and Qt 5.15.2, I used the same script, but I changed QTVER variable to point to the qt´s correct version.

This is my script to deploy.

`

!/bin/bash

echo 'deployqt 4.1' if [[ $# -lt 1 ]] ; then echo 'modo de usar: deployqt4 [nome_pacote]' exit 1 fi QTVER=5.15.2 mkdir $1 cp -r ../$1/ $1 cd $1 chmod +x Controle.sh rm -fr .obj rm -fr .moc /opt/Qt/$QTVER/gcc_64/bin/qmake CONFIG+=release PREFIX=/usr make -j$(nproc) unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH ../linuxdeployqt.AppImage $1 -bundle-non-qt-libs -qmake=/opt/Qt/$QTVER/gcc_64/bin/qmake -unsupported-allow-new-glibc -extra-plugins=qamqp ../linuxdeployqt.AppImage $1 -appimage -qmake=/opt/Qt/$QTVER/gcc_64/bin/qmake -unsupported-allow-new-glibc -extra-plugins=qamqp ../linuxdeployqt.AppImage $1 -qmake=/opt/Qt/$QTVER/gcc_64/bin/qmake -unsupported-allow-new-glibc -extra-plugins=qamqp cd .. `

I use -qmake parameter to point qmake´s path and my .profile has PATH="/opt/Qt/5.15.2/gcc_64/bin/":$PATH

And this is the result of qmake -v

QMake version 3.1 Using Qt version 5.15.2 in /opt/Qt/5.15.2/gcc_64/lib

I build this application using Qt Creator and runs from command line.

But when I try to run after deploy. There is an error:


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.

Abortado (imagem do núcleo gravada)


this is the result of ldd :


ldd Controle linux-vdso.so.1 (0x00007ffef0bf1000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4ba2942000) libqamqp.so.1 => /opt/Qt/5.15.2/gcc_64/lib/libqamqp.so.1 (0x00007f4ba28f6000) libQt5PrintSupport.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5PrintSupport.so.5 (0x00007f4ba2684000) libQt5Widgets.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 (0x00007f4ba1e22000) libQt5Multimedia.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Multimedia.so.5 (0x00007f4ba1b0e000) libQt5Gui.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 (0x00007f4ba11dd000) libQt5Sql.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Sql.so.5 (0x00007f4ba0f92000) libQt5Xml.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Xml.so.5 (0x00007f4ba0d54000) libQt5SerialPort.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5SerialPort.so.5 (0x00007f4ba0b3b000) libQt5Network.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 (0x00007f4ba078d000) libQt5Core.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 (0x00007f4b9ff97000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4b9fdb6000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4b9fc65000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4b9fc4a000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4b9fa58000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4b9fa35000) libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f4b9f9ad000) libpulse-mainloop-glib.so.0 => /lib/x86_64-linux-gnu/libpulse-mainloop-glib.so.0 (0x00007f4b9f9a5000) libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f4b9f950000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f4b9f827000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4b9f821000) libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f4b9f7d4000) libicui18n.so.56 => /opt/Qt/5.15.2/gcc_64/lib/libicui18n.so.56 (0x00007f4b9f339000) libicuuc.so.56 => /opt/Qt/5.15.2/gcc_64/lib/libicuuc.so.56 (0x00007f4b9ef81000) libicudata.so.56 => /opt/Qt/5.15.2/gcc_64/lib/libicudata.so.56 (0x00007f4b9d59e000) libgthread-2.0.so.0 => /lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f4b9d599000) /lib64/ld-linux-x86-64.so.2 (0x00007f4ba2f5b000) libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f4b9d4e1000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f4b9d4ab000) libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007f4b9d429000) libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f4b9d3d8000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4b9d365000) libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f4b9d288000) libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f4b9d255000) libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f4b9d24e000) libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f4b9d23f000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f4b9d102000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f4b9d0d8000) libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f4b9d027000) libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f4b9d01b000) libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f4b9cf9e000) libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f4b9cd98000) libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f4b9cd83000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4b9cd78000) libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f4b9cd6f000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f4b9cd53000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f4b9cd4d000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4b9cd45000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f4b9cd1c000) liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f4b9ccf9000) libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f4b9cbdb000) libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f4b9cbbe000) libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f4b9cb80000) libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f4b9cb73000) libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f4b9cb45000) libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f4b9ca9a000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f4b9ca7e000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f4b9ca5b000)


I checked if libxcb is in [qtdir]/gcc_64/plugins/plataforms. [ok]

And this list shows that the plugins still point to QTDIR.

libQt5PrintSupport.so.5 => /opt/Qt/5.15.2/gcc_64/lib/libQt5PrintSupport.so.5 (0x00007f4ba2684000)

Please, do you have any sugestion for me?

Thanks

probonopd commented 3 years ago

Can you please built on Ubuntu xenial as in the README? Just to see if we get the same error there.

luisclaudiogama commented 3 years ago

As I said, I have been used my workstation with Mint 19.1 to compile and deploy my aplications. I´m trying to use Mint 20.1 in another computer. At this second computer I created a VM and installed Mint 19.3 (I think it´s better try to replicate my actual workstation). I installed the same libraries at 20.1 and 19.3. The deploy´s results of 19.3 is OK. It´s working. Linux Mint 19.3 is based on Ubuntu 18.04 and 20.1 is based on Ubuntu 20.04.

Any suggestion to make at LM 20.1?

Happy New Year to you all.

probonopd commented 3 years ago

Please build your AppImage on Ubuntu Xenial. The AppImage compiled there should run on Linux Mint 19.3 and on Linux Mint 20.1. If that is not working, then it is a bug.

Happy New Year!