QT5 plugandpaint example fails to run - can't find xcb
-
When I try to run the plugandpaint example, I get the error:
This application failed to start because it could not find or load the Qt platform plugin "xcb".Details below. Any help appreciated.
I'm running on Ubuntu 13.04 connecting via "ssh -X" and X11 apps run OK, e.g. firefox. xcb is installed and runs.
I followed the instructions to "build Qt5 from Git":http://qt-project.org/wiki/Building_Qt_5_from_Git.
I have installed the libraries required forQT5 on X11:
libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-devI have built the examples in ~/qt5/qtbase/examples as follows:
qmake
makeThen, from the directory I run:
./widgets/tools/plugandpaint/plugandpaintand get the following error:
This application failed to start because it could not find or load the Qt platform plugin "xcb".Reinstalling the application may fix this problem.
Aborted (core dumped) -
Hi,
Try to check the xcb plugin with ldd to see if all its dependencies can be found
-
I'm not that familiar with ldd, but here are the results. Does it look OK?
@ubuntu@ip-10-179-20-174:~/qt5$ ldd qtbase/plugins/platforms/libqxcb.so
linux-vdso.so.1 => (0x00007ffff38d3000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f297f32e000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f297f11e000)
libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f297ef19000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f297ed15000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f297eafe000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f297e8f3000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f297e6d5000)
libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f297e4d0000)
libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f297e2ca000)
libxcb-sync.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.0 (0x00007f297e0c5000)
libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f297debe000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f297dcba000)
libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f297daaf000)
libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f297d8ab000)
libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f297d6a7000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f297d3ab000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f297d194000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f297ce59000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f297cc4f000)
libQt5DBus.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5DBus.so.5 (0x00007f297c9b6000)
libQt5Gui.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5Gui.so.5 (0x00007f297c1dc000)
libQt5Core.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5Core.so.5 (0x00007f297ba12000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f297b7b4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f297b596000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f297b293000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f297af8e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f297abc5000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f297a9b3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f297f919000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f297a7af000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f297a5a8000)
libxcb-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 (0x00007f297a3a1000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f297a161000)
libicui18n.so.48 => /usr/lib/x86_64-linux-gnu/libicui18n.so.48 (0x00007f2979d9b000)
libicuuc.so.48 => /usr/lib/x86_64-linux-gnu/libicuuc.so.48 (0x00007f2979a2f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2979827000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2979611000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f29793ea000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f29791e7000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f2978fe1000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f2978ddb000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f2978bd5000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f29789ca000)
libicudata.so.48 => /usr/lib/x86_64-linux-gnu/libicudata.so.48 (0x00007f2977659000)@ -
The output seems good...
Can you do the same on the example executable ?
-
Sure, thanks for the help. Running ldd on the plugandpaint executable gives this:
@ubuntu@ip-10-179-20-174:~/qt5/qtbase/examples$ ldd ./widgets/tools/plugandpaint/plugandpaint
linux-vdso.so.1 => (0x00007fff007fe000)
libQt5Widgets.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5Widgets.so.5 (0x00007f04a2564000)
libQt5Gui.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5Gui.so.5 (0x00007f04a1d8b000)
libQt5Core.so.5 => /home/ubuntu/qt5/qtbase/lib/libQt5Core.so.5 (0x00007f04a15c0000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f04a12b2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f04a0fad000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f04a0be4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f04a09c7000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f04a068d000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f04a0475000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f04a0217000)
libicui18n.so.48 => /usr/lib/x86_64-linux-gnu/libicui18n.so.48 (0x00007f049fe51000)
libicuuc.so.48 => /usr/lib/x86_64-linux-gnu/libicuuc.so.48 (0x00007f049fae5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f049f8e1000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f049f5e5000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f049f3dc000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f049f1c6000)
/lib64/ld-linux-x86-64.so.2 (0x00007f04a2eec000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f049efa7000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f049ed81000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f049eb6f000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f049e96b000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f049e765000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f049e563000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f049e34b000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f049e146000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f049df40000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f049dd34000)
libicudata.so.48 => /usr/lib/x86_64-linux-gnu/libicudata.so.48 (0x00007f049c9c4000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f049c784000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f049c580000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f049c37a000)@ -
After re-reading your first post carefully, I think I found where the problem lies.
Since you are running the application directly from the command line, the "deployment":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-x11.html rules apply to allow your application to find the platform plugin (You can use the script option or qt.conf)
-
-
You're welcome !
You can also use the qt.conf file to tell Qt where to find the plugins