-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: Bump clang version to fix non-determinism #20454
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
Conversation
While we will likely end up doing this for 22.0, concept NACK on switching compilers in the RC stage of a release. I'm somewhat surprised this works as is. Normally there are other minor changes required, like adjusting a path, or fixing up a |
Correct. My intention is to get this merged into the master branch, not into the 0.21. For the 0.21 branch I've already ACKed #20447. |
This has been my preferred way to resolve this from the beginning. Code review ACK 5ebb747 |
My gitian macOS build:
|
…istic behavior in LLVM 8 8f7d1b3 Fix QPainter non-determinism on macOS (Andrew Chow) Pull request description: Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans when compiling. The particular optimization that seems to be causing the problems is that a temp variable is being added for spans->y. For some reason, when it does this, it chooses different instructions to use when making that variable. We bypass this problem by patching qt_intersect_spans to always make and use this local variable. Potential alternative to #20436 and #20440 ACKs for top commit: hebasto: re-ACK 8f7d1b3 ~for merging into the 0.21 branch, but [not into the master](bitcoin/bitcoin#20454) branch.~ fanquake: ACK 8f7d1b3 Tree-SHA512: b0d00a77643554021736524fb64611462ef2ec849a220543c12d99edb0f52f2e8128d2cc61fa82176b7e13b294574774a92d6b649badf8b7630c6d6a7e70ce10
…eterministic behavior in LLVM 8 8f7d1b3 Fix QPainter non-determinism on macOS (Andrew Chow) Pull request description: Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans when compiling. The particular optimization that seems to be causing the problems is that a temp variable is being added for spans->y. For some reason, when it does this, it chooses different instructions to use when making that variable. We bypass this problem by patching qt_intersect_spans to always make and use this local variable. Potential alternative to bitcoin#20436 and bitcoin#20440 ACKs for top commit: hebasto: re-ACK 8f7d1b3 ~for merging into the 0.21 branch, but [not into the master](bitcoin#20454) branch.~ fanquake: ACK 8f7d1b3 Tree-SHA512: b0d00a77643554021736524fb64611462ef2ec849a220543c12d99edb0f52f2e8128d2cc61fa82176b7e13b294574774a92d6b649badf8b7630c6d6a7e70ce10
LLVM 8 has inherent nondeterminism in the compiler, fixed in LLVM 9.
This reverts commit 8f7d1b3.
Rebased on top of the #21376. |
Gitian builds:
Guix build:
|
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.
Contributing GUIX hashes, mine line up with hebasto's
find output -type f -name *$(git rev-parse --short HEAD)*.* -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
71fb6c229b472a34a80c8efa62c8926078ca66c47ec4eceac4dcb1689879228a output/bitcoin-8df117089569-osx-unsigned.dmg
d86bb1f041ae104eeb524f346349a3568f3549919618f36a1c0d72186fa763e7 output/bitcoin-8df117089569-osx-unsigned.tar.gz
7b5a0f09c8c21df67aca61fcf5cb9a18c2944a71e769f50d87beb1ce1861cfaa output/bitcoin-8df117089569-osx64.tar.gz
3196530732e8ff0388a59a30c7bad17ecb7496f844af29a3813404d6523c6284 output/src/bitcoin-8df117089569.tar.gz
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
I've now included this in #19817, as part of a toolchain bump, which also means we'd move to Clang 10. |
765e0be build: split native_cctools (fanquake) Pull request description: This splits our native cctools package into two additional packages: `native_clang` and `native_libtapi`. This is in an effort to not only make our mac toolchain more understandable, but also to reduce duplication, and as a nice side-effect, fix the issue mentioned [here](#19817 (comment)). Everything about the current build process should remain the same. For gitian, that is: * Download LLVM Clang 8.0.0 binary. * Build libtapi using downloaded Clang. * Build cctools using downloaded Clang and libtapi. * Build the rest of depends.. For Guix (`FORCE_USE_SYSTEM_CLANG=1`): * Build libtapi using using system Clang. * Build cctools using system Clang and libtapi. * Build the rest of depends.. After this has been merged, my plan is to combine a modified version of #20454 and #21414 with #19817, and from what I understand that will be enough to support Apple Arm cross compilation. Builds at 477ed59: Guix: ```bash find output -type f -name *$(git rev-parse --short HEAD)*.* -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 7e57b9e5a2109d1a35f0091d86f975c1b1d73ac70ac2609cefbe1134efbf2c87 output/bitcoin-477ed59f49f3-osx-unsigned.dmg dd11e71c2634ac2fa883d1e45cbd6de194fad37624bb56b8b8a6213fd40d6050 output/bitcoin-477ed59f49f3-osx-unsigned.tar.gz 64384eaa2fd9768992d86a06a1414c9e92e84ba21a875696483df2bb5828e2a2 output/bitcoin-477ed59f49f3-osx64.tar.gz 8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3 output/src/bitcoin-477ed59f49f3.tar.gz ``` Gitian: ```bash d0eee8542d5f3d662555ad7218d2dc9f3f862656e65bcb2f01f256bfa0deead2 bitcoin-477ed59f49f3-osx-unsigned.dmg ba7bc94897e42e7a037e352c4e4e1730f181c6d76b6d6a2785bbd7bf85614c83 bitcoin-477ed59f49f3-osx-unsigned.tar.gz c4426d1d310a2fbffcaf2b7df0da4ec97bd11aab07085006dae68777b03f6372 bitcoin-477ed59f49f3-osx64.tar.gz 8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3 src/bitcoin-477ed59f49f3.tar.gz a746831467dc8ff17ec5df06fc9288a859c1961d8c0b632d97b42f080dbd825d bitcoin-core-osx-22-res.yml ``` ACKs for top commit: dongcarl: reACK 765e0be hebasto: ACK 765e0be, verified building of the `native_cctools` package step-by-step. Tree-SHA512: 61cf2b092fb8b9724adda1084e0cac9db889cd5e391914b43592aebc470fae3c1cbabc8b59a0abce6e7bad8c646694fe927f26f4deb18b60d7fd92f374f62feb
…ools 765e0be build: split native_cctools (fanquake) Pull request description: This splits our native cctools package into two additional packages: `native_clang` and `native_libtapi`. This is in an effort to not only make our mac toolchain more understandable, but also to reduce duplication, and as a nice side-effect, fix the issue mentioned [here](bitcoin#19817 (comment)). Everything about the current build process should remain the same. For gitian, that is: * Download LLVM Clang 8.0.0 binary. * Build libtapi using downloaded Clang. * Build cctools using downloaded Clang and libtapi. * Build the rest of depends.. For Guix (`FORCE_USE_SYSTEM_CLANG=1`): * Build libtapi using using system Clang. * Build cctools using system Clang and libtapi. * Build the rest of depends.. After this has been merged, my plan is to combine a modified version of bitcoin#20454 and bitcoin#21414 with bitcoin#19817, and from what I understand that will be enough to support Apple Arm cross compilation. Builds at 477ed59: Guix: ```bash find output -type f -name *$(git rev-parse --short HEAD)*.* -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 7e57b9e5a2109d1a35f0091d86f975c1b1d73ac70ac2609cefbe1134efbf2c87 output/bitcoin-477ed59f49f3-osx-unsigned.dmg dd11e71c2634ac2fa883d1e45cbd6de194fad37624bb56b8b8a6213fd40d6050 output/bitcoin-477ed59f49f3-osx-unsigned.tar.gz 64384eaa2fd9768992d86a06a1414c9e92e84ba21a875696483df2bb5828e2a2 output/bitcoin-477ed59f49f3-osx64.tar.gz 8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3 output/src/bitcoin-477ed59f49f3.tar.gz ``` Gitian: ```bash d0eee8542d5f3d662555ad7218d2dc9f3f862656e65bcb2f01f256bfa0deead2 bitcoin-477ed59f49f3-osx-unsigned.dmg ba7bc94897e42e7a037e352c4e4e1730f181c6d76b6d6a2785bbd7bf85614c83 bitcoin-477ed59f49f3-osx-unsigned.tar.gz c4426d1d310a2fbffcaf2b7df0da4ec97bd11aab07085006dae68777b03f6372 bitcoin-477ed59f49f3-osx64.tar.gz 8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3 src/bitcoin-477ed59f49f3.tar.gz a746831467dc8ff17ec5df06fc9288a859c1961d8c0b632d97b42f080dbd825d bitcoin-core-osx-22-res.yml ``` ACKs for top commit: dongcarl: reACK 765e0be hebasto: ACK 765e0be, verified building of the `native_cctools` package step-by-step. Tree-SHA512: 61cf2b092fb8b9724adda1084e0cac9db889cd5e391914b43592aebc470fae3c1cbabc8b59a0abce6e7bad8c646694fe927f26f4deb18b60d7fd92f374f62feb
Bumping clang from 6.0.1 to 8.0.0 in 5c2c835 (#19240) came with inherent non-determinism, that was fixed in LLVM 9.
This PR suggests the first option from:
This is an alternative to #20436, #20440 and #20447.
No patches :)