Jump to content
a.biancalani@microtechsrl.

Error during Cross Compile Qt 5.15

Recommended Posts

Hello,

I have tried to cross compile the qt 5.14 for the Asus Tinkerboard 2S with Debian 10 v2.0.4.

For do this I have followed the guide at this link: https://forum.qt.io/topic/83776/can-t-build-qt-for-tinkerboard/6.

Following the guide on the TinkerBoard I have installed rsync and all the dependency packages of the guide (Part1, Command 9 form a to m) .

After I have created the destination directory for Qt5.

After I hade prepared a VM with Ubuntu 20.04 and following the guide I have installed the compile component, downloaded the Linaro Toolchain, create directory of the sysroot and do the rsync with the TinkerBoard.

With the command  wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py I have downloaded the python script for make the symlink and after I have executed that.

After I have downloaded the sorce code of Qt 5.14 and with this command I have configured the build directory: ../qt-everywhere-src-5.14.0/configure -release -opengl es2 -nomake examples -nomake tests -opensource -confirm-license -v -device tinkerboard -device-option CROSS_COMPILE=/opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /opt/qt5tinker/sysroot -prefix /usr/local/qt5

The problem is that this last command give me this error:

This is the Qt Open Source Edition.

You have already accepted the terms of the Open Source license.

Running configuration tests...
Checking for machine tuple... 
+ /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -dumpmachine
> arm-linux-gnueabihf
test config.qtbase.tests.machineTuple succeeded
Checking for valid makespec... 
+ cd /opt/qt5tinker/qt5build/config.tests/verifyspec && /opt/qt5tinker/qt5build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/opt/qt5tinker/sysroot" "QMAKE_CXXFLAGS += --sysroot=/opt/qt5tinker/sysroot" "QMAKE_LFLAGS += --sysroot=/opt/qt5tinker/sysroot" -early "CONFIG += cross_compile" /opt/qt5tinker/qt-everywhere-src-5.14.0/qtbase/config.tests/verifyspec
+ cd /opt/qt5tinker/qt5build/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
> /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -mtune=cortex-a17 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard --sysroot=/opt/qt5tinker/sysroot -O2 -w -fPIC  -I/opt/qt5tinker/qt-everywhere-src-5.14.0/qtbase/config.tests/verifyspec -I. -I/opt/qt5tinker/qt-everywhere-src-5.14.0/qtbase/mkspecs/devices/linux-tinkerboard-g++ -o verifyspec.o /opt/qt5tinker/qt-everywhere-src-5.14.0/qtbase/config.tests/verifyspec/verifyspec.cpp
> /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/opt/qt5tinker/sysroot -Wl,-O1 -Wl,-rpath-link,/opt/qt5tinker/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/qt5tinker/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o      
> /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
> /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
> /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:68: verifyspec] Error 1
Note: Also available for Linux: linux-clang linux-icc

ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

I have tried to change the toolchain but the problem remain.  Seems that it can't find the file crt1.o and crti.o but the two file are present on my sysroot in this path: /opt/qt5tinker/sysroot/usr/lib/aarch64-linux-gnu are also present on the toolchain in this path: opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib.

Anybody can give me an help to resolve this problem?

Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...