qt6 MOC and UIC failed on imx8qxp-mek

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

qt6 MOC and UIC failed on imx8qxp-mek

1,173 次查看
rakesh3
Contributor V

Hi team,

I am using the imx8qxp board with qt6.4.3 version, there while building the qt6 project, I am getting the below error .

Attaching the logs 

11:25:22: Running steps for project new_qt_project...
11:25:22: Starting: "/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/bin/cmake" --build /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug --target all install
[1/6 35.6/sec] Automatic MOC and UIC for target new_qt_project
FAILED: new_qt_project_autogen/timestamp new_qt_project_autogen/mocs_compilation.cpp /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/timestamp /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/mocs_compilation.cpp
cd /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug && /home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/bin/cmake -E cmake_autogen /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/CMakeFiles/new_qt_project_autogen.dir/AutogenInfo.json Debug && /home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/bin/cmake -E touch /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/timestamp && /home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/Desktop/new_qt_project /home/Desktop/new_qt_project /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/deps /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/CMakeFiles/d/563c9657d5e644f89f5fd9f5772b05986d1d14c2086407d9073b67ab81a7370c.d

AutoMoc subprocess error
------------------------
The moc process failed to compile
"SRC:/mainwindow.h"
into
"BIN:/new_qt_project_autogen/EWIEGA46WW/moc_mainwindow.cpp"

Command
-------
/home/Desktop/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/moc -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include/aarch64-linux-gnu/qt6/QtCore -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include/aarch64-linux-gnu/qt6 -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/aarch64-linux-gnu/qt6/mkspecs/linux-g++ -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include/aarch64-linux-gnu/qt6/QtWidgets -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include/aarch64-linux-gnu/qt6/QtGui -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include -I/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/aarch64-linux-gnu/include/c++/12 -I/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/aarch64-linux-gnu/include/c++/12/aarch64-linux-gnu -I/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/aarch64-linux-gnu/include/c++/12/backward -I/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/lib/gcc-cross/aarch64-linux-gnu/12/include -I/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/aarch64-linux-gnu/include -I/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/include/aarch64-linux-gnu --include /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/moc_predefs.h --output-dep-file -o /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/EWIEGA46WW/moc_mainwindow.cpp /home/Desktop/new_qt_project/mainwindow.h

Output
------
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/moc: 1: ELF���@�@8: not found
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/moc: 1: Syntax error: Unterminated quoted string


AutoUic subprocess error
------------------------
The uic process failed to compile
"SRC:/mainwindow.ui"
into
"BIN:/new_qt_project_autogen/include/./ui_mainwindow.h"
included by
"SRC:/mainwindow.cpp"

Command
-------
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/uic -o /home/Desktop/build-new_qt_project-imx8qxp_mek-Debug/new_qt_project_autogen/include/./ui_mainwindow.h /home/Desktop/new_qt_project/mainwindow.ui

Output
------
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/uic: 1: ELF��i@�@8: not found
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/uic: 1: 2��GNU�: not found
/home/Desktop/qt_qt/new-qt-img/binary/rootfs/usr/lib/qt6/libexec/uic: 2: Syntax error: ")" unexpected

ninja: build stopped: subcommand failed.
11:25:22: The process "/home/Desktop/qt_qt/new-qt-img/binary/sdkchroot/usr/bin/cmake" exited with code 1.
Error while building/deploying project new_qt_project (kit: imx8qxp-mek)
The kit imx8qxp-mek has configuration issues which might be the root cause for this problem.
When executing step "Build"
11:25:22: Elapsed time: 00:00.

Please help me on this issue.

标签 (1)
标记 (2)
0 项奖励
回复
3 回复数

1,107 次查看
rakesh3
Contributor V

You can close the ticket now . Thanks 

0 项奖励
回复

1,155 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @rakesh3,

I hope you are doing well.

while building the qt6 project

Please make sure to use Linux LF5.15.5_1.0.0 or a later version.
It is recommended to use the latest BSP.

In order to include Qtwebengine in the image, put the following in local.conf or in the image recipe.
IMAGE_INSTALL:append = " packagegroup-qt6-webengine"

Also, ensure to build imx-image-full image because It builds an open-source Qt 6 image with Machine Learning features.

For more details, please refer to section 5.6.6 Qt 6 and QtWebEngine browsers in the Yocto user guide.
https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

I hope it helps!

Thanks & Regards,
Sanket Parekh

0 项奖励
回复

1,108 次查看
rakesh3
Contributor V

Thanks , the issue is solved by adding correct path of MOC and UIC library.

 

标记 (1)
0 项奖励
回复