how to set sysroot correctly when cross-build arm qmake tools on x86 host?
-
hello,
I want to build arm qt development environment on a x86 host machine,
the target root fs is mounted to /mnt directory,
so when do the qt-everywhere configure, I doHOSTBINDDIR=host_install_x86 (point to the directory which contains a x86 qmake tool)
SYSROOT=/mnt
../configure -v
-prefix /usr/local/Qt-arm
-extprefix ${EXTPREFIX}
-external-hostbindir ${HOSTBINDDIR}
-platform linux-aarch64-gnu-g++
-device linux-rasp-pi4-v3d-g++
-device-option CROSS_COMPILE=aarch64-linux-gnu-
-sysroot ${SYSROOT}
.......but when gmake over, copy the files from x86 host ${EXTPREFIX} to arm target /usr/local/Qt-arm dir.
and then on arm target, go to my qt project directory, do
/usr/local/Qt-arm/bin/qmake -spec /usr/local/Qt-arm/mkspecs/devices/linux-......
but then I find that in the generated Makefile, the sysroot is set to /mnt, not /. and it should be set to /.in conclusion, when build arm target qt tools on x86 host, I want sysroot be set to /mnt (where target root is mounted),
and when build apps on arm target, I want sysroot be set to /.so, how to configure ?
thanks. -
oh, I find I can fix it after build over,
by edit the mkspecs/qconfig.pri file,set the QT_SYSROOT to /。
although it‘s not the best solution。 -