PDA

View Full Version : libqxcb.so doesnt find Qt libraries



adutzu89
19th November 2016, 17:56
So I managed to link my application to the correct libraries using qt.conf, but when I try to run it crashes because it cannot load the plugin, the plugin is found becaue I copied all plugins and it shows me the list as available.
When using
ldd libqxcb.so, it shows it's missing the Qt5 libraries but when using ldd against my executable it shows them as found.

Any ideeas why?

adutzu89
22nd November 2016, 18:41
Can someone please explain to me how qt.conf works? I don't seem to understand the documentation page: http://doc.qt.io/qt-5/qt-conf.html, since the application still cannot find the libraries.

I want to use the deployed libraries stored in "libs" directory which is in <executable-directory>/libs.
I have added qt.conf to the resource system. Do I have to add it to a specific directory?(":/qt/etc/qt.conf", I don't understand what's with this path in doc page).

This is what my qt.conf has in it:
<RCC/>
[Paths]
Libraries = libs

anda_skoa
22nd November 2016, 20:47
Can someone please explain to me how qt.conf works? I don't seem to understand the documentation page: http://doc.qt.io/qt-5/qt-conf.html, since the application still cannot find the libraries.

I want to use the deployed libraries stored in "libs" directory which is in <executable-directory>/libs.
I have added qt.conf to the resource system. Do I have to add it to a specific directory?(":/qt/etc/qt.conf", I don't understand what's with this path in doc page).

I haven't used qt.conf myself, but yes, that's what the documentation says.
If you want to stored it in the resource system, it needs to be found under prefix "/qt/etc"



This is what my qt.conf has in it:
<RCC/>
[Paths]
Libraries = libs
Is that a mistype or does it really contain that XML-like tag at the beginning?

Cheers,
_

adutzu89
22nd November 2016, 21:20
s that a mistype or does it really contain that XML-like tag at the beginning?


Made the file with the New Resource File option from QtCreator so I left it untouched, without it doesn't make any difference.

So, I tried the following variations for the directory tree:
<main-directory>/Executable
<main-directory>/lib
<main-directory>/platforms
<main-directory>/qml
<main-directory>/libexec
<main-directory>/qt.conf

<main-directory>/Executable
<main-directory>/platforms
<main-directory>/qml
<main-directory>/libexec
<main-directory>/qt.conf
<main-directory>/<all-required-libraries>

<main-directory>/Executable
<main-directory>/lib
<main-directory>/platforms
<main-directory>/qml
<main-directory>/libexec
<main-directory>/qt/etc/qt.conf

<main-directory>/Executable
<main-directory>/lib
<main-directory>/platforms
<main-directory>/qml
<main-directory>/libexec
<main-directory>/qt/etc/qt.conf
<main-directory>/qt.conf

The result is the same: libraries aren't found.

anda_skoa
23rd November 2016, 09:34
Made the file with the New Resource File option from QtCreator so I left it untouched, without it doesn't make any difference.

Which doesn't make sense, qt.conf is an INI file.



So, I tried the following variations for the directory tree:

You mean in the file system?

And with a correctly formatted qt.conf?

Cheers,
_

adutzu89
24th November 2016, 09:24
You mean in the file system?
<main-directory> is the directory containing the executable files and those paths are relative to that directory not to system root .


And with a correctly formatted qt.conf?
This what qt.conf contains:
[Paths]
Libraries = libs

anda_skoa
24th November 2016, 13:04
That looks all correct as far as I can tell.

What you could try instead is a different approach, i.e. with a start script that sets the LD_LIBRARY_PATH environment variable to include the directory where your Qt libs are.

Cheers,
_

adutzu89
1st December 2016, 15:10
Trying your option with LD_LIBRARY_PATH but it says
could not find or load Qt platform plugin "xcb"

anda_skoa
2nd December 2016, 07:55
Does ldd on the plugin show the libraries as resolved now, when you run from an environment with the LD_LIBRARY_PATH set?

Cheers,
_

adutzu89
2nd December 2016, 09:44
ldd on libqxcb.so:

linux-vdso.so.1 => (0x00007ffce04f3000)
libQt5XcbQpa.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5XcbQpa.so.5 (0x00007f0fe95ee000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f0fe93d6000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f0fe91c6000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f0fe8fbe000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f0fe8da3000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f0fe8b57000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f0fe8935000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f0fe8732000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0fe852a000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f0fe8219000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f0fe800e000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f0fe7dfc000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f0fe7ac2000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f0fe787e000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f0fe75d4000)
libEGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1 (0x00007f0fe73a2000)
libQt5Gui.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Gui.so.5 (0x00007f0fe6baf000)
libQt5DBus.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5DBus.so.5 (0x00007f0fe692f000)
libQt5Core.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Core.so.5 (0x00007f0fe6218000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f0fe5fa6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0fe5d89000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0fe5a07000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0fe56fd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0fe54e7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0fe511e000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f0fe4f18000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f0fe4e93000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f0fe4c8e000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f0fe4a88000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f0fe4818000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0fe4613000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f0fe43ea000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0fe41d0000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f0fe3faa000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f0fe3da5000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f0fe3ba2000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f0fe399e000)
libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f0fe3796000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f0fe358f000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f0fe338b000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f0fe317d000)
libwayland-server.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007f0fe2f6c000)
libgbm.so.1 => /usr/lib/x86_64-linux-gnu/libgbm.so.1 (0x00007f0fe2d5d000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f0fe2b4e000)
libicui18n.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicui18n.so.56 (0x00007f0fe26b3000)
libicuuc.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicuuc.so.56 (0x00007f0fe22fb000)
libicudata.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicudata.so.56 (0x00007f0fe0918000)
/lib64/ld-linux-x86-64.so.2 (0x000055f67c95f000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f0fe06e9000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f0fe04e6000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f0fe02e0000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f0fe00c6000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f0fdfec0000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f0fdfc9d000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f0fdfa7b000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f0fdf79a000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f0fdf591000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f0fdf37c000)

