Repository navigation
Fix the CI jobs that fail on the Ubuntu 26.04 runner image - #988
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #988
Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-endian.yml, .github/workflows/test-sbom.yml, .github/workflows/test-x86-fsp-qemu.yml, tools/fs-test/README.md, tools/fs-test/runtests.sh, tools/scripts/x86_fsp/qemu/qemu_build_fsp.sh
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the CI compatibility updates.
No open issues 🎉
What changed in this PR
This PR addresses wolfBoot CI compatibility with Ubuntu 26.04’s compiler, Python, and emulator changes while temporarily keeping the SBOM canary on Ubuntu 24.04.
Changes:
- Prevent C23 macro expansion from breaking wolfBoot’s
memchrdefinition. - Support both PowerPC emulator names and available QEMU packages for big-endian testing.
- Default EDK2 host-tool builds to GNU C17, add Python setuptools, and pin the SBOM canary runner.
| File | Description |
|---|---|
tools/scripts/x86_fsp/qemu/qemu_build_fsp.sh |
Default BUILD_CC to GNU C17 while preserving caller overrides. |
tools/fs-test/runtests.sh |
Run big-endian tests with either PowerPC emulator name. |
tools/fs-test/README.md |
Document both supported emulator names. |
src/string.c |
Undefine the C23 memchr macro before defining the function. |
.github/workflows/test-x86-fsp-qemu.yml |
Install Python setuptools in all three FSP QEMU jobs. |
.github/workflows/test-sbom.yml |
Pin the canary to Ubuntu 24.04 and explain the compiler-standard mismatch. |
.github/workflows/test-endian.yml |
Select an available QEMU package and probe the detected emulator. |
Review effort: Balanced
a3a135b to
82601ef
Compare
Description
ubuntu-latesthas started resolving to Ubuntu 26.04 (GCC 15, glibc 2.43, Python 3.14). Jobs that land on the new image fail for five separate reasons, none related to the change under test.1.
memchrinsrc/string.cdoes not compile as C23GCC 15 defaults to C23, where
<string.h>definesmemchras a macro that preserves the constness of its argument. wolfBoot's ownmemchr()definition then expands through that macro and fails to parse, which breaks hosted builds such askontron_vx3060_s2. The macro is now undefined before the function.2. The big-endian filesystem job cannot install its emulator
Ubuntu 26.04 dropped
qemu-user-static;qemu-usercarries the static emulators there, namedqemu-ppcrather thanqemu-ppc-static. The workflow installs whichever package exists, and the workflow andtools/fs-test/runtests.shuse whichever emulator is present. Without the script change the job would pass while skipping the big-endian section.3. The FSP QEMU jobs cannot build EDK2's host tools
The pinned EDK2 release's host tools are pre-C23 code, and its Python tools import
distutils.qemu_build_fsp.shnow builds the host tools withBUILD_CC="gcc -std=gnu17"unless the caller sets one, and the three jobs installpython3-setuptools.4. The SBOM canary's gcc/clang neutrality check fails
The macro capture in
tools/sbomruns each compiler at its own default language standard. GCC 15's C23 defines macros that clang's default does not (the<stdint.h>*_WIDTHfamily), so the two SBOMs differ.tools/sbomis held to its upstream revision, sosbom_canaryis kept onubuntu-24.04with a comment until the capture pins a standard.5. The x86 FSP image inherits the compiler's default CPU level
The hosted runner uses Ubuntu's
amd64v3package variant, whose GCC defaults to-march=x86-64-v3. wolfBoot's x86 FSP build stated no CPU level, so the image picked up BMI2-class instructions, which QEMU's default CPU does not implement: the machine reset the moment wolfBoot took over from the FSP.arch.mknow passes-march=x86-64for the x86 FSP targets.Testing
Reproduced and verified in an
ubuntu:26.04container switched to theamd64v3package variant, as the hosted runner is: the Kontron build, the big-endian filesystem test, and all threetest_qemu.shvariants pass with these changes. The sim target, key tools and host unit tests build and pass on the stock 26.04 package set unchanged. On the hosted runner the big-endian, SBOM and Kontron jobs already pass with the first version of this change;python3-setuptoolsis a precaution if the image already provides it.