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

qt embedded jetson-xavier



  • Hello, I have a problem with cross compilation.
    I'll briefly explain my situation.

    Host PC: Ubuntu 18.04
    Target: Jetson AGX Xavier

    What I Want: Configuring the build kit in QT
    Screenshot from 2020-09-11 18-19-53.png

    What I did:

    1. Install ToolChain: gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu
    2. PATH Setting: gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin
      gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/lib
    3. Install: qt-everywhere-src-5.15.0 (for produce crosscompile qmake)
    4. Modifiy qmake.conf:
      I copied qt-everywhere-src-5.15.0/mkspecs/devices/linux-jetson-tx1-g++
      to linux-jetson-agx-xavier
      And I made some changes.
    5. Configure(at qt-everywhere-src-5.15.0/qtbase):
      sudo ./configure -top-level -device linux-jetson-agx-xavier -device-option CROSS_COMPILE=
      /opt/xavier/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -prefix
      /opt/xavier/EmbeddedQt -make libs -no-pch -no-opengl -qt-zlib -qt-libpng -qt-libjpeg -no-cups
      -gui -make examples -opensource -confirm-license -qreal float -v

    Problem:

    1. ERROR: Qt requires a compliant STL library
      ERROR: C++11 <random> is required and is missing or failed to compile.

    /usr/aarch64-linux-gnu/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
    #include_next <stdlib.h>
    ^~~~~~~~~~
    compilation terminated.
    Makefile:179: recipe for target 'main.o' failed
    make: *** [main.o] Error 1

    1. When I searched about this error, I found this link.
      https://git.busybox.net/buildroot/commit/?id=3a0ed5d25e26cb2ec99a1da077c9dcfea67b0ecc

      So, I changed from 'QMAKE_CFLAGS_ISYSTEM = -isystem' to 'QMAKE_CFLAGS_ISYSTEM = ' in below files. But it still doesn't reflect and the build fails.
      qtbase/mkspecs/common/clang.conf
      qtbase/mkspecs/common/gcc-base.conf

    [LOG]

    • cd /opt/xavier/qt-everywhere-src-5.15.0/config.tests/arch && /opt/xavier/qt-everywhere-src-5.15.0/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" -early "CONFIG += cross_compile" /opt/xavier/qt-everywhere-src-5.15.0/qtbase/config.tests/arch
    • cd /opt/xavier/qt-everywhere-src-5.15.0/config.tests/arch && MAKEFLAGS= /usr/bin/make

    /usr/bin/aarch64-linux-gnu-g++ -c -pipe -mtune=cortex-a57.cortex-a53 -march=armv8-a -O2 -w -fPIC -I/opt/xavier/qt-everywhere-src-5.15.0/qtbase/config.tests/arch -I. -isystem /usr/include -isystem /usr/aarch64-linux-gnu/include -isystem /usr/include/aarch64-linux-gnu -I/opt/xavier/qt-everywhere-src-5.15.0/qtbase/mkspecs/devices/linux-jetson-agx-xavier -o arch.o /opt/xavier/qt-everywhere-src-5.15.0/qtbase/config.tests/arch/arch.cpp
    /usr/bin/aarch64-linux-gnu-g++ -Wl,-O1 -Wl,-rpath-link,/usr/lib -Wl,-rpath-link,/usr/aarch64-linux-gnu/lib -Wl,-rpath-link,/usr/lib/aarch64-linux-gnu -Wl,-rpath-link,/lib/aarch64-linux-gnu -o arch arch.o -L/usr/lib -L/usr/aarch64-linux-gnu/lib -L/lib/aarch64-linux-gnu -L/usr/lib/aarch64-linux-gnu
    Detected architecture: arm64 (neon)

    Thanks in advance.

    Screenshot from 2020-09-11 18-31-22.png


Log in to reply