Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 19, 2023
Merged

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 15, 2023

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

@DrahtBot
Copy link
Contributor

DrahtBot commented May 15, 2023

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

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.

Conflicts

No conflicts as of last run.

@DrahtBot DrahtBot changed the title build: Drop support for g++-8 build: Drop support for g++-8 May 15, 2023
@hebasto
Copy link
Member

hebasto commented May 15, 2023

Does this comment hold:

Added 27.0 for now, which should be uncontroversial.

?

@fanquake
Copy link
Member

Concept ACK - seems fine for 26.0.

@hebasto
Copy link
Member

hebasto commented May 15, 2023

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.

@maflcko maflcko force-pushed the 2305-g++-8- branch 2 times, most recently from facdbe5 to fa93c6c Compare May 15, 2023 14:03
@maflcko
Copy link
Member Author

maflcko commented May 15, 2023

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);
     ^~~~~~

@codexnakamoto
Copy link

Concept ACK - this is logical and seems uncontentious.

@fanquake
Copy link
Member

Could adjust the comment here:

* This is a uint8_t instead of a State to silence a GCC warning in versions prior to 8.4 and 9.3.
to remove mention of GCC 8.x.

Could pull in this commit, to remove the GCC 8 -lstdc++fs check: fanquake@b2632e7.

@maflcko
Copy link
Member Author

maflcko commented May 16, 2023

Could pull in this commit, to remove the GCC 8 -lstdc++fs check: fanquake@b2632e7.

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.

@fanquake
Copy link
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.

@maflcko maflcko changed the title build: Drop support for g++-8 build: Bump minimum supported GCC to g++-9 May 17, 2023
@maflcko maflcko marked this pull request as draft May 17, 2023 08:19
@fanquake
Copy link
Member

Ok. Lets kill l_filesystem.m4.

MarcoFalke added 3 commits May 18, 2023 12:24
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
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.
@maflcko maflcko marked this pull request as ready for review May 18, 2023 10:59
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa953f1

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa953f1

@fanquake
Copy link
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

@DrahtBot
Copy link
Contributor

Guix builds

File commit ccc431d
(master)
commit 6d6fe08
(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...

@fanquake fanquake merged commit edd6d83 into bitcoin:master May 19, 2023
@maflcko maflcko deleted the 2305-g++-8- branch May 19, 2023 09:02
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 19, 2023
@bitcoin bitcoin locked and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop support for g++-8?
5 participants