build: Bump g++ minimum supported version to 12 #33842

pull maflcko wants to merge 7 commits into bitcoin:master from maflcko:2511-gcc-12 changing 10 files +18 −99
  1. maflcko commented at 3:03 pm on November 10, 2025: member

    All supported operating systems that previously came with at least g++-11, also come with at least g++-12, so bumping the minimum should be fine.

    For reference:

    Obviously, downloading pre-compiled releases or compiling previous release branches is unaffected by this change.

  2. hebasto commented at 3:33 pm on November 10, 2025: member

    Such a change might also require updating the build guides. For instance, the following commands on Ubuntu 22.04 would use GCC 11:

    0sudo apt-get install build-essential ...
    1cmake --build build
    
  3. maflcko force-pushed on Nov 10, 2025
  4. maflcko commented at 3:59 pm on November 10, 2025: member

    Such a change might also require updating the build guides. For instance, the following commands on Ubuntu 22.04 would use GCC 11:

    I am happy to add a general note that the latest stable or LTS is recommended and that earlier releases may need the user to install the required minimum dependencies.

  5. maflcko force-pushed on Nov 10, 2025
  6. build: Bump g++ minimum supported version to 12 fa807f78ae
  7. maflcko force-pushed on Nov 11, 2025
  8. TheCharlatan approved
  9. TheCharlatan commented at 10:45 am on November 11, 2025: contributor
    ACK fabf8e51083120883162399293c620f2afc0c5e2
  10. hebasto approved
  11. hebasto commented at 11:39 am on November 11, 2025: member
    ACK fabf8e51083120883162399293c620f2afc0c5e2.
  12. DrahtBot commented at 11:39 am on November 11, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33842.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan, janb84, hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32748 (fees: prevent redundant estimates flushes by ismaelsadeeq)

    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.

  13. janb84 commented at 11:41 am on November 11, 2025: contributor

    lgtm ACK fabf8e51083120883162399293c620f2afc0c5e2

    With the note added I can’t think of a reason not to bump the g++ version to version 12.

  14. fanquake commented at 12:02 pm on November 11, 2025: member
    Are we keeping gccbug_90348 (for -fstack-reuse bugs), even though it will no-longer reproduce with our supported versions of GCC?
  15. fanquake added the label Needs release note on Nov 11, 2025
  16. maflcko removed the label Needs release note on Nov 11, 2025
  17. DrahtBot added the label Build system on Nov 11, 2025
  18. DrahtBot added the label CI failed on Nov 11, 2025
  19. util: [refactor] Remove unused create_directories workaround
    This was added in commit 1f46b6e46e1454b91ff7ceb31853bc440952f8eb, but
    is no longer needed after g++-12 is the minimum required.
    fa9dacdbde
  20. test: Remove unused fs::create_directories test
    The test was added in commit ddb75c2e87a60ed24065bdf0c3bfabf4e058cef1.
    After the create_directories wrapper removal, the test is redundant with
    the unit test in the upstream stdlib. Also, there is a Bitcoin Core
    functional test that covers this behavior in
    test/functional/feature_dirsymlinks.py
    
    So remove this unit test.
    
    Finally, I could not find a real system that still ships a buggy stdlib
    (v11.2) in their package manager. A stand-alone test is also available
    in compiler-explorer under https://godbolt.org/z/aeMKraYrT.
    fa3854e432
  21. maflcko force-pushed on Nov 11, 2025
  22. test: Remove gccbug_90348 test case
    The test case no longer detects this specific issue for GCC versions
    12.1+, as explained in the
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348 thread and in this
    compiler-explorer playground:
    https://godbolt.org/z/Y48osrjM8
    
    So remove the test case and update the -fstack-reuse=none cmake
    docstring with the underlying affected GCC versions, and the bug URL.
    fabce97b30
  23. ci: Enable experimental kernel stuff in G++-12 task (previous releases)
    Base the task on --preset=dev-mode to ensure maximal coverage and add
    the following:
    
       bitcoin-chainstate (experimental) ... ON
       libbitcoinkernel (experimental) ..... ON
       kernel-test (experimental) .......... ON
    
    Also, shorten the name, for a less cluttered web view.
    faa8be75c9
  24. doc: Add GCC-12 min release notes fa1711ee0d
  25. doc: Recommend latest Debian stable or Ubuntu LTS fa9f29a4a7
  26. maflcko force-pushed on Nov 11, 2025
  27. DrahtBot removed the label CI failed on Nov 11, 2025
  28. TheCharlatan approved
  29. TheCharlatan commented at 8:23 am on November 12, 2025: contributor
    Re-ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97
  30. DrahtBot requested review from hebasto on Nov 12, 2025
  31. DrahtBot requested review from janb84 on Nov 12, 2025
  32. janb84 commented at 9:13 am on November 12, 2025: contributor
    re-ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97
  33. hebasto approved
  34. hebasto commented at 10:10 am on November 12, 2025: member
    ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97.
  35. fanquake merged this on Nov 12, 2025
  36. fanquake closed this on Nov 12, 2025

  37. maflcko deleted the branch on Nov 12, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-13 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me