Hi ,I have builded tdx-reference-multimedia-image with meta-qt6 layer added successfully. But when I try to build a qt6 project using qt6-qmake I got error as “Could not find qmake spec ‘linux-oe-g++”.
When I try to build it using qt6-cmake , I got error as – Could NOT find Qt6Quick (missing: Qt6Quick_DIR)
CMake Error at CMakeLists.txt:15 (find_package):
Found package configuration file:
/home/shanmugapriyan/oe-core/build/tmp/work/cortexa72-cortexa53-tdx-linux/automotive/1.0-r0/recipe-sysroot-native/usr/lib/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package “Qt6” is considered to be NOT
FOUND. Reason given by package:
Failed to find required Qt component “Quick”.
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?

Hello,
It seems like you’re encountering issues with building a Qt6 application due to missing components or misconfiguration in your environment setup. The errors you’re facing, such as “Could not find qmake spec ‘linux-oe-g++’” and issues with finding Qt6Quick, suggest that there might be a problem with how the Qt6 environment is set up in your Yocto build.
-
For the qmake issue, it’s likely that the Qt6 build environment isn’t properly sourced or the meta-qt6 layer isn’t correctly integrated into your Yocto project. Ensure that you have sourced the environment setup script generated by the Yocto build (oe-init-build-env
) before invoking qmake. This script sets up the necessary environment variables for your build.
-
Regarding the Qt6Quick component not found, this indicates that the Qt6Quick module might not have been included in your build. You’ll need to ensure that your Yocto configuration includes the Qt6Quick module. This can be done by adding the necessary Qt6 packages to your image recipe or local.conf file. For example, you might need to append something like IMAGE_INSTALL_append = " qtquickcontrols2"
to include Qt Quick Controls 2, assuming that’s the component you’re missing.
-
Check the meta-qt6 layer configuration. Make sure that the meta-qt6 layer is correctly added to your bblayers.conf
file and that you’re using a compatible branch of the meta-qt6 layer with your Yocto Project version. Compatibility issues could lead to missing packages or configuration files.
-
Verify Qt6 component availability. Not all Qt6 components might be available or enabled by default in the meta-qt6 layer. You may need to explicitly enable certain modules or components in the Qt6 build configuration. This can involve setting PACKAGECONFIG flags for qtbase and other Qt modules in your local.conf or through bbappend files to include the necessary components like Quick.
-
Rebuild the environment. After making changes to the configuration, ensure to clean the qt6-related recipes (bitbake -c cleansstate <recipe-name>
) and rebuild your image to apply the changes.
If after following these steps you still encounter issues, it might be helpful to review the log files generated during the build process for more specific error messages or missing dependencies related to Qt6 and Qt6Quick. These logs can offer more detailed insights into what might be going wrong.
Please, also check if these links can help you solve your problem:
How to set up Qt Creator to cross compile for embedded Linux | Toradex Developer Center.
On doing the above step 2 and building, I got error as -
ERROR: automotive-1.0-r0 do_compile: oe_runmake failed
ERROR: automotive-1.0-r0 do_compile: ExecutionError(‘/home/shanmugapriyan/oe-core/build/tmp/work/cortexa72-cortexa53-tdx-linux/automotive/1.0-r0/temp/run.do_compile.186915’, 1, None, None)
ERROR: Logfile of failure stored in: /home/shanmugapriyan/oe-core/build/tmp/work/cortexa72-cortexa53-tdx-linux/automotive/1.0-r0/temp/log.do_compile.186915
| make: /home/shanmugapriyan/oe-core/build/tmp/work/cortexa72-cortexa53-tdx-linux/automotive/1.0-r0/recipe-sysroot-native/usr/libexec/qmltyperegistrar: No such file or directory
| make: *** [Makefile:550: automotive_qmltyperegistrations.cpp] Error 127
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/shanmugapriyan/oe-core/build/…/layers/meta-qt6-application/recipes-automotive/automotive/automotive.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 2627 tasks of which 2626 didn’t need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds
Summary: 1 task failed:
/home/shanmugapriyan/oe-core/build/…/layers/meta-qt6-application/recipes-automotive/automotive/automotive.bb:do_compile
Summary: There were 2 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
Hi @SruthiSathyan ,
Please do not create multiple request of the same issue. We have updated our comments here.