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:

    sudo apt-get install build-essential ...
    cmake --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. sedited approved
  9. sedited 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

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    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.

    <!--174a7506f384e20aa4161008e828411d-->

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  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. sedited approved
  29. sedited 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
  38. in src/test/fs_tests.cpp:165 in fa9f29a4a7
     160 | -
     161 | -    fs::remove(symlink);
     162 | -    fs::remove(dir);
     163 | -}
     164 | -#endif // __MINGW64__
     165 | -
    


    hebasto commented at 1:17 PM on November 12, 2025:

    Good to see this test gone, as it was annoying to set SeCreateSymbolicLinkPrivilege to make it pass when building natively on Windows.

  39. sedited referenced this in commit 75d8345983 on Nov 12, 2025
  40. sedited referenced this in commit 7f93626ea0 on Nov 12, 2025
  41. yuvicc referenced this in commit f620a2206b on Nov 16, 2025
  42. hebasto referenced this in commit b50edfc72d on Nov 22, 2025
  43. stringintech referenced this in commit 52fffa1e5d on Nov 24, 2025
  44. stickies-v referenced this in commit 9fa736f8e4 on Jan 22, 2026
  45. Kino1994 referenced this in commit 8e6e82e089 on Jun 28, 2026
  46. BigcoinBGC referenced this in commit af549a424b on Jun 30, 2026
  47. Kino1994 referenced this in commit 6c83a9f256 on Aug 19, 2026
  48. Sjors referenced this in commit 0ab5f9bc2f on Nov 11, 2026
  49. Sjors referenced this in commit 01daf20475 on Nov 11, 2026
  50. Sjors referenced this in commit caa1d9be08 on Nov 11, 2026
  51. Sjors referenced this in commit 0ef4602593 on Nov 11, 2026
  52. bitcoin locked this on Nov 12, 2026

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: 2026-11-16 00:51 UTC

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