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).