hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Qt project deployment on rpi 3 board

Fri Jul 20, 2018 9:15 am

I am done with cross compiling Qt 5.10.1 for rpi 3 board and took me nearly 7-8 days. now everything is set and when i tried to run the deployed project on rpi3 : while i tried to run
The error popped out:
relocation error: ./hello: symbol _ZTVN10_cxxabiv120_si_class_type_infoE, version Qt_5 not defined in file libQt5core.so.5 with link time reference.

i have used follwing website for cross compilation
https://wiki.qt.io/RaspberryPi2EGLFS

this may be issue of old version libraries on rpi as i haev downloaded qt4-x11 on rpi as per this tutorial. am i correct ??? please help me, if anybody having any idea??

User avatar
topguy
Posts: 4997
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt project deployment on rpi 3 board

Fri Jul 20, 2018 10:19 am

Have you uninstalled all old Qt5 libraries on the Pi ?
And you have installed all the new Qt5.10 libraries somewhere ?

How did you deploy and run the software ?

If you locate the deployed binary and run "ldd nameofbinary" it will list all dependencies and where they are found.
You can then verify if the dynamic linker actually uses your new Qt libraries.

If you see old libraries and want to know which package to uninstall then "dpkg -S" can be used.

example:

Code: Select all

[email protected]:~$ dpkg -S /usr/lib/arm-linux-gnueabihf/libcwidget.so.3
libcwidget3:armhf: /usr/lib/arm-linux-gnueabihf/libcwidget.so.3

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Mon Jul 23, 2018 10:19 am

topguy wrote:
Fri Jul 20, 2018 10:19 am
Have you uninstalled all old Qt5 libraries on the Pi ?
And you have installed all the new Qt5.10 libraries somewhere ?

How did you deploy and run the software ?

If you locate the deployed binary and run "ldd nameofbinary" it will list all dependencies and where they are found.
You can then verify if the dynamic linker actually uses your new Qt libraries.

If you see old libraries and want to know which package to uninstall then "dpkg -S" can be used.

example:

Code: Select all

[email protected]:~$ dpkg -S /usr/lib/arm-linux-gnueabihf/libcwidget.so.3
libcwidget3:armhf: /usr/lib/arm-linux-gnueabihf/libcwidget.so.3
thanks fr reply,

i haven't uninstalled any of libraries from rpi,

i installed qt libraries on rpi using commands mentioned in tutorial:
sudo apt-get build-dep libqt5gui5

i deployed my program through LAn connection between rpi and PC.

User avatar
topguy
Posts: 4997
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt project deployment on rpi 3 board

Mon Jul 23, 2018 11:07 am

So you have done both steps 11 and 13 in that guide without any errors ?

Like I said, you have to make sure that any Qt libraries found if you do the command "ldd ./hello" are all located in "/usr/local/qt5pi/lib" where you installed Qt5.10.

aBUGSworstnightmare
Posts: 1104
Joined: Tue Jun 30, 2015 1:35 pm

Re: Qt project deployment on rpi 3 board

Mon Jul 23, 2018 2:51 pm

When I Need to install Qt5 on RPi I only use below command

Code: Select all

sudo apt install qtcreator qttools5-dev qtbase5-dev qt5-default qtdeclarative5-dev libqt5svg5-dev libqtwebkit-dev libqt5webkit5-dev libsdl1.2-dev build-essential libudev-dev qtmultimedia5-dev
This installs all you should need to build your app. No need to compile it yourself (if you do not need the absolute latest version)

Edit: and yes, this is confirmed working as I just build some UAV ground Control Software this weekend.

User avatar
topguy
Posts: 4997
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt project deployment on rpi 3 board

Mon Jul 23, 2018 4:36 pm

We dont know why threadstarter chose to crosscompile but if he/she wants to continue with Qt5.10 with EGLFS support the installing old Qt5.7 packages is not the correct way.

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Tue Jul 24, 2018 12:24 pm

aBUGSworstnightmare wrote:
Mon Jul 23, 2018 2:51 pm
When I Need to install Qt5 on RPi I only use below command

Code: Select all

