#36042 build: Bump g++ minimum supported version to 13

ReviewabilityReviewsAgreementSize
#36042 maflcko build: Bump g++ minimum supported version to 13Ready0Positive23 + 30 tests
  • Enable standard C++20 text formatting across the codebase and pave the way for eventual C++23 adoption
  • Ensure developers and CI environments build against modern compiler toolchains
  • Ready for review, with nothing known that would invalidate it
  • Positive sentiment with concept approvals and no remaining objections
  • Concept approval without stated reasons (hebasto, stickies-v)
  • Suggested jumping directly to GCC 14 due to a capnproto dependency bug (hebasto)
  • 23 lines added or modified outside tests
  • 30 lines added or modified in tests
  • 21 lines removed in total
  • 9 files, 6 commits
Build and CI#12 of 56
P2 · cleanup
  • P2 because it unlocks standard C++20 text formatting and unblocks future migration to C++23
  • Provides broad maintainability leverage across developer builds and continuous integration
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:

ReviewerTypeHarm, request, or questionStatusMust beAuthor repliedQuote
fanquake (member)question, approachwhether this works natively on NetBSD given that NetBSD 11 ships GCC 12.5.0 which lacks std::format supportanswered · maflcko noted that NetBSD packages include recent GCC versionsansweredyes2026-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, approachtest a newer version of GCC natively on NetBSD to determine required compiler flags and update build instructionsanswered · hebasto tested installing gcc15 on NetBSD 11.0 and reported the build configurationansweredby others2026-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, approachrecommend GCC 14 and skip GCC 13 due to a capnproto buganswered · author will consider updating to GCC 14 before undraftingansweredyes2026-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

dossier JSON · extract JSON · model ledger, generated 2026-10-24T01:16, confidence high, input hash 22ebc1b3ee042681
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