I’m able to cross-compile certain Qt 6 applications for AArch64 from an x86_64 host by setting QT_HOST_PATH
to “/usr”, but all the KDE applications I’ve tried to cross-compile that way have given me this error:
CMake Warning at /usr/share/ECM/modules/ECMQueryQt.cmake:95 (message):
Failed call: /usr/aarch64-chimera-linux-musl/usr/lib/qt6/bin/qtpaths
--query QT_INSTALL_PREFIX
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:197 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:15 (include)
CMake Error at /usr/share/ECM/modules/ECMQueryQt.cmake:96 (message):
Qt6 qtpaths call failed: Unknown system error -8
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:197 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:15 (include)
It seems ECMQueryQt is trying to run qtpaths from the target sysroot.
I looked up ECMQueryQt and found this in its description (sorry, I can’t post the link because my account is new):
For Qt5 this uses
qmake
, and for Qt6 this usedqtpaths
(the latter has built-in support to query the paths of a target platform when cross-compiling).
So I assume supporting cross-compiling is a goal for this module, but I’m struggling to figure out how to do it. I can’t seem to find anything at all on this topic by searching online.