#36042 build: Bump g++ minimum supported version to 13
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36042 build: Bump g++ minimum supported version to 13 | Ready | 0 | Positive | 23 + 30 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Bumps the minimum supported GCC compiler version from 12.1 to 13.1, enforcing C++20 `std::format` support during CMake configuration. It updates CI environments to use GCC 13 and Ubuntu 24.04, removes the NetBSD cross-build job from the GitHub Actions matrix, and replaces an example `strprintf` invocation with `std::format` in a benchmark.
Problem: GCC 12 lacks support for C++20 `std::format`, preventing developers from using standard text formatting across the codebase and blocking the project's eventual migration to C++23.
Evidence of importance:
- PR description: "For this bump, only C++20 `std::format` will become available, but this bump should also pave the way for C++23."
- Commit ee8d04cd15 demonstrates the payoff by migrating `src/bench/wallet_migration.cpp` from `tinyformat` (`strprintf`) to `std::format`.
Risk of a mistake: medium (build, tests, docs). Mistakes in CMake compiler feature detection or toolchain requirements could break builds for supported platforms and developers building from source.
Changed since the previous assessment: Removed the NetBSD cross-compilation job from the GitHub Actions matrix due to unstable upstream package availability, and dropped manual `-Werror` flags from the native previous-releases CI script.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- author: author considering bumping to GCC 14 and undrafting 2026-10-22
Agreement
Positive
support without stated reasons, no open objection (hebasto, stickies-v)
Thread notes: Added stickies-v's Concept ACK. Hebasto suggested skipping GCC 13 for GCC 14 due to a capnproto bug, which maflcko agreed to consider before undrafting.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| fanquake (member) | question, approach | whether this works natively on NetBSD given that NetBSD 11 ships GCC 12.5.0 which lacks std::format support | answered · maflcko noted that NetBSD packages include recent GCC versions | answered | yes | 2026-08-21: 'Are you saying this does work natively on NetBSD?' Status from: 2026-08-21: maflcko: 'NetBSD also has recent GCC in packages, so it should work natively on NetBSD.' |
| fanquake (member) | suggestion, approach | test a newer version of GCC natively on NetBSD to determine required compiler flags and update build instructions | answered · hebasto tested installing gcc15 on NetBSD 11.0 and reported the build configuration | answered | by others | 2026-08-21: 'test a newer version of GCC natively, to determine which compiler/flag combo is required for std::format, and then update the build instructions' Status from: 2026-08-22: hebasto: 'Yes, it's possible to install a newer GCC compiler and configure the build system to use it' |
| hebasto (member) | suggestion, approach | recommend GCC 14 and skip GCC 13 due to a capnproto bug | answered · author will consider updating to GCC 14 before undrafting | answered | yes | 2026-10-22: 'due to a bug in capnproto, it seems prudent to recommend GCC 14 and skip GCC 13' Status from: 2026-10-22: maflcko: 'Ok, I'll think if it makes sense to git revert 9b85c9814d1d5b1ef9caedc25dc336dacb887dcc (with gcc14), and then undraft' |
Support:
- hebasto (member) (Concept ACK, 2026-08-24): (no reason given) [not substantive]
- stickies-v (member) (Concept ACK, 2026-10-22): (no reason given) [not substantive]
Participants:
- fanquake (member, question, 2 statements 2026-08-21 to 2026-08-21): asked whether compilation works natively on NetBSD and suggested testing newer GCC versions
- hebasto (member, support, 5 statements 2026-08-22 to 2026-10-22): tested native GCC 15 on NetBSD, supports dropping NetBSD-cross GHA task, and suggested skipping GCC 13 for GCC 14
- stickies-v (member, support, 1 statements 2026-10-22 to 2026-10-22): Concept ACK
Files
43 lines under test/bench/ci.
- cmake/module/CheckCXXFeatures.cmake +18/-0
- ci/test/00_setup_env_native_previous_releases.sh +7/-8
- ci/test/01_base_install.sh +12/-0
- ci/test/00_setup_env_netbsd_cross.sh +8/-2
- .github/workflows/ci.yml +0/-6
- src/bench/wallet_migration.cpp +3/-3
- doc/release-notes-36042.md +4/-0
- doc/dependencies.md +1/-1
- doc/build-windows.md +0/-1
Card
The short text the ranking pass compares across PRs.
PR 36042 raises the minimum supported GCC compiler version from 12.1 to 13.1, enforced in CMake via a feature check for C++20 std::format. This enables codebase adoption of std::format and paves the way for C++23, while requiring users on older Linux distributions lacking GCC 13 to build using Clang or alternative toolchains. CI configurations are updated to Ubuntu 24.04, and the NetBSD cross-compilation task is removed from GitHub Actions.
Data
thread read through 2026-10-22 (14 statements), head 79d16c2cc1
labels: Build system · draft
Categories
Build and CI
P2 · cleanup
Bumping the minimum compiler version to GCC 13 establishes baseline support for C++20 `std::format` across the codebase and "paves the way for C++23," providing substantial maintainability leverage for future development.
Membership: Carries the 'Build system' label and modifies CMake compiler checks, CI runner environments, and CI workflow matrices.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 2