* [PATCH 1/2] elfutils: Fix backtrace ptests on musl
@ 2026-09-28 5:00 Khem Raj
2026-09-28 5:00 ` [PATCH 2/2] libc-test: Always add libatomic-staticdev to ptest RDEPENDS Khem Raj
2026-09-28 11:11 ` [OE-core] [PATCH 1/2] elfutils: Fix backtrace ptests on musl Mathieu Dubois-Briand
0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2026-09-28 5:00 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
musl is built with -fno-asynchronous-unwind-tables, so libc.so carries
almost no .eh_frame and its CFI only lives in .debug_frame. Without it the
unwinder cannot get out of abort () and run-backtrace-dwarf.sh fails with
"No DWARF information found". Add musl-dbg to the ptest dependencies, like
glibc-dbg for glibc.
run-backtrace-native-core.sh then unwinds the thread correctly but loops on
musl's __clone, which has no end-of-stack CFI. That is the same reason
run-backtrace-native.sh is already an expected failure on musl, so mark the
core variant as one too.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
meta/recipes-devtools/elfutils/elfutils_0.196.bb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.196.bb b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
index 4541000840..167fe44d87 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.196.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
@@ -54,6 +54,7 @@ EXTRA_OECONF:append:class-target = " --disable-tests-rpath"
EXTRA_OECONF:append:class-target:microblaze = " --disable-symbol-versioning"
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-dbg glibc-dev"
+RDEPENDS:${PN}-ptest:append:libc-musl = " musl-dbg"
INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps"
do_compile_ptest() {
@@ -65,7 +66,7 @@ PTEST_PARALLEL_MAKE = ""
PTEST_XFAILS ?= ""
# See - https://sourceware.org/bugzilla/show_bug.cgi?id=32232
PTEST_XFAILS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' run-strip-strmerge.sh run-elflint-self.sh run-backtrace-data.sh run-reverse-sections-self.sh', '', d)}"
-PTEST_XFAILS:append:libc-musl = " run-large-elf-file.sh run-backtrace-data.sh run-backtrace-native.sh run-stack-d-test.sh run-stack-i-test.sh run-stack-demangled-test.sh run-deleted.sh run-compress-test.sh"
+PTEST_XFAILS:append:libc-musl = " run-large-elf-file.sh run-backtrace-data.sh run-backtrace-native.sh run-backtrace-native-core.sh run-stack-d-test.sh run-stack-i-test.sh run-stack-demangled-test.sh run-deleted.sh run-compress-test.sh"
# systemwide stackprof tests need userspace CPU activity, which minimal qemu images lack
PTEST_XFAILS:append:qemuall = " run-stackprof-system.sh run-stackprof-system-gprof.sh"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] libc-test: Always add libatomic-staticdev to ptest RDEPENDS
2026-09-28 5:00 [PATCH 1/2] elfutils: Fix backtrace ptests on musl Khem Raj
@ 2026-09-28 5:00 ` Khem Raj
2026-09-28 11:11 ` [OE-core] [PATCH 1/2] elfutils: Fix backtrace ptests on musl Mathieu Dubois-Briand
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2026-09-28 5:00 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
libc-test builds its tests on the target with the compiler from
packagegroup-core-buildessential, which is always gcc. The toolchain
used to build the recipe itself does not matter, since do_compile does
nothing.
GCC 16 links -latomic_asneeded by default, so with the dependency limited
to the gcc toolchain every static test fails to link when the distro
builds with clang:
ld: cannot find -latomic_asneeded: Invalid argument
ld: have you installed the static version of the atomic_asneeded library ?
Add libatomic-staticdev unconditionally again.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
meta/recipes-core/musl/libc-test_git.bb | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/recipes-core/musl/libc-test_git.bb b/meta/recipes-core/musl/libc-test_git.bb
index 15a2ce42f7..d9999ec377 100644
--- a/meta/recipes-core/musl/libc-test_git.bb
+++ b/meta/recipes-core/musl/libc-test_git.bb
@@ -36,14 +36,13 @@ RDEPENDS:${PN} = " \
RDEPENDS:${PN}-ptest = " \
${PN} \
+ libatomic-staticdev \
locale-base-en-us \
musl-staticdev \
sed \
tzdata \
"
-RDEPENDS:${PN}-ptest:append:toolchain-gcc = " libatomic-staticdev"
-
install_path = "/opt/${PN}"
FILES:${PN} += "${install_path}/*"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH 1/2] elfutils: Fix backtrace ptests on musl
2026-09-28 5:00 [PATCH 1/2] elfutils: Fix backtrace ptests on musl Khem Raj
2026-09-28 5:00 ` [PATCH 2/2] libc-test: Always add libatomic-staticdev to ptest RDEPENDS Khem Raj
@ 2026-09-28 11:11 ` Mathieu Dubois-Briand
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Dubois-Briand @ 2026-09-28 11:11 UTC (permalink / raw)
To: raj.khem, openembedded-core; +Cc: Khem Raj
On Mon Sep 28, 2026 at 7:00 AM CEST, Khem Raj via lists.openembedded.org wrote:
> musl is built with -fno-asynchronous-unwind-tables, so libc.so carries
> almost no .eh_frame and its CFI only lives in .debug_frame. Without it the
> unwinder cannot get out of abort () and run-backtrace-dwarf.sh fails with
> "No DWARF information found". Add musl-dbg to the ptest dependencies, like
> glibc-dbg for glibc.
>
> run-backtrace-native-core.sh then unwinds the thread correctly but loops on
> musl's __clone, which has no end-of-stack CFI. That is the same reason
> run-backtrace-native.sh is already an expected failure on musl, so mark the
> core variant as one too.
>
> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
> ---
Hi Khem,
I suspect this is breaking elfutils ptest on qemux86-64:
AssertionError:
Failed ptests:
{'elfutils': 'START: ptest-runner\n'
'2026-09-28T06:47\n'
'make \\\n'
...
'===============================================================\n'
'2 of 258 tests did not behave as expected (2 unexpected passes)\n'
'(44 tests were not run)\n'
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1263
Ptest logs can be found here:
https://valkyrie.yocto.io/pub/non-release/20260928-40/testresults/qemux86-64-musl-ptest/core-image-ptest-elfutils/
It does look like it reproduces on every builds, but does not affect
other platforms.
Can you have a look at the issue?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-28 11:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 5:00 [PATCH 1/2] elfutils: Fix backtrace ptests on musl Khem Raj
2026-09-28 5:00 ` [PATCH 2/2] libc-test: Always add libatomic-staticdev to ptest RDEPENDS Khem Raj
2026-09-28 11:11 ` [OE-core] [PATCH 1/2] elfutils: Fix backtrace ptests on musl Mathieu Dubois-Briand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.