sudo apt install qtcreator qttools5-dev qtbase5-dev qt5-default qtdeclarative5-dev libqt5svg5-dev libqtwebkit-dev libqt5webkit5-dev libsdl1.2-dev build-essential libudev-dev qtmultimedia5-dev
This installs all you should need to build your app. No need to compile it yourself (if you do not need the absolute latest version)

Edit: and yes, this is confirmed working as I just build some UAV ground Control Software this weekend.
does this means you installed Qt on rpi itself?? i was trying not to installl QT on rpi. how much time does that takes to compile on rpi as compare to a PC? i heard that rpi takes mpore time as compared to PC during compiling of Qt code thats why i chosen the path of cross compilation.

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Tue Jul 24, 2018 12:30 pm

topguy wrote:
Mon Jul 23, 2018 11:07 am
So you have done both steps 11 and 13 in that guide without any errors ?

Like I said, you have to make sure that any Qt libraries found if you do the command "ldd ./hello" are all located in "/usr/local/qt5pi/lib" where you installed Qt5.10.

yes i have done both steps 11 and 13 without errors

i have not installed Qt 5.10 on rpi i have installed them on PC. when i run the ldd ./hello command i got list of libraries which are present in following folder /usr/lib/arm-linux-gnueabihf shown in my rpi terminal means libraries are present in /usr/lib/arm-linux-gnueabihf.

User avatar
joan
Posts: 13616
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Qt project deployment on rpi 3 board

Tue Jul 24, 2018 12:32 pm

Surely the compilation time on the Pi will be insignificant compared to the overall software development time.

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Tue Jul 24, 2018 12:34 pm

topguy wrote:
Mon Jul 23, 2018 4:36 pm
We dont know why threadstarter chose to crosscompile but if he/she wants to continue with Qt5.10 with EGLFS support the installing old Qt5.7 packages is not the correct way.
sorry i did not get you although i have installed Qt 5.10.1 on my PC, as wiki page says that this method is tested for this version which they installed on the desktop and on rpi i dowloaded libraries according to their instructions, so i am not getting where i have done wrong.

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Tue Jul 24, 2018 12:43 pm

joan wrote:
Tue Jul 24, 2018 12:32 pm
Surely the compilation time on the Pi will be insignificant compared to the overall software development time.
ok then i will directly install pi on rpi board, the issue only was that i may have to develope GUI for many rpi boards in form of product and for that i will have to install QT on each of rpi boards, i was thinking that only by installing libraries if i can manage my work.

User avatar
topguy
Posts: 4997
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt project deployment on rpi 3 board

Wed Jul 25, 2018 9:54 am

If you had started by explaining what your final goal was then we could have given good answers earlier.

So here is a control question:
- What type of application are you going to develop ?
- Standard "Window" based application..
- or Mobile style "apps", fullscreen and maybe with touch support..

You mention wanting to avoid extra deployment work but with Qt ( since it can do so much different things ) has a lot of dependencies.
So some extra packages also has to be installed on the target computer. It will be hard to avoid that.

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: Qt project deployment on rpi 3 board

Wed Jul 25, 2018 10:03 am

topguy wrote:
Wed Jul 25, 2018 9:54 am
If you had started by explaining what your final goal was then we could have given good answers earlier.

So here is a control question:
- What type of application are you going to develop ?
- Standard "Window" based application..
- or Mobile style "apps", fullscreen and maybe with touch support..

You mention wanting to avoid extra deployment work but with Qt ( since it can do so much different things ) has a lot of dependencies.
So some extra packages also has to be installed on the target computer. It will be hard to avoid that.
i want to develope full screen application with touch support which takes data from UART and send some data to some other device also. i don't want to avoid extra developement work, i already struggled for two weeks with cross compiling thing of Qt for rpi3, searched many forums, i somehow managed to cross compile but i now i am facing problems with running the deployed executable Qt program. i am getting error as mentioned can you suggest me which command i should use to download libraries or dependencies on my rpi, as i am using Qt 5.10.1 on linux PC.

Heater
Posts: 10274
Joined: Tue Jul 17, 2012 3:02 pm

Re: Qt project deployment on rpi 3 board

Wed Jul 25, 2018 10:25 am

hem,

You now have this question being discussed in two threads that you have started.

Please don't do that it is very confusing and time wasting for us volunteer helpers.

See my reply in your other thread today:

viewtopic.php?f=67&t=218575#p1344933

Return to “Graphics programming”