Imx8mp cmake creat qt6 project with an error (usr/libexec/moc no such file )

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Imx8mp cmake creat qt6 project with an error (usr/libexec/moc no such file )

1,302 Views
shao-gaoyan
Contributor II

env:

       imx8mp-evk + yocto4.0+linux5.15 

 

error info:

/opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6CoreTools/Qt6CoreToolsTargets.cmake:139: error: The imported target "Qt6::moc" references the file "/opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/libexec/moc" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6CoreTools/Qt6CoreToolsTargets.cmake" but not all the files it references. /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6CoreTools/Qt6CoreToolsConfig.cmake:47 (include) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6WidgetsTools/Qt6WidgetsToolsDependencies.cmake:9 (find_dependency) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6WidgetsTools/Qt6WidgetsToolsConfig.cmake:44 (include) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:76 (find_package) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:50 (include) /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/usr/lib/cmake/Qt6/Qt6Config.cmake:223 (find_package) CMakeLists.txt:13 (find_package)

0 Kudos
Reply
2 Replies

1,282 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @shao-gaoyan 

Please refer this https://github.com/mesonbuild/meson/issues/9791 and export the SDK again.

Or you can search moc file in SDK and correct the path.

0 Kudos
Reply

1,279 Views
shao-gaoyan
Contributor II

thank you.

When I use the SDK generated by bitbake meta-tolchain-qt6, the problem is solved.

The reason is that there is no nativesdk packagegroup-qt6-toolchain host in variable (TOOLCHAIN_HOST_TASK)

0 Kudos
Reply