I need help setting up a cross-compilation environment to develop Qt GUI apps on an x86-64 Ubuntu Linux PC to be run on a Raspberry Pi 4.
I tried following this guide: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
but encountered errors I don’t know how to fix on the step “Building Qt 6 for Host Machine” where you enter “cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/qt-host”
There were a ton of warnings and then it stopped with the error “CMake error at qtgraphs/CMakeLists.txt:14 (find_package)” Could not find a configuration file for package “Qt6” that is compatible with requested version “6.9.0”. The following configuration files were considered but not accepted: “/home/[user]/qt-hostbuild/qtbase/lib/Qt6/Qt6Config.cmake, version: 6.4.0”
It seems like every single guide I find and try to follow, most of which take HOURS of time to follow, ends up failing because they are all outdated. Things change and then anything older than a few weeks or months doesn’t work correctly anymore.
Any help would be appreciated.