Problem configuring cross compilation for Raspberry Pi 3 B+
-
Hello, I'm following this guide:
https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
To cross-compile Qt 6 for a Raspberry PI 3B+ with a Raspberry Pi OS 32 bits.
When trying to execute the command (You can find it in the guide under Building Qt 6 for Target Device):cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_opengles2=ON -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=$HOME/qt-host -DCMAKE_STAGING_PREFIX=$HOME/qt-raspi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DQT_FEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON
I get the following error:
CMake Error at qtbase/cmake/QtToolHelpers.cmake:184 (message): Failed to find the host tool "Qt6::qdoc". It is part of the Qt6ToolsTools package, but the package did not contain the tool. Make sure that the host module Tools was built with all features enabled (no explicitly disabled tools). Call Stack (most recent call first): qttools/src/qdoc/CMakeLists.txt:20 (qt_internal_add_tool)
I made a modification to the command. I added the -DQT_FEATURE_opengles2=ON flag because I was getting the same error detailed here, but that did the trick.
I have a few questions:
- Is it okay to use this guide for a Raspberry Pi 3 B+? I haven't found a guide for installing Qt 6 on this particular model, and I have no experience in this kind of work, it's the first time I try to cross compile for a Raspberry Pi.
- Is it ok to use a 32 bit version of Raspberry Pi OS or should I use a 64 bit one?
- Is the command ok? Knowing that it's for a Raspberry Pi 3, I'm having my doubts about the -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 part of the command.
- How can I solve the error mentioned above? Could it be related to the deactivation of webengine that I made? I used the command:
cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_FEATURE_webengine=OFF -DCMAKE_INSTALL_PREFIX=$HOME/qt-host
when building Qt6, at the Building Qt 6 for Host Machine section. Maybe it had an impact on the Qt6ToolsTools package?
Thank you all in advance.