Cross Compiling Qt 5.15.1 For Jetson Nano
----------------------------------------------------
download toolchain :
----------------------------------
----------------------------------
gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz
Start :
--------------
# Target Side ( jetson official sd image )
-------------------------------
# nfs server
sudo apt-get install nfs-kernel-server
# confign nfs server
# add this line to /etc/exports
/ *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
service nfs-kernel-server restart
# qtbase
sudo apt-get install libboost1.58-all-dev libudev-dev libinput-dev libts-dev libmtdev-dev libjpeg-dev libfontconfig1-dev libssl-dev libdbus-1-dev libglib2.0-dev libxkbcommon-dev libegl1-mesa-dev libgbm-dev libgles2-mesa-dev mesa-common-dev xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libwayland-dev
# qtmultimedia
sudo apt-get install libasound2-dev libpulse-dev gstreamer1.0-omx libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-alsa
# qtwebengine
sudo apt-get install libvpx-dev libsrtp0-dev libsnappy-dev libnss3-dev
# qtlocation
sudo apt-get install libgeoclue-2-dev libdbus-glib-1-dev libgudev-1.0-dev libbluetooth-dev
# Host Side (ubuntu 64 os)
---------------------------
mkdir /QT-Jetson
mkdir /QT-Jetson/sysroot
mkdir /lib/aarch64-linux-gnu
apt-get install nfs-common
mount (jetson ip}:/ /QT-Jetson/sysroot
mount (jetson ip}:/lib/aarch64-linux-gnu /lib/aarch64-linux-gnu
# extract ( qt source ) qt-everywhere-src-5.15.1.tar.gz to /QT-Jetson/qt-everywhere-src-5.15.1
# extract ( compiler ) gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz
to /QT-Jetson/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu
to /QT-Jetson/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu
cd /QT-Jetson/qt-everywhere-src-5.15.1
note : simple modification :
------------------------------------------------------------------------------------------------------------------------------
in file : ./qtbase/mkspecs/common/sanitize.conf
change last 3 lines
from :
QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
to:
QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined
------------------------------------------------------------------------------------------------------------------------------
/configure -release -opengl es2 -device linux-jetson-tx1-g++ -device-option CROSS_COMPILE=/QT-Jetson/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -sysroot /QT-Jetson/sysroot/ -opensource -confirm-license -make libs -prefix /usr/local/Qt-Jeston-5.15.1 -no-xcb -recheck
make install