PDA

View Full Version : Qt for BeagleBone black



NS22
3rd March 2017, 09:07
Hello everybody,

I am using Qt Creator on my virtual machine (Ubuntu 12.04.5 LTS), and Beaglebone black with touch screen. When i write gui application(only one window with push button) and try to deploy it, i get this 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.
bash: line 1: 907 Aborted DISPLAY=':0.0' /opt/proba/Test/Test
Application finished with exit code 134.

I was searching on the internet and found that this problem i somehow related to libqxcb.so library, i tried ldd libxcb.so command and result is :

linux-vdso.so.1 (0xbef5a000)
libQt5XcbQpa.so.5 => not found
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f67000)
libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0xb6f55000)
libXi.so.6 => /usr/lib/arm-linux-gnueabihf/libXi.so.6 (0xb6f3b000)
libxcb-render-util.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render-util.so.0 (0xb6f30000)
libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0xb6f1a000)
libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0xb6ef7000)
libxcb-render.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render.so.0 (0xb6ee0000)
libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb6ebb000)
libxcb-image.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-image.so.0 (0xb6ea7000)
libxcb-icccm.so.4 => /usr/lib/arm-linux-gnueabihf/libxcb-icccm.so.4 (0xb6e9b000)
libxcb-sync.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb-sync.so.1 (0xb6e85000)
libxcb-xfixes.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-xfixes.so.0 (0xb6e70000)
libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0xb6e5d000)
libxcb-randr.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-randr.so.0 (0xb6e44000)

etc...

As you can see, libQt5XcbQpa.so.5 is not found, even though this library exists in:

-rw------- 1 debian debian 1140 Feb 9 2016 libQt5XcbQpa.la
-rw------- 1 debian debian 1478 Feb 9 2016 libQt5XcbQpa.prl
lrwxrwxrwx 1 debian debian 21 Mar 1 12:34 libQt5XcbQpa.so -> libQt5XcbQpa.so.5.5.1
lrwxrwxrwx 1 debian debian 21 Mar 1 12:34 libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.5.1
lrwxrwxrwx 1 debian debian 21 Mar 1 12:34 libQt5XcbQpa.so.5.5 -> libQt5XcbQpa.so.5.5.1
-rw------- 1 debian debian 602768 Feb 9 2016 libQt5XcbQpa.so.5.5.1

can any one tell me how to solve this problem...

also, also when i start my application it opens terminal...

sory for my bad english.

anda_skoa
3rd March 2017, 11:49
The directory that contains these library files is on the device?

Is that the library location you built against?

Cheers,
_

NS22
3rd March 2017, 12:25
All the directories are on the same device,

but the library that contains libQt5XcbQpa.so.5 is in :

debian@beaglebone:/opt/proba/Test/lib

Also i have script ( start.sh ) thats starts my application :


#!/bin/bash
#start.sh script
export LD_LIBRARY_PATH=/opt/proba/Test/lib/

/opt/proba/Test/Test -platform xcb

Tnx,

anda_skoa
3rd March 2017, 12:42
Ok, strange.

And you ldd output is also from an environment with that LD_LIBRARY_PATH?

Cheers,
_

NS22
3rd March 2017, 12:50
Actually no, ldd output is from directory which is on path : /opt/proba/Test/platforms

Tnx,

anda_skoa
4th March 2017, 12:50
The path is not relevant, does the environment contain the LD_LIBRARY_PATH modification and if yes does ldd show the library as found then?

Cheers,
_

NS22
6th March 2017, 09:36
Answer is no, LD_LIBRARY_PATH is in start.sh file :

#!/bin/bash
# start.sh script

export LD_LIBRARY_PATH=/opt/proba/Test/lib/

/opt/proba/Test/Test -platform xcb

Tnx

anda_skoa
7th March 2017, 09:18
Well, then, have you tried if ldd finds it with that environment?

Cheers,
_

NS22
9th March 2017, 09:19
i'm sorry but i don't understand what are you trying to say, i tried : ldd opt/proba/Test/lib/libqxcb.so


and it gives me result from my first post?

libQt5XcbQpa.so.5 => not found
........
Tnx,

anda_skoa
11th March 2017, 10:31
When you run the ldd command, is the LD_LIBRARY_PATH variable set?

Cheers,
_

NS22
13th March 2017, 11:36
No its not set, but when i set using command:

export LD_LIBRARY_PATH="/opt/proba/Test/lib"

and after that

sudo ldconfig -v

I start my program and this message pops up :

./Test: error while loading shared libraries: /opt/proba/Test/lib/libQt5Widgets.so.5: invalid ELF header

Tnx,

anda_skoa
14th March 2017, 09:36
No its not set

But then the ldd output is a bit irrelevant, since it is not for the situation the program is facing at startup.



but when i set using command:

export LD_LIBRARY_PATH="/opt/proba/Test/lib"

And now ldd succeed?



./Test: error while loading shared libraries: /opt/proba/Test/lib/libQt5Widgets.so.5: invalid ELF header

Run the "file" command on the library file: is it for the correct architecture?

Cheers,
_

NS22
15th March 2017, 10:08
Problem solved, it is needed to uninstall libxcb-xrm0 and libxcb-xrm-dev libraries, which were left from from previous projects,

and now everything works as it should be.

anda_skoa - Thanks for your time and effort

bye for now :)