-
Notifications
You must be signed in to change notification settings - Fork 36.9k
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 clang minimum supported version to 15 #29165
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
b08682d
to
eac1a46
Compare
The macOS CI fails (as expected). Moving to draft for now, until someone clarifies the macOS clang situation. (I don't use macOS) |
Xcode 14.3.1 (currently used in the CI) is based on ~ LLVM 14. It's failing because removing the fuzz workaround requires LLVM/Clang 15 or later. The GH image ships with newer Xcodes, https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode, so I assume we could switch to using Xcode 15.x + in the CI (based on LLVM 16.x). The multiprocess build is also failing, due to what I assume is a Debian packaging issue. |
The libbitcoinkernel |
eac1a46
to
7825898
Compare
7825898
to
e58e752
Compare
7acb570
to
fa88791
Compare
fa88791
to
fa224a2
Compare
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin/bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
##29918 is an unrelated issue existing on current master, so I think a separate pull request would be more appropriate. Also, I don't have or use macOS/Apple, so someone else creating that pull request would be beneficial. |
My remark is orthogonal to #29918. macOS < 13 doesn't have clang 15. They also don't have clang 14, which was missed in #29208. There's need to make a separate pull request for a single sentence: At the bottom of step 3: On macOS < 13 you additionally need to install a more recent version of clang:
brew install clang |
I don't think this is enough. Is it not required to specify the CC and CXX to Another reason to fix this in a separate pull is to have the fix in before this pull is merged (which at this point is unclear when it can happen). |
Done in #29934. Correction to version support above: clang 15.0 is shipped with Xcode 15, not 14. But its system requirements are fairly similar, macOS 13.5 or better: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes I don't have a macOS 11 or 12 machine to actually test if it still works. Given that homebrew dropped explicit support for macOS 11 I don't think we need to worry about that version, but it would be nice if someone can test if they can still build (clang 15) on macOS 12. |
Thanks, I'll rebase once the other pull is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa1964c.
Rebased and taken out of draft. I've opened two pull requests against oss-fuzz to bump the compiler there (one globally and one for bitcoin-core), but they are waiting for merge. If they are not merged, I think we can consider oss-fuzz as unsupported and drop it temporarily. Oss-fuzz is nice, but it seems odd to consider it a blocker here. |
Yea. I think we can merge our independant oss-fuzz bump, then merge this, then revert the oss-fuzz change if/when the global oss-fuzz bump happens. That has dragged on a bit too long, and is just blocking things here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa1964c - oss-fuzz LLVM will either be bumped globally tomorrow, or we'll land our own bump.
8fd40d4 fixup! ci: Test CMake edge cases (Hennadii Stepanov) c08acdb fixup! ci: Test CMake edge cases (Hennadii Stepanov) Pull request description: See bitcoin#29165. ACKs for top commit: m3dwards: utACK 8fd40d4 Tree-SHA512: 4f74730de2de7767875357044763f9aa73ba0e973a9af2572989f51bf631cd082279f08b7141ef8e56765cecf327ee31406bd83d05eb2a5125d520f773d0210f
Release note added in #30261. |
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
f8ca135 build: Fix check whether `-latomic` needed (Hennadii Stepanov) Pull request description: Clang >=15 still might need linking against `libatomic`. We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`. Addresses the bitcoin#29165 (comment). ACKs for top commit: maflcko: lgtm ACK f8ca135 fanquake: ACK f8ca135 Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
, bitcoin#24337, bitcoin#27682, bitcoin#29208, bitcoin#29091, bitcoin#29165, bitcoin#29934, bitcoin#30261, partial bitcoin#27662, bitcoin#28210, bitcoin#28348, bitcoin#30263 (bump minimum compiler) 0861692 partial bitcoin#30263: Bump clang minimum supported version to 16 (Kittywhiskers Van Gogh) 5e7e563 merge bitcoin#30261: add release note for 29091 and 29165 (Kittywhiskers Van Gogh) 4d10993 merge bitcoin#29934: add LLVM instruction for macOS < 13 (Kittywhiskers Van Gogh) 7e4614a merge bitcoin#29165: Bump clang minimum supported version to 15 (Kittywhiskers Van Gogh) f397076 merge bitcoin#29091: Bump g++ minimum supported version to 11 (Kittywhiskers Van Gogh) 35d3357 merge bitcoin#29208: Bump clang minimum supported version to 14 (Kittywhiskers Van Gogh) c71e3df partial bitcoin#28348: Bump g++ minimum supported version to 10 (Kittywhiskers Van Gogh) b7da1ed partial bitcoin#28210: Bump clang minimum supported version to 13 (Kittywhiskers Van Gogh) 6b22832 partial bitcoin#27662: Bump minimum supported GCC to g++-9 (Kittywhiskers Van Gogh) f677769 merge bitcoin#27682: Bump minimum supported Clang to clang-10 (Kittywhiskers Van Gogh) f8e0339 docs: add `libgmp` as an optional dependency (Kittywhiskers Van Gogh) ebba607 docs: update version used to match `depends` (Kittywhiskers Van Gogh) 39b6f4b merge bitcoin#24337: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Kittywhiskers Van Gogh) 2bd8422 merge bitcoin#23565: rewrite dependencies.md (Kittywhiskers Van Gogh) 56989ec merge bitcoin#24164: Bump minimum required clang/libc++ to 8.0 (Kittywhiskers Van Gogh) bac407f merge bitcoin#23060: increase minimum compiler and lib(std)c++ requirements (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Dependent on #6516 ## Breaking Changes GCC 11.1 or later, or Clang 16.0 or later, are now required to compile Dash Core. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 0861692 UdjinM6: utACK 0861692 Tree-SHA512: 6de3f8153482b4f379fd397dd3000688632356299c4f13a2f8af20d2f7337318bd3cd0b96182d6f378846b14981bc499ea32aa3d20cba6a0c7cf5f2a6e151937
Most supported operating systems ship with clang-15 (or later), so bump the minimum to that and allow new code to drop workarounds for previous clang bugs.
For reference:
clang17
); No idea about OpenSuse LeapOn operating systems where the clang version is not shipped by default, the user would have to use GCC, or install clang in a different way. For example: