Skip to content

ci: bump CI base images (Ubuntu Noble, Debian Trixie) and fix build failures#11169

Open
maennchen wants to merge 12 commits into
erlang:maintfrom
maennchen:jm/devcontainer-fix
Open

ci: bump CI base images (Ubuntu Noble, Debian Trixie) and fix build failures#11169
maennchen wants to merge 12 commits into
erlang:maintfrom
maennchen:jm/devcontainer-fix

Conversation

@maennchen
Copy link
Copy Markdown
Contributor

@maennchen maennchen commented Jun 2, 2026

Updates the CI and devcontainer ubuntu base image from Jammy (22.04) to Noble (24.04), bumps the Debian cross-compile base from Bookworm to Trixie, and fixes the various build failures that come with the newer toolchains.

Base images

  • Ubuntu Noble — update Dockerfile.ubuntu-base and build-base-image.sh to Ubuntu 24.04, bump wxWidgets 3.0 → 3.2 (3.0 removed in Noble), and use dpkg --print-architecture for java-alternatives instead of hardcoded amd64
  • devcontainer — bump base from focal to noble
  • Debian Trixie (cross-compile) — the cross-compile job links lib_src objects that are pre-built in the 64-bit job. On Noble (glibc 2.39) those objects emit the C23 __isoc23_* variants of strtol/scanf whenever _GNU_SOURCE is defined (which lib_src always does — and no -std= flag suppresses this, the redirect is keyed on _GNU_SOURCE, not the C standard). Linking them against the Bookworm cross sysroot (glibc 2.36), which lacks those symbols, failed. Bump the Debian base from Bookworm to Trixie (glibc 2.41), which provides them. Trixie renamed libncurses5-devlibncurses-dev.

CI build fixes

  • 64-bit build — GCC 13 on Noble no longer auto-links libubsan when -fsanitize=signed-integer-overflow is in CFLAGS; add it to LDFLAGS as well
  • clang build — clang 18 on Noble selects the GCC 14 toolchain but only the GCC 13 libstdc++ headers are present; install libstdc++-14-dev
  • wx — accept wxWidgets 3.2 in the configure compat-version check (previously only 3.0 was accepted unless WXWIN_COMPATIBILITY_3_0 was set)
  • SBOM workflow — Python 3.12 (Noble) enforces PEP 668, blocking system-wide pip install; add --break-system-packages

Source fixes for newer compiler warnings ⚠️ AI-assisted

I'm not a C/compiler expert — the C source changes were written with AI assistance. Please review those with extra care.

  • erts: -Wstrict-prototypes — declare zero-argument functions with (void) (clang 18 errors on the empty parameter list)
  • erl_bits.c — guard f32_to_f16/f16_to_f32 with #if so they aren't compiled when native _Float16 conversion is available (avoids GCC 13 -Werror=unused-function)
  • erl_gc.c — move the erts_free of the temporary GC heap after its last use (heap_area points into it and is passed to the offset_* calls as an address range), fixing GCC 13 -Werror=use-after-free
  • utils.c — replace the element-wise external pid/port comparison loops in eq() with sys_memcmp (matching erl_monitor_link.c); the trailing data.ui[1] member is legitimately over-read on 32-bit, which GCC 14 flags via -Werror=array-bounds

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

CT Test Results

    4 files    142 suites   50m 34s ⏱️
1 738 tests 1 679 ✅ 59 💤 0 ❌
2 381 runs  2 304 ✅ 77 💤 0 ❌

Results for commit 259c573.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@garazdawi
Copy link
Copy Markdown
Member

The same docker files are also used in the CI machinery, so you need to update the base in https://github.com/erlang/otp/blob/master/.github/scripts/build-base-image.sh and make sure that all the tests pass with the new OS.

