mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:08:38 +00:00
WIP: build: Bump g++ minimum supported version to 13 #36042
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36042
Loading…
Reference in a new issue
No description provided.
Delete branch "2608-gcc-13"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
At some point, it may be fine to drop support for older vanilla systems not shipping with at least GCC 13.
(For this bump, only C++20
std::formatwill become available, but this bump should also pave the way for C++23.)This patch will only be released in version 33.x, or later, next year (2027).
For reference:
dnf install -y gcc-toolset-15)On operating systems where the minimum GCC version is not shipped by default, the user would have to use Clang, or install GCC in a different way. For example:
Obviously, downloading pre-compiled releases or compiling previous release branches is unaffected by this change.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
WalletBatchwrite failures by achow101)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
🚧 At least one of the CI tasks failed.
Task
NetBSD Cross: https://github.com/bitcoin/bitcoin/actions/runs/32388090156/job/96487376676LLM reason (✨ experimental): CI failed because CMake’s try-compile for text formatting errored with
fatal error: 'format' file not found(missing C++<format>header).Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
Hmm, looks like netbsd-cross is a CI blocker for this? Not sure how to proceed here, because netbsd ci coverage may be useful, but no real user is doing netbsd-cross (I expect all users are running on native netbsd). But native netbsd isn't an option for CI ... 🤷♂️
Are you saying this does work natively on NetBSD? I'd expect it to fail the same way (given NetBSD 11 ships GCC 12.5.0 which doesn't support std::format), and the CI here is giving us the coverage we want (showing this would break compilation for native NetBSD users)?
NetBSD also has recent GCC in packages, so it should work natively on NetBSD. But I don't really know an answer to the meta question, or how to proceed here, which is why this is in draft and removed from the milestone.
References:
I guess somebody (maybe @hebasto?) could test a newer version of GCC natively, to determine which compiler/flag combo is required for std::format, and then update the build instructions. Could be good to do in any case, if NetBSD users are currently using GCC 12.x.
Yes, it's possible to install a newer GCC compiler and configure the build system to use it (similar to what was documented prior to
9b85c9814d).For example, on my NetBSD 11.0 system:
However, there is a minor issue caused by the base system and
pkgsrcusing different versions oflibstdc++:and
So the same issue previously existed on NetBSD 10? So the only way to compile on NetBSD is with depends (or self-compiling all deps)?
Yes.
Those linker warnings seem harmless, though.
As for "self-compiling all deps", only the C++ deps from
pkgsrcactually need to be rebuilt. For an example of this, see https://github.com/hebasto/bitcoin-core-nightly/pull/117.Concept ACK.
🐙 This pull request conflicts with the target branch and needs rebase.
Related: https://gcc.gnu.org/pipermail/gcc/2026-September/248875.html:
Earlier concerns neither republished nor resolved: 3 major findings · 1 minor finding · 2 suggestions. See the Run archive linked from the Review report for their assessments.
🟠 Minor · The
std::formatdiagnostic omits the standard-library requirementA supported-version Clang paired with
libstdc++lacking<format>fails the new probe, but the diagnostic and linked requirements describe only compiler versions.Location:
cmake/module/CheckCXXFeatures.cmake:48(head).🟠 Minor · The NetBSD GCC install guard accepts a partial installation
If
gcc14extracts but installinggcc14-libsfails, a local host-mode rerun skips the package block and leaves the GCC installation incomplete.Location:
ci/test/01_base_install.sh:139(head).🔵 Suggestion · The image bump removes minimum-version build and functional-test coverage
Moving
previous_releasesto Ubuntu 24.04 removes its CMake 3.22 and Python 3.10 functional-test coverage, although both minimums remain supported; lint still uses Python 3.10.Location:
ci/test/00_setup_env_native_previous_releases.sh:9(head).🔵 Suggestion · The NetBSD library-switch commit needs the following package-pin correction
The library-switch commit introduces package pins that its immediate follow-up reports were removed upstream, so validating that intermediate change requires the next commit; the final tree already contains the correction.
Location: ci/test/00_setup_env_netbsd_cross.sh:19 (commit).
Review coverage was incomplete.
Reviewed:
bf1e88528bc0· Review report · Previous reportspermalink
the older netbsd packages will be nuked, so I am not sure how to proceed here. Possibly this needs full caching for the manual install of the netbsd gcc package, so this is still blocked on netbsd.
🐙 This pull request conflicts with the target branch and needs rebase.
🐙 This pull request conflicts with the target branch and needs rebase.
🐙 This pull request conflicts with the target branch and needs rebase.
Concept ACK
Went ahead and dropped NetBSD-cross from the GHA matrix. While it is possible to keep and maintain it, it would be tedious, with questionable benefit, given that the task hasn't found a meaningful issue unique to the NetBSD-cross task.
We already had a situation before the NetBSD 11.0 release where NetBSD’s base compiler did not meet our minimum requirements. Back then, the NetBSD build notes provided instructions for installing a newer compiler. Moreover, due to a bug in
capnproto, it seems prudent to recommend GCC 14 and skip GCC 13.I agree with that. Its value has been moderate recently, as most NetBSD-specific issues have been caught by running the tests elsewhere.
I hope we can proceed with this PR and undraft it, as GCC 12 is currently broken on some platforms anyway.
Ok, I'll think if it makes sense to git revert
9b85c9814d(with gcc14), and then undraft🐙 This pull request conflicts with the target branch and needs rebase.