ldd on executable:

linux-vdso.so.1 => (0x00007ffc04be4000)
libQt5WebEngine.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5WebEngine.so.5 (0x00007f124c017000)
libQt5Gui.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Gui.so.5 (0x00007f124b824000)
libQt5Qml.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Qml.so.5 (0x00007f124b229000)
libQt5DBus.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5DBus.so.5 (0x00007f124afa9000)
libQt5Core.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Core.so.5 (0x00007f124a891000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f124a4fa000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f124a2e4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1249f1a000)
libQt5WebEngineCore.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5WebEngineCore.so.5 (0x00007f1245504000)
libQt5Quick.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Quick.so.5 (0x00007f1244f13000)
libQt5WebChannel.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5WebChannel.so.5 (0x00007f1244cf5000)
libQt5Network.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Network.so.5 (0x00007f1244995000)
libQt5Positioning.so.5 => /home/adi/Desktop/Cumulus-test/lib/libQt5Positioning.so.5 (0x00007f1244756000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1244538000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f12442c7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1243fbe000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1243da3000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1243b9b000)
/lib64/ld-linux-x86-64.so.2 (0x0000558a10183000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f124394e000)
libicui18n.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicui18n.so.56 (0x00007f12434b4000)
libicuuc.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicuuc.so.56 (0x00007f12430fc000)
libicudata.so.56 => /home/adi/Desktop/Cumulus-test/lib/libicudata.so.56 (0x00007f1241719000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1241514000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f1241312000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1241001000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f1240dad000)
libsmime3.so => /usr/lib/x86_64-linux-gnu/libsmime3.so (0x00007f1240b81000)
libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so (0x00007f124083a000)
libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so (0x00007f124060d000)
libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so (0x00007f12403ce000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f124018a000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f123fee0000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f123fba6000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f123f995000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f123f78b000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f123f579000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f123f372000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f123f168000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f123ef65000)
libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007f123ec64000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f123ea61000)
libXtst.so.6 => /usr/lib/x86_64-linux-gnu/libXtst.so.6 (0x00007f123e85b000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f123e4a0000)
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007f123e263000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f123e039000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f123de36000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f123dc33000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f123da2b000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f123d828000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f123d5fa000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f123d3f7000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f123d1de000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f123cfd9000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f123cdb6000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f123cbb0000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f123c9a1000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f123c91b000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f123c6ab000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f123c4a2000)
libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so (0x00007f123c29d000)
libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so (0x00007f123c099000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f123be73000)
libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f123badf000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f123b8bc000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f123b6b8000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f123b4b1000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f123b28f000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f123afae000)
libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f12394f6000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f12392e2000)

adutzu89
3rd December 2016, 11:33
I have managed to advance another step after thet qt.conf failure I tried putting the libqxcb.so file inside plugins directory instead of platforms and forgot to change it back :).
After changing back to platforms and using LD_LIBRARY_PATH I get the following issue:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

This issue is existent both in Xubuntu 16.04.1 Virtualbox guest and on a laptop with Ubuntu 14.04.5.

anda_skoa
3rd December 2016, 12:07
Sounds like your Qt was built without OpenGL support.

Cheers,
_

adutzu89
3rd December 2016, 15:31
Sounds like your Qt was built without OpenGL support.

Cheers,
_

Used the online installer, didn't built Qt myself.

anda_skoa
3rd December 2016, 21:41
Hmm. Other OpenGL applications work on the target system?

Cheers,
_

adutzu89
7th December 2016, 07:24
It seems the cause of the QXcbIntegration issue was the fact that I wasn't loading the xcbintegrations plugin (didn't deployed it previously), :D neither I have read that I actually need to load other plugins except platforms(tough seems logical), I will give it another test deployment this evening after work.
It's strange tough, I remember putting it at one time and still didn't worked but probably I was missing something else(maybe the library dependency of the plugin at the time was not copied at the time the plugin was).

I'm facing another issue:
Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
QQmlComponent: Component is not ready
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter

adutzu89
8th December 2016, 06:40
I was not deploying the Qml QtWebEngine module, just QtWebView that's why I got :

Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
QQmlComponent: Component is not ready
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter

On a side note, my main laptop where I do the development loads the qt.conf but when I deploy the application on the guest virtualbox guest machine(which has an Xubuntu 16.04.1) the qt.conf file isn't loaded until I do a export of LD_LIBRARY_PATH with the path to my libraries.