qt6 error when bitbake imx-image-full

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

qt6 error when bitbake imx-image-full

3,983 Views
sml310511029
Contributor II

Hello,

I meet a problem related to qt6 when bitbake imx-image-full

log is attached, and it shows that there is a error: ERROR: Task (virtual:native:/home/ivslab/imx/imx-yocto-bsp/sources/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile) failed with exit code '1' 

Is there any kind of solution to solve this issue? thank you

 

Tags (1)
5 Replies

1,645 Views
neuberfran
Contributor IV

I have the same problem

0 Kudos
Reply

3,339 Views
Jordanyte
Contributor I

I too have this issue: in Ubuntu-20.04

When I compile imx-image-full for the new i.MX93 EVK, on Ubuntu-22.04 I do not have this issue and everything compiles successfully.

Note the full error messages:

         -c /home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtbase/6.4.3-r0/git/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
| {standard input}: Assembler messages:
| {standard input}:1020043: Warning: end of file not at end of a line; newline inserted
| {standard input}:1020447: Error: invalid operands (*UND* and .gcc_except_table sections) for `-'
| aarch64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus
| compilation terminated.
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/bjordan/imx-yocto-bsp/sources/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_install_ptest_base) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4663 tasks of which 3867 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/bjordan/imx-yocto-bsp/sources/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_install_ptest_base
Summary: There was 1 ERROR message, returning a non-zero exit code.

I include a snipped of the command line to see which file it's compiling at the time of the error. It appears to be 'tst_qmetatype.cpp'

Looking at the source, it has a comment:

struct S {
using value_type = S; // used to cause compilation error with Qt6
int begin();
int end();
};

// should not cause a compilation failure
// used to cause issues due to S being equal to S::value_type
Q_DECLARE_METATYPE(S)

QTEST_MAIN(tst_QMetaType)
#include "tst_qmetatype.moc"

That could have something to do with it, but it could just be a red herring.

So I performed:

$ sudo apt update

$ sudo apt upgrade

$ bitbake imx-image-full

...now waiting to see if updating all the packages (a lot of them, hundreds, were updated) will resolve the incompatibility with that source snippet...

Meanwhile, you might just update to Ubuntu 22.04 (in my case I am using WSL2).

0 Kudos
Reply

3,320 Views
Jordanyte
Contributor I

Following the trail of bread crumbs...

This time, the previous compilation succeeded, but others failed with the same error.

So I looked more closely at the command that failed while ninja was attempting to drive the compiler.

What I found were that some of the command line arguments to g++ were missing the complete path to the make files. Here's an abbreviated snippet:

 <truncated>...  -include /home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick/CMakeFiles/Quick.dir/cmake_pch.hxx -MD -MT src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o -MF src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o.d -o src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o -c /home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick/quick_qmltyperegistrations.cpp
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/bjordan/imx-yocto-bsp/sources/meta-qt6/recipes-qt/qt6/qtdeclarative_git.bb:do_compile) failed with exit code '1'

I copied the entire command text from the console and executed it separately:

/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QUICK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x070000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_GUI_LIB -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_INTEGER_EVENT_COORDINATES -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_USE_QSTRINGBUILDER -DQuick_EXPORTS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick/Quick_autogen/include -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQuick -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/git/src/quick -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQuick/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQuick/6.4.2/QtQuick -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/qml -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQml/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQml/6.4.2/QtQml -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtCore/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtCore/6.4.2/QtCore -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtCore -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/lib/mkspecs/linux-g++ -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQml -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQmlIntegration -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/git/src/qmlintegration -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/qmlintegration -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtNetwork -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtGui -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQmlModels -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtGui/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtGui/6.4.2/QtGui -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/qmlmodels -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQmlModels/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/include/QtQmlModels/6.4.2/QtQmlModels -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtOpenGL -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtOpenGL/6.4.2 -I/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot/usr/include/QtOpenGL/6.4.2/QtOpenGL -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/git=/usr/src/debug/qtdeclarative/6.4.3-r0 -fdebug-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/git=/usr/src/debug/qtdeclarative/6.4.3-r0 -fmacro-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build=/usr/src/debug/qtdeclarative/6.4.3-r0 -fdebug-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build=/usr/src/debug/qtdeclarative/6.4.3-r0 -fdebug-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot= -fmacro-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot= -fdebug-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/recipe-sysroot-native= -fmacro-prefix-map=/home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/image= -fvisibility-inlines-hidden -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -Wsuggest-override -std=c++17 -Winvalid-pch -include /home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick/CMakeFiles/Quick.dir/cmake_pch.hxx -MD -MT src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o -MF src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o.d -o src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o -c /home/bjordan/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/qtdeclarative/6.4.3-r0/build/src/quick/quick_qmltyperegistrations.cpp
Assembler messages:
Fatal error: can't create src/quick/CMakeFiles/Quick.dir/quick_qmltyperegistrations.cpp.o: No such file or directory

Now I can see - g++ cannot find some included files. I made the path bold above. So somehow for the CMakeFiles included .o files, the path was malformed by the parent process. I tested this by adding the full path needed before src/ to those three lines in a text editor and then pasting the command back into the console and executing it. It compiled successfully.

What I still don't know:

  • Why did this problem occur with a different module?
  • Why did the build script malform the file paths up to the exact same place?

I have a suspicion that this is caused somehow by background filesystem activity because this builds fine on WSL2 with Ubuntu-22.04.

Anyone else have thoughts on this? I'll keep digging...

0 Kudos
Reply

3,784 Views
meifangchang
Contributor I

Do you have solve it?I have the same problem?.thanks

0 Kudos
Reply

3,866 Views
oprata
Contributor II

Hello Folks,

I have the same problem. Any idea how to solve it?

Thanks in advance.

0 Kudos
Reply