Bug 15866 - Failed to compile qtbase from meta-qt6 on qemuarm in Yocto with GCC 15
Summary: Failed to compile qtbase from meta-qt6 on qemuarm in Yocto with GCC 15
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 5.3
Hardware: Other arm
: Medium+ normal
Target Milestone: 5.3 M2
Assignee: Peng Zhang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-05-20 02:20 UTC by Sung Gon Kim
Modified: 2025-05-31 05:23 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sung Gon Kim 2025-05-20 02:20:34 UTC
The qtbase recipe from the meta-qt6 layer failed to compile on qemuarm on an Ubuntu 22.04 machine, resulting in the following log messages. This issue didn't occur with GCC 14 but started happening after switching to GCC 15.

| FAILED: src/corelib/CMakeFiles/Core.dir/kernel/qcoreapplication.cpp.o
| /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot -DBACKTRACE_HEADER=\"execinfo.h\" -DCore_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_QSNPRINTF -DQT_NO_STD_FORMAT_SUPPORT -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -D_GLIBCXX_ASSERTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib/Core_autogen/include -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/include -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/include/QtCore -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib/global -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib/kernel -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib/../3rdparty/tinycbor/src -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/include/QtCore/6.10.0 -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/include/QtCore/6.10.0/QtCore -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib/../3rdparty/double-conversion/double-conversion -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib/../3rdparty/double-conversion -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib/../3rdparty/forkfd -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib/.rcc -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/mkspecs/linux-g++ -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot/usr/include/glib-2.0 -I/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot/usr/lib/glib-2.0/include -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64  --sysroot=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot  -O2 -g  -ffile-prefix-map=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git=/usr/src/debug/qtbase/6.10.0  -ffile-prefix-map=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build=/usr/src/debug/qtbase/6.10.0  -ffile-prefix-map=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot=  -ffile-prefix-map=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/recipe-sysroot-native=   -fmacro-prefix-map=/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/image=  -pipe -fvisibility-inlines-hidden -DNDEBUG -O3 -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wno-expansion-to-defined -U_FORTIFY_SOURCE -Wsuggest-override -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fstack-protector-strong -fstack-clash-protection -fexceptions -Winvalid-pch -include /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT src/corelib/CMakeFiles/Core.dir/kernel/qcoreapplication.cpp.o -MF src/corelib/CMakeFiles/Core.dir/kernel/qcoreapplication.cpp.o.d -o src/corelib/CMakeFiles/Core.dir/kernel/qcoreapplication.cpp.o -c /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/git/src/corelib/kernel/qcoreapplication.cpp
| {standard input}: Assembler messages:
| {standard input}:50604: Error: ARM register expected -- `ldrex r1,[s16]'
| {standard input}:50606: Error: ARM register expected -- `strex r2,r1,[s16]'
| ninja: build stopped: subcommand failed.
|
| WARNING: /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/temp/run.do_compile.22739:159 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| WARNING: Backtrace (BB generated script):
|       #1: cmake_runcmake_build, /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/temp/run.do_compile.22739, line 159
|       #2: cmake_do_compile, /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/temp/run.do_compile.22739, line 153
|       #3: do_compile, /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/temp/run.do_compile.22739, line 148
|       #4: main, /home/sunggon82.kim/workspace/temp/poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/qtbase/6.10.0/temp/run.do_compile.22739, line 172
ERROR: Task (/home/sunggon82.kim/workspace/temp/poky/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile) failed with exit code '1'


To reproduce the result, you need to clone master branch of poky, meta-openembedded and meta-qt6, and then configure the build envrionment with the following configuration.

# conf/bblayers.conf

POKY_BBLAYERS_CONF_VERSION = "2"BBPATH = "${TOPDIR}"
BBFILES ?= ""BBLAYERS ?= " \
  /home/sunggon82.kim/workspace/temp/poky/meta \
  /home/sunggon82.kim/workspace/temp/poky/meta-poky \
  /home/sunggon82.kim/workspace/temp/poky/meta-yocto-bsp \
  /home/sunggon82.kim/workspace/temp/poky/meta-openembedded/meta-python \
  /home/sunggon82.kim/workspace/temp/poky/meta-openembedded/meta-oe \
  /home/sunggon82.kim/workspace/temp/poky/meta-qt6 \
  "
 

# conf/local.conf

MACHINE ??= "qemuarm"
DISTRO ?= "poky"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    HALT,${TMPDIR},100M,1K \
    HALT,${DL_DIR},100M,1K \
    HALT,${SSTATE_DIR},100M,1K \
    HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2" 


then, build qtbase recipe with the following command.

bitbake qtbase


- Related issue: https://bugreports.qt.io/browse/QTBUG-136796
Comment 1 Randy MacLeod 2025-05-22 14:41:12 UTC
Fix posted to list recently. In master-next. 

[OE-core] [PATCH v2] gcc: Fix wrong code generation in atomic intrinsics for arm

Peng once this is merged, please resolve and provide a link to the oe-core fix.