Unsolved Deploy QT 5.14 gui programs on Banana-Pi-M2 Zero Target under Ubuntu Mate
-
People hi
I recently configure Qt 5.14 to build programs for the Banana-Pi M2 zero target where Ubuntu Mate 18 is running with arm-gnueabihf architecture. After successful compilation there are gui compatibility problems on the target.
libQt5Core.so.5.9 is already the newest version by calling apt-get on the target. I still have the version 5.9 after installing qt5-default.
My program requires libQt5Core.so.5.14 on the target.
On my development PC with Ubuntu Linux I recently performed the ./configure, make, make install in order to develop and compile my programs wit QC. /opt/qt5-arm was successfully generated with lib/libQt5Core.so.5.14 and others *.so.5.14 for the architecture arm-gnueabihf.
How can I solve this compatibility problem on the target, is it possible simply to copy the *.so.5.14 and modify PATH, or should I perform the ./configure, make, make install on the target?Thanks.
-
@lo38230 said in Deploy QT 5.14 gui programs on Banana-Pi-M2 Zero Target under Ubuntu Mate:
is it possible simply to copy the *.so.5.14
It is not only possible but required. But do not modify PATH!
Either copy cross compiled Qt libs to the same location on the target device or deploy them together with sour app (same folder as executable). -
Ok thank you. I become now error
./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: versionGLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: version
GLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5)
./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: versionGLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: version
GLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5DBus.so.5)
./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: versionGLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: version
GLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)apt-update (on the target with internet connection) says that 2.27 is already the newest version.
I dont know if the libQt5Widgets.so.5 is a logical name to be redirected to the new verison manually for each.
I downloaded libc6_2.31-0ubuntu9_armhf.deb and install:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
libc6 : Depends: libgcc-s1 but it is not installable
Depends: libcrypt1 (>= 1:4.4.10-10ubuntu4) but it is not installable
E: Unable to correct problems, you have held broken packages.Then
sudo apt-get install ./libcrypt1_4.4.16-1_armhf.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcrypt1' instead of './libcrypt1_4.4.16-1_armhf.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
libcrypt1 : Breaks: libc6 (< 2.29-4) but 2.27-3ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.There is also chained dependencies problems. I don't know if it woul be better to add a new source url to the aptitude list in order to update automatically the libraries.
-
@lo38230 There is no need to install libc.
What does
ldd PATH_TO_YOUR_APP
output on your device?
Did you use sysroot from your device to cross-compile Qt and your app? -
This is the result from ldd on the target:
pi@bpi-iot-ros-ai:/opt/guiapp$ ldd ./guiapp
./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: versionGLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: version
GLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5)
./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: versionGLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: version
GLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5DBus.so.5)
./guiapp: /lib/arm-linux-gnueabihf/libm.so.6: versionGLIBC_2.29' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5) ./guiapp: /lib/arm-linux-gnueabihf/libc.so.6: version
GLIBC_2.28' not found (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)
linux-vdso.so.1 (0xbece7000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0xb6e02000)
libQt5Widgets.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5 (0xb695b000)
libQt5Gui.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 (0xb64db000)
libQt5Xml.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Xml.so.5 (0xb64a1000)
libQt5Network.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5 (0xb635b000)
libQt5DBus.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5DBus.so.5 (0xb62df000)
libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0xb5e0a000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb5de5000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb5cd2000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb5ca9000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb5baf000)
/lib/ld-linux-armhf.so.3 (0x7f57f000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb5b2e000)
libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0xb5b10000)
libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0xb5ae0000)
libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb5ab6000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb5aa3000)
libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb5a25000)I never used a sysroot. I cross-compiled Qt5.14 for armhf 32 bits (Target is a Banana Pi M2 Zero) from a package named QtEverywhere with output in /opt/qt5-arm on my development PC with ubuntu linux 20 64 bits. I cross-compiled the operating system Ubuntu MATE for armhf 32 bits with output a disk image for the target, it has started, I connected the target to internet and my development PC through wifi and ethernet. After that I did an apt-upgrade on the target to Ubuntu MATE 18, it starts with a new desktop. Curiously on the target there is a /usr/lib/arm-linux-gnueabihf/ directory containing some libQt5*.so.5.9 not upgradable with apt which says that 5.9 is already the newest version. This directory is already here, no Idea which application put that here, I don't remember having done a deployment with 5.9. Like you advice in the last message I copied the libQt5*.so.5.14 I cross-compiled from my development PC /opt/qt5-arm/lib/ to the taget bananapi in this /usr/lib/arm-linux-gnueabihf/ directory whitout looking if there is some logical name to be redirected on 5.14 .
It looks like some libraries and depenencies must be upraged, but manually. I have seen some new 5.14 new .deb packages downloadable. The simply solution would be to know an url to be added to apt update list wich could upgrade them automatically. I can create a new GUI application with an empty Window in QC 5.14, it compile without error and starts on the target. I try to start an application adapted for qt5 with some emits that compile without error on the development pc and I see those errors, or some symbols where not found. -
@lo38230 said in Deploy QT 5.14 gui programs on Banana-Pi-M2 Zero Target under Ubuntu Mate:
/usr/lib/arm-linux-gnueabihf/ directory containing some libQt5*.so.5.9 not upgradable with apt which says that 5.9 is already the newest version. This directory is already here, no Idea which application put that here
Apparently it is Qt provided by Ubuntu.
"The simply solution would be to know an url to be added to apt update list wich could upgrade them automatically" - this is not really the correct solution. Correct solution is to cross compile using a sysroot which contains exactly the libs from your target device...
-
Ok I will try to find a sysroot and do that..
Is it necessary to generate again Qt5.14 for armhf with configure(sysroot in parameter), make, make install or only give the sysroot path in the kit configuration window from qt creator? -
@lo38230 said in Deploy QT 5.14 gui programs on Banana-Pi-M2 Zero Target under Ubuntu Mate:
I will try to find a sysroot and do that
You can simply use the root filesystem of your device as sysroot.
Yes, you should also build Qt with sysroot. -
When I finished to adjust the version of libc the complete qt gui application didnt start wit a message like couldnt find a platform plugin.
I finally downloaded qt-everywhere-src-5.15.0, /media/eric/BPI-ROOT is the micro sdcard containing the os running under bananapi M2 zero with ubuntu Mate which I connected to my development pc with ubuntu 20 64 bits.
The command line would look like this?
./configure -release -sysroot /media/eric/BPI-ROOT -opensource -xplatform linux-arm-gnueabihf-g++ -prefix /opt/qt5.15.0-arm
should I add some platform options like -eglfs -gui -widgets ?
Or the command line should look like this?
./configure -release -opensource -opengl es2 -device linux-generic-g++ -device-option CROSS_COMPILE=/home/eric/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux/bin/arm-linux-gnueabihf- -sysroot /media/eric/BPI-ROOT -prefix /opt/qt5.15.0-arm
It exists a specific device for raberry pi but I didnt find for bananapi, I also choosed linux-generic-g++.
Should I use the option xplatform instead of device?
or using xplatform option instead of device?It seems that this command line:
./configure -release -opensource -xplatform linux-arm-gnueabihf-g++ -prefix /opt/qt5-arm
was working under the qt-everywhere-src-5.14.2 package
but now it doesn't work with the package qt-everywhere-src-5.15.0
The error issue is :Checking for valid makespec... Note: Also available for Linux: linux-clang linux-icc
ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.