build: Bump minimum supported GCC to g++-9 #27662

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2305-g++-8- changing 10 files +14 −58
  1. maflcko commented at 12:44 PM on May 15, 2023: member

    It is a bit frustrating to write valid C++ code only to realize that g++-8 fails to parse it later on.

    The only non-EOL operating system still shipping with g++-8 is CentOS Stream 8. I think it is reasonable for users of affected Linux distributions to:

    • Upgrade their operating system, or compiler to a supported version.
    • Alternatively, stay with a previous release of Bitcoin Core as long as it is supported.

    Fixes https://github.com/bitcoin/bitcoin/issues/27537

  2. DrahtBot commented at 12:44 PM on May 15, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, fanquake
    Concept ACK codexnakamoto

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  3. DrahtBot renamed this:
    build: Drop support for g++-8
    build: Drop support for g++-8
    on May 15, 2023
  4. DrahtBot added the label Build system on May 15, 2023
  5. maflcko force-pushed on May 15, 2023
  6. hebasto commented at 12:46 PM on May 15, 2023: member

    Does this comment hold:

    Added 27.0 for now, which should be uncontroversial.

    ?

  7. fanquake commented at 12:46 PM on May 15, 2023: member

    Concept ACK - seems fine for 26.0.

  8. hebasto commented at 12:50 PM on May 15, 2023: member

    The only non-EOL operating system still shipping with g++-8 is CentOS 8.

    seems fine for 26.0.

    Considering https://www.centos.org/centos-linux-eol/:

    CentOS Linux 8 will reach End Of Life (EOL) on December 31st, 2021.

    I agree.

    Concept ACK.

    UPD. CentOS Stream 8 EOL is May 31st, 2024.

  9. DrahtBot added the label CI failed on May 15, 2023
  10. maflcko force-pushed on May 15, 2023
  11. maflcko force-pushed on May 15, 2023
  12. maflcko commented at 3:08 PM on May 15, 2023: member

    Looks like the only affected code is constexpr functions calling assert(...).

    Failure can be tested with:

    git show HEAD~|git apply --reverse  # First checkout this pull, then revert the centos 9 bump commit
    podman kill ci_i686_centos && MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_i686_centos.sh" ./ci/test_run_all.sh  # Run the CI task
    
    ...
    qt/addresstablemodel.cpp: In function ‘constexpr AddressTableEntry::Type translateTransactionType(wallet::AddressPurpose, bool)’:
    qt/addresstablemodel.cpp:64:5: error: call to non-‘constexpr’ function ‘void __assert_fail(const char*, const char*, unsigned int, const char*)’
         assert(false);
         ^~~~~~
    
  13. DrahtBot removed the label CI failed on May 15, 2023
  14. codexnakamoto commented at 6:17 PM on May 15, 2023: none

    Concept ACK - this is logical and seems uncontentious.

  15. fanquake commented at 12:36 PM on May 16, 2023: member

    Could adjust the comment here: https://github.com/bitcoin/bitcoin/blob/edd2a8644531e6fb8f64ad6acce86f8fdec9ab26/src/txrequest.cpp#L72 to remove mention of GCC 8.x.

    Could pull in this commit, to remove the GCC 8 -lstdc++fs check: https://github.com/fanquake/bitcoin/commit/b2632e7c7b7dfc5487629d80e11a8cdeaa649ed9.

  16. maflcko commented at 6:24 PM on May 16, 2023: member

    Could pull in this commit, to remove the GCC 8 -lstdc++fs check: https://github.com/fanquake/bitcoin/commit/b2632e7c7b7dfc5487629d80e11a8cdeaa649ed9.

    My preference would be to also bump clang and then just remove the whole check instead of fiddling with it, when all supported distros ship clang-10 or higher already.

  17. fanquake commented at 6:34 PM on May 16, 2023: member

    Are you going to pull a Clang bump into this PR? I don't see the point of leaving redundant code, especially when the diff is trivial to review.

  18. maflcko renamed this:
    build: Drop support for g++-8
    build: Bump minimum supported GCC to g++-9
    on May 17, 2023
  19. maflcko marked this as a draft on May 17, 2023
  20. fanquake commented at 10:06 AM on May 18, 2023: member

    Ok. Lets kill l_filesystem.m4.

  21. ci: Document the false positive error for g++-9 fa6a755d9f
  22. ci: Bump centos:stream8 to centos:stream9
    This is required for the next commit. Also, drop CI_RETRY_EXE before
    "dnf install", because it requires getopt, which will only be installed
    later on via util-linux
    fa69955e74
  23. build: Bump minimum supported GCC to g++-9
    Also, update the code to use constexpr, which does not work in g++-8.
    
    Also, drop the no longer needed build-aux/m4/l_filesystem.m4.
    fa953f15bf
  24. maflcko force-pushed on May 18, 2023
  25. maflcko marked this as ready for review on May 18, 2023
  26. hebasto approved
  27. hebasto commented at 11:21 AM on May 18, 2023: member

    ACK fa953f15bfcf95df9aa9c91e1c4b56a205f4d1ae

  28. fanquake approved
  29. fanquake commented at 1:29 PM on May 18, 2023: member

    ACK fa953f15bfcf95df9aa9c91e1c4b56a205f4d1ae

  30. maflcko added the label DrahtBot Guix build requested on May 18, 2023
  31. fanquake commented at 2:29 PM on May 18, 2023: member

    Guix Build:

    eebee5018a0bfa5e6de1ebb58522457f0f35f5636e71990af35d5b10c9ebb296  guix-build-fa953f15bfcf/output/aarch64-linux-gnu/SHA256SUMS.part
    7c7a69bb6cce74a31cd747f4234332de83d201d0b6426aac3095a16b9eb09e33  guix-build-fa953f15bfcf/output/aarch64-linux-gnu/bitcoin-fa953f15bfcf-aarch64-linux-gnu-debug.tar.gz
    869ae0cd106fc82ed075f1efa50993dbe588aad9316579397de594e46f18155e  guix-build-fa953f15bfcf/output/aarch64-linux-gnu/bitcoin-fa953f15bfcf-aarch64-linux-gnu.tar.gz
    61764214a68b0602fc34faa3fa2077b3bc729fcf1a3131544f74f7604ecd4076  guix-build-fa953f15bfcf/output/arm-linux-gnueabihf/SHA256SUMS.part
    54c823fa4b11570c40aabc8b66a16604fbd40847378f6dd4678f5357730da5f0  guix-build-fa953f15bfcf/output/arm-linux-gnueabihf/bitcoin-fa953f15bfcf-arm-linux-gnueabihf-debug.tar.gz
    2c5b4a0dca818d845f9e84bd1d8e7684da20f3e22cf941ff3ee2116730a2836d  guix-build-fa953f15bfcf/output/arm-linux-gnueabihf/bitcoin-fa953f15bfcf-arm-linux-gnueabihf.tar.gz
    147a3a3c900451a6637253ba1bce0e87ad98ab3add2df5e39a07a82ebb5cadf0  guix-build-fa953f15bfcf/output/arm64-apple-darwin/SHA256SUMS.part
    d3e1d7f040aa025ea941a4bae91adf179f7943308c4ba3ada44b8813b5ab469c  guix-build-fa953f15bfcf/output/arm64-apple-darwin/bitcoin-fa953f15bfcf-arm64-apple-darwin-unsigned.dmg
    71a4f7c2b0bcf017e872e0222f8ae6bd077381195df5284442dcce50c8b0dbf7  guix-build-fa953f15bfcf/output/arm64-apple-darwin/bitcoin-fa953f15bfcf-arm64-apple-darwin-unsigned.tar.gz
    a530e0e081c770273dea777766295b05b93b89eb1ee0a5117e87f332333c82c6  guix-build-fa953f15bfcf/output/arm64-apple-darwin/bitcoin-fa953f15bfcf-arm64-apple-darwin.tar.gz
    80ac0b91bc39f9027724f09fa4ff4f14a0f856a6ce049248f1ad3bcc8c33c483  guix-build-fa953f15bfcf/output/dist-archive/bitcoin-fa953f15bfcf.tar.gz
    ef11be4df52aff3cf68293349b1d227af2536c3ad23d89edfd07f0cec72a2b1f  guix-build-fa953f15bfcf/output/powerpc64-linux-gnu/SHA256SUMS.part
    ec69bcbd145293f473a8f17efb7da8977b12d501646e0f68fc16bed9d7a2cb44  guix-build-fa953f15bfcf/output/powerpc64-linux-gnu/bitcoin-fa953f15bfcf-powerpc64-linux-gnu-debug.tar.gz
    f45677953a3f93bb61b78cde18c1245de11787e88c2cb6f62496492c1c322ea3  guix-build-fa953f15bfcf/output/powerpc64-linux-gnu/bitcoin-fa953f15bfcf-powerpc64-linux-gnu.tar.gz
    786351b24d3d99500a854eaecfac24fbead87b936a2ccdaf360ea502430bbd84  guix-build-fa953f15bfcf/output/powerpc64le-linux-gnu/SHA256SUMS.part
    25a1ac349dd5a27b3b2fd99a5f164fecf9644652c917c71f4bd6b0370a76f52a  guix-build-fa953f15bfcf/output/powerpc64le-linux-gnu/bitcoin-fa953f15bfcf-powerpc64le-linux-gnu-debug.tar.gz
    84704403eca5d43e5de52e22c140d4889a27c757ecbe365a7ab8dc64ef4719df  guix-build-fa953f15bfcf/output/powerpc64le-linux-gnu/bitcoin-fa953f15bfcf-powerpc64le-linux-gnu.tar.gz
    72395ffba3c6f63a740592998240f6aac3808d12ad35d62ac54be6ead25a2f05  guix-build-fa953f15bfcf/output/riscv64-linux-gnu/SHA256SUMS.part
    ecb2eddea01f80d7b80be94071905de3a35bfe31af40ae99b3155b11bf374efd  guix-build-fa953f15bfcf/output/riscv64-linux-gnu/bitcoin-fa953f15bfcf-riscv64-linux-gnu-debug.tar.gz
    31343c259dcb288bf08afb4bbef7a5751236762f0a75eebb23ed8d76c1537d43  guix-build-fa953f15bfcf/output/riscv64-linux-gnu/bitcoin-fa953f15bfcf-riscv64-linux-gnu.tar.gz
    edca2d028f8e0e0070a440a37cba2e0f6db23079f895f11830caa100d8d68b4a  guix-build-fa953f15bfcf/output/x86_64-apple-darwin/SHA256SUMS.part
    61b5475ba66770df37d9a3410402789c8145bc12d318def3541b7be8918c9bcb  guix-build-fa953f15bfcf/output/x86_64-apple-darwin/bitcoin-fa953f15bfcf-x86_64-apple-darwin-unsigned.dmg
    d7e68fb94ee32839bbfa0e44804bebe8e200ac678c5c13abf90b96d4318dbd43  guix-build-fa953f15bfcf/output/x86_64-apple-darwin/bitcoin-fa953f15bfcf-x86_64-apple-darwin-unsigned.tar.gz
    226b28549e888357ced590e132082ba23a8df6bbd70fb3f31a31ed42c29567ac  guix-build-fa953f15bfcf/output/x86_64-apple-darwin/bitcoin-fa953f15bfcf-x86_64-apple-darwin.tar.gz
    c0d19bd032ca58d8b95384d4bfb6a8d5743ed6fc83e6742487c00ec34e289446  guix-build-fa953f15bfcf/output/x86_64-linux-gnu/SHA256SUMS.part
    618f56abff2793f0164f4a7933b6d321a5a6beae2623bb8f771c0d76fa72a998  guix-build-fa953f15bfcf/output/x86_64-linux-gnu/bitcoin-fa953f15bfcf-x86_64-linux-gnu-debug.tar.gz
    a44c967aa389f115189e02cf4395f0b1d7250cb8951a5a3ada82ed81273fad5a  guix-build-fa953f15bfcf/output/x86_64-linux-gnu/bitcoin-fa953f15bfcf-x86_64-linux-gnu.tar.gz
    a93a79c849c8486e2f7b10d8e2bf6f6a12d689f1160a1fa44cce8f4875895fdd  guix-build-fa953f15bfcf/output/x86_64-w64-mingw32/SHA256SUMS.part
    526f20b0603eb2a02d6bed21bcf27626bc3c4de91ab72dabc7451cb62932c6fb  guix-build-fa953f15bfcf/output/x86_64-w64-mingw32/bitcoin-fa953f15bfcf-win64-debug.zip
    4b2ac3b3e6215703ccecb352ca8937644507fc13ef1da3397c96d55c56d16b09  guix-build-fa953f15bfcf/output/x86_64-w64-mingw32/bitcoin-fa953f15bfcf-win64-setup-unsigned.exe
    bc63b49d35a012de63ba42a3de8f644ab4ed1a41026b1b09e885ec5363ff3579  guix-build-fa953f15bfcf/output/x86_64-w64-mingw32/bitcoin-fa953f15bfcf-win64-unsigned.tar.gz
    6868d20c330862e60035734deff4da77260cccd11915a6b68beb994d38fdcad0  guix-build-fa953f15bfcf/output/x86_64-w64-mingw32/bitcoin-fa953f15bfcf-win64.zip
    
  32. DrahtBot commented at 9:39 PM on May 18, 2023: contributor

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds

    File commit ccc431d53ea05081e8f827d6165221129f362ebb<br>(master) commit 6d6fe0820fcc7e1d781b97a3d86e8dcb4287e391<br>(master and this pull)
    SHA256SUMS.part 0af241dbe1baa938... aa2eae9b23675b42...
    *-aarch64-linux-gnu-debug.tar.gz 8c82c360c0e7d2f5... d2befc755efa04ea...
    *-aarch64-linux-gnu.tar.gz 2e1d6ae05d63a1d3... 9643ee02bb75182c...
    *-arm-linux-gnueabihf-debug.tar.gz 08b869e60086d586... 653b30a009e71a7e...
    *-arm-linux-gnueabihf.tar.gz b35df621fbe6ecd7... 7c988b891002272c...
    *-powerpc64-linux-gnu-debug.tar.gz 81425acf907b9e78... 6e0ebfc60093cf9e...
    *-powerpc64-linux-gnu.tar.gz dd9a0427c208107f... e45ba1384f5e1277...
    *-powerpc64le-linux-gnu-debug.tar.gz 94e6049b29c00df4... 722aad5202d8d69b...
    *-powerpc64le-linux-gnu.tar.gz b160c565b18b9d07... 9d9bdd2f61973c23...
    *-riscv64-linux-gnu-debug.tar.gz 1b4e268d7da22622... 044ff24e162c914a...
    *-riscv64-linux-gnu.tar.gz 23bd856e272517d8... b56d13ccd431654f...
    *-x86_64-linux-gnu-debug.tar.gz 387102e59e89dcdf... 155a0b0e3e82ebff...
    *-x86_64-linux-gnu.tar.gz d35b81672589ba8a... b3877f5ca35322f1...
    *.tar.gz c265f21a2c15b197... 2dd02f5d3936cda1...
    guix_build.log 22288642a8a1b3bf... 8cdcb53bb99a4d24...
    guix_build.log.diff c9bde9f6f3a7cc68...
  33. DrahtBot removed the label DrahtBot Guix build requested on May 18, 2023
  34. fanquake merged this on May 19, 2023
  35. fanquake closed this on May 19, 2023

  36. maflcko deleted the branch on May 19, 2023
  37. sidhujag referenced this in commit 86626bdb01 on May 19, 2023
  38. bitcoin locked this on May 18, 2024

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-04-24 09:14 UTC

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