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

pull maflcko wants to merge 6 commits into bitcoin:master from maflcko:2608-gcc-13 changing 8 files +53 −15
  1. maflcko commented at 3:45 PM on August 20, 2026: member

    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::format will 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:

    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.

  2. DrahtBot renamed this:
    build: Bump g++ minimum supported version to 13
    build: Bump g++ minimum supported version to 13
    on Aug 20, 2026
  3. DrahtBot added the label Build system on Aug 20, 2026
  4. maflcko marked this as a draft on Aug 20, 2026
  5. DrahtBot commented at 3:46 PM on August 20, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK hebasto

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36287 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36287.svg"></sub> (build: Bump Xcode CLT minimum supported version to 26.3 by maflcko)
    • #36036 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36036.svg"></sub> (build: Bump clang minimum supported version to 19 by maflcko)

    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-->

  6. maflcko added this to the milestone Future on Aug 20, 2026
  7. maflcko force-pushed on Aug 20, 2026
  8. DrahtBot added the label CI failed on Aug 20, 2026
  9. DrahtBot commented at 3:48 PM on August 20, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task NetBSD Cross: https://github.com/bitcoin/bitcoin/actions/runs/32388090156/job/96487376676</sub> <sub>LLM reason (✨ experimental): CI failed because CMake’s try-compile for text formatting errored with fatal error: 'format' file not found (missing C++ <format> header).</sub>

    <details><summary>Hints</summary>

    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.

    </details>

  10. maflcko commented at 4:33 PM on August 20, 2026: member

    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 ... :man_shrugging:

  11. maflcko removed this from the milestone Future on Aug 20, 2026
  12. fanquake commented at 8:30 AM on August 21, 2026: member

    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)?

  13. maflcko commented at 9:02 AM on August 21, 2026: member

    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:

  14. fanquake commented at 9:29 AM on August 21, 2026: member

    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.

  15. hebasto commented at 2:26 PM on August 22, 2026: member

    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 9b85c9814d1d5b1ef9caedc25dc336dacb887dcc).

    For example, on my NetBSD 11.0 system:

    $ sudo pkgin install gcc15
    $ cmake --preset dev-mode -DCMAKE_C_COMPILER=/usr/pkg/gcc15/bin/gcc -DCMAKE_CXX_COMPILER=/usr/pkg/gcc15/bin/g++ -DWITH_USDT=OFF -DENABLE_IPC=OFF
    

    However, there is a minor issue caused by the base system and pkgsrc using different versions of libstdc++:

    /usr/bin/ld: warning: libstdc++.so.9, needed by /usr/pkg/lib/libzmq.so, may conflict with libstdc++.so.7
    

    and

    $ ldd build_dev_mode/bin/bitcoind
    build_dev_mode/bin/bitcoind:
    	-lzmq.5 => /usr/pkg/lib/libzmq.so.5
    	-lrt.1 => /usr/lib/librt.so.1
    	-lc.12 => /usr/lib/libc.so.12
    	-lpthread.1 => /usr/lib/libpthread.so.1
    	-lstdc++.9 => /usr/lib/libstdc++.so.9
    	-lm.0 => /usr/lib/libm.so.0
    	-lgcc_s.1 => /usr/pkg/gcc15/lib/./libgcc_s.so.1
    	/usr/pkg/lib/libsqlite3.so => /usr/pkg/lib/libsqlite3.so
    	-lstdc++.7 => /usr/pkg/gcc15/lib/./libstdc++.so.7
    
  16. maflcko commented at 2:29 PM on August 22, 2026: member

    However, there is a minor issue caused by the base system and pkgsrc using different versions of libstdc++:

    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)?

  17. hebasto commented at 2:50 PM on August 22, 2026: member

    However, there is a minor issue caused by the base system and pkgsrc using different versions of libstdc++:

    So the same issue previously existed on NetBSD 10?

    Yes.

    So the only way to compile on NetBSD is with depends (or self-compiling all deps)?

    Those linker warnings seem harmless, though.

    As for "self-compiling all deps", only the C++ deps from pkgsrc actually need to be rebuilt. For an example of this, see https://github.com/hebasto/bitcoin-core-nightly/pull/117.

  18. maflcko force-pushed on Aug 24, 2026
  19. hebasto commented at 11:28 AM on August 24, 2026: member

    Concept ACK.

  20. DrahtBot removed the label CI failed on Aug 24, 2026
  21. DrahtBot added the label Needs rebase on Sep 8, 2026
  22. hebasto commented at 7:58 AM on September 11, 2026: member

    Related: https://gcc.gnu.org/pipermail/gcc/2026-September/248875.html:

    The GCC 13 branch is now closed, no further changes can be pushed there.

  23. maflcko force-pushed on Oct 2, 2026
  24. DrahtBot removed the label Needs rebase on Oct 2, 2026
  25. DrahtBot added the label CI failed on Oct 2, 2026
  26. maflcko force-pushed on Oct 6, 2026
  27. maflcko commented at 9:02 AM on October 7, 2026: member

    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.

  28. DrahtBot removed the label CI failed on Oct 7, 2026
  29. DrahtBot added the label Needs rebase on Oct 8, 2026
  30. maflcko force-pushed on Oct 8, 2026
  31. DrahtBot removed the label Needs rebase on Oct 8, 2026
  32. DrahtBot added the label Needs rebase on Oct 11, 2026
  33. build: Bump g++ minimum supported version to 13 18992223c4
  34. bench: refactor: tfm->std::format
    Make an example replacement to use std::format. New code can use this
    now, but old code can probably stay as-is for now.
    0aa9259289
  35. ci: Drop -Werror now that CMAKE_COMPILE_WARNING_AS_ERROR is available 0b9fcc1b5f
  36. doc: Remove redundant GCC 13 note in build-windows.md b33ae525fa
  37. ci: NetBSD-cross: Use libstdc++-14 2ad90d9ab2
  38. netbsd... d9aa616bc9
  39. maflcko force-pushed on Oct 12, 2026
  40. DrahtBot removed the label Needs rebase on Oct 12, 2026
  41. DrahtBot added the label Needs rebase on Oct 21, 2026
  42. DrahtBot commented at 4:43 PM on October 21, 2026: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.


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-10-21 18:51 UTC

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