Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt 5.15.2 arm64 SDK cross compilation failure



  • First of all, thanks for reading.

    I stuck with generating the Qt framework for cross-compilation.
    The target platform is the Raspberry Pi 4 with Ubuntu + arm64, NOT raspbian + armhf.
    Most of the resolvable errors are gone, like the usual sysroot, symlink-correction and OpenGL lib includes, now I really can't find how to continue.
    Configuration is OK, the .config is called like this:

    ./configure -release -qt-zlib -opengl es2 -linuxfb -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -qpa eglfs -v
    

    Build is also successful, but the "make install" fails:

    Makefile ~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport/serialport.pro ) && make -f Makefile install
    make[3]: Entering directory '~/raspi/build/qtserialport/src/serialport'
    /usr/bin/aarch64-linux-gnu-g++ -c -march=armv8-a -mtune=cortex-a72 --sysroot=~/raspi/sysroot -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport -I. -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/include -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/include/QtSerialPort -I../../include -I../../include/QtSerialPort -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/include/QtSerialPort/5.15.2 -I~/raspi/qt-everywhere-src-5.15.2/qtserialport/include/QtSerialPort/5.15.2/QtSerialPort -I../../include/QtSerialPort/5.15.2 -I../../include/QtSerialPort/5.15.2/QtSerialPort -I~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2 -I~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2/QtCore -I~/raspi/build/qtbase/include/QtCore/5.15.2 -I~/raspi/build/qtbase/include/QtCore/5.15.2/QtCore -I~/raspi/qt-everywhere-src-5.15.2/qtbase/include -I~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore -I~/raspi/build/qtbase/include -I~/raspi/build/qtbase/include/QtCore -I.moc -I~/raspi/qt-everywhere-src-5.15.2/qtbase/mkspecs/devices/linux-rasp-pi4-v3d-g++ -o .obj/qserialportinfo_unix.o ~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport/qserialportinfo_unix.cpp
    In file included from ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/qglobal.h:1,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/tools/qalgorithms.h:43,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/qalgorithms.h:1,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:43,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/qlist.h:1,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport/qserialportinfo.h:44,
                     from ~/raspi/qt-everywhere-src-5.15.2/qtserialport/src/serialport/qserialportinfo_unix.cpp:42:
    ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: Required feature library for file ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h not available.
      121 |   define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
          |                                                              ^~~~~~~~~~~~~~~
    
    ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:87:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
       87 | #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
          |                                    ^~~~~~~~~~~~~~~~~
    ~/raspi/qt-everywhere-src-5.15.2/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
       45 | QT_REQUIRE_CONFIG(library);
          | ^~~~~~~~~~~~~~~~~
    make[3]: *** [Makefile:1368: .obj/qserialportinfo_unix.o] Error 1
    make[3]: Leaving directory '~/raspi/build/qtserialport/src/serialport'
    make[2]: *** [Makefile:59: sub-serialport-install_subtargets] Error 2
    make[2]: Leaving directory '~/raspi/build/qtserialport/src'
    make[1]: *** [Makefile:61: sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '~/raspi/build/qtserialport'
    make: *** [Makefile:222: module-qtserialport-install_subtargets] Error 2
    

    Any tips?

    Thanks in advance!



  • I am also getting same error.Working on jetson TX2 cross compilation on qt 5.15.0.Please help me to solve this.


Log in to reply