@maennchen maennchen force-pushed the jm/devcontainer-fix branch from a6d8c95 to a162ce1 Compare June 3, 2026 08:34
@maennchen maennchen marked this pull request as draft June 3, 2026 10:58
@maennchen maennchen force-pushed the jm/devcontainer-fix branch 2 times, most recently from ce0151d to b59b1ab Compare June 3, 2026 13:50
@maennchen maennchen changed the title devcontainer: update base image to Ubuntu Noble and fix wx/java deps ci: update ubuntu base image to Noble (24.04) and fix resulting build failures Jun 3, 2026
@maennchen maennchen force-pushed the jm/devcontainer-fix branch 3 times, most recently from d0965ab to 652e5da Compare June 3, 2026 21:12
maennchen added 7 commits June 4, 2026 12:21
GCC 14 (cross toolchain on Debian Trixie) flags the over-read of the
trailing data.ui[1] member when comparing external pids/ports, since
EXTERNAL_PID/PORT_DATA_WORDS is 2 on 32-bit. Replace the element-wise
comparison loops with sys_memcmp, matching erl_monitor_link.c.
clang 18 on Noble errors on -Wstrict-prototypes for functions
defined with an empty parameter list. Declare them as (void).
f32_to_f16/f16_to_f32 are only used when the platform lacks native
float16 conversion. On Noble, GCC 13 errors with -Werror=unused-function
when native conversion is available. Guard the helpers with the same
condition that selects the software path.
In garbage_collect_hibernate, heap_area points into collection_heap
and is passed to the offset_* calls as an address range. Move the
erts_free of collection_heap after those calls so it is freed after
its last use. GCC 13 on Noble flags the previous ordering with
-Werror=use-after-free.
The configure check rejected wx 3.x unless WXWIN_COMPATIBILITY_3_0
was set. Accept 3.2 (the version shipped in Noble and Trixie)
directly so configure succeeds without the 3.0 compat shim.
- Update wxWidgets packages from 3.0 to 3.2 (3.0 removed in Noble)
- Remove manual wx-config alternative (no longer needed with 3.2)
- Use dpkg --print-architecture for java-alternatives to support non-amd64
- Update build-base-image.sh to reference ubuntu:24.04
The cross-compile job links lib_src objects pre-built by the 64-bit
job, which on Noble (glibc 2.39) emits __isoc23_* symbols whenever
_GNU_SOURCE is set. The Bookworm cross sysroot (glibc 2.36) lacks
those symbols, so the link failed. No -std= flag suppresses the
redirect; it is keyed on _GNU_SOURCE, not the C standard.

- Bump Debian cross/base images from Bookworm to Trixie (glibc 2.41)
- Switch libncurses5-dev to libncurses-dev (renamed in Trixie)
@maennchen maennchen force-pushed the jm/devcontainer-fix branch from 6e120b9 to 82c3fbf Compare June 4, 2026 10:21
maennchen added 4 commits June 4, 2026 12:22
GCC 13 on Noble no longer automatically links libubsan when
-fsanitize=signed-integer-overflow is in CFLAGS. Add the flag
to LDFLAGS as well so the runtime is linked in.
clang 18 on Noble selects the GCC 14 toolchain but only the GCC 13
libstdc++ headers are present, so the C++ standard headers are not
found. Install libstdc++-14-dev.
Python 3.12 (shipped with Ubuntu Noble) enforces PEP 668, blocking
system-wide pip installs. Add --break-system-packages to allow it
in the Docker build context.
@maennchen maennchen force-pushed the jm/devcontainer-fix branch from 82c3fbf to 081796b Compare June 4, 2026 10:22
@maennchen maennchen changed the title ci: update ubuntu base image to Noble (24.04) and fix resulting build failures ci: bump CI base images (Ubuntu Noble, Debian Trixie) and fix build failures Jun 4, 2026
@garazdawi garazdawi added the full-build-and-check Run a more thorough testing of this PR label Jun 4, 2026
@maennchen maennchen marked this pull request as ready for review June 4, 2026 12:15
@garazdawi garazdawi removed the full-build-and-check Run a more thorough testing of this PR label Jun 5, 2026
Comment thread .github/dockerfiles/Dockerfile.ubuntu-base Outdated
garazdawi
garazdawi previously approved these changes Jun 5, 2026
Comment thread HOWTO/DEVELOPMENT.md Outdated
@maennchen maennchen force-pushed the jm/devcontainer-fix branch from 8bbd7ae to 62a79fb Compare June 5, 2026 14:00
Comment thread HOWTO/DEVELOPMENT.md Outdated
@maennchen maennchen force-pushed the jm/devcontainer-fix branch from 62a79fb to e09143d Compare June 5, 2026 14:24
Comment thread .github/dockerfiles/Dockerfile.ubuntu-base Outdated
Gitpod was sunset on 2025-10-15. Base the Ubuntu image on
ubuntu:24.04 directly instead of gitpod/workspace-full, rename
the leftover gitpod ARG defaults, and remove the now-unused
.gitpod.yml and its documentation.
@maennchen maennchen force-pushed the jm/devcontainer-fix branch from e09143d to 259c573 Compare June 5, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants