-
Notifications
You must be signed in to change notification settings - Fork 38.7k
build: depends macOS: point --sysroot to SDK #17118
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
| darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) | ||
| darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ | ||
| darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --show-sdk-path) | ||
| darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ --sysroot $(shell xcrun --show-sdk-path) |
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.
Why executing shell?
Is it really necessary?
The command should be also executed without shell (at least on my linux + zsh)
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.
I just copied the pattern @theuni used from other places in that file.
|
Gitian builds for commit 561a7d3 (master):
Gitian builds for commit 37adf88b0c4b644d7feac57429dca4f4791f2fd1 (master and this pull):
|
|
I'm able to run QT from |
|
utACK a0daea4 |
a0daea4 [build] depends macOS: point --sysroot to SDK (Sjors Provoost) Pull request description: Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS. Replaces #14352 (which doesn't work on Catalina). ACKs for top commit: jonasschnelli: utACK a0daea4 Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
a0daea4 [build] depends macOS: point --sysroot to SDK (Sjors Provoost) Pull request description: Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS. Replaces bitcoin#14352 (which doesn't work on Catalina). ACKs for top commit: jonasschnelli: utACK a0daea4 Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
) a0daea4 [build] depends macOS: point --sysroot to SDK (Sjors Provoost) Pull request description: Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS. Replaces bitcoin#14352 (which doesn't work on Catalina). ACKs for top commit: jonasschnelli: utACK a0daea4 Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
…shpay#3161) a0daea4 [build] depends macOS: point --sysroot to SDK (Sjors Provoost) Pull request description: Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS. Replaces bitcoin#14352 (which doesn't work on Catalina). ACKs for top commit: jonasschnelli: utACK a0daea4 Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
* commit '8b14adb206d76fbc6307385999a1c512052e93fa': (21 commits) [v0.14.0.x] Update release notes with change log (dashpay#3213) [v0.14.0.x] Bump version to 0.14.0.4 and draft release notes (dashpay#3203) Circumvent BIP69 sorting in fundrawtransaction.py test (dashpay#3100) Fix compile issues Merge bitcoin#11397: net: Improve and document SOCKS code Slightly optimize ApproximateBestSubset and its usage for PS txes (dashpay#3184) Update activemn if protx info changed (dashpay#3176) Actually update spent index on DisconnectBlock (dashpay#3167) Only track last seen time instead of first and last seen time (dashpay#3165) Merge bitcoin#17118: build: depends macOS: point --sysroot to SDK (dashpay#3161) Simulate BlockConnected/BlockDisconnected for PS caches Few fixes related to SelectCoinsGroupedByAddresses (dashpay#3144) Various fixes for mixing queues (dashpay#3138) Also consider txindex for transactions in AlreadyHave() (dashpay#3126) Ignore recent rejects filter for locked txes (dashpay#3124) Make orphan TX map limiting dependent on total TX size instead of TX count (dashpay#3121) Update/modernize macOS plist (dashpay#3074) Fix bip69 vs change position issue (dashpay#3063) Partially revert 3061 (dashpay#3150) Fix SelectCoinsMinConf to allow instant respends (dashpay#3061) ... # Conflicts: # configure.ac # doc/man/biblepay-cli.1 # doc/man/biblepay-qt.1 # doc/man/biblepay-tx.1 # doc/man/biblepayd.1 # doc/release-notes.md # src/clientversion.h # src/wallet/wallet.cpp
Summary: point --sysroot to SDK in order to support building on macOS Catalina Backport of core [[ bitcoin/bitcoin#17118 | PR17118 ]]. Test Plan: On macOS Catalina: cd depends make build-osx NO_PROTOBUF=1 # building protobuf fails, needs investigation Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, rex4539 Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D4816
Summary: point --sysroot to SDK in order to support building on macOS Catalina Backport of core [[ bitcoin/bitcoin#17118 | PR17118 ]]. Test Plan: On macOS Catalina: cd depends make build-osx NO_PROTOBUF=1 # building protobuf fails, needs investigation Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, rex4539 Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D4816
4f90a19 [build] depends macOS: point --sysroot to SDK (Sjors Provoost) Pull request description: Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS. Coming from bitcoin#17118. ACKs for top commit: Fuzzbawls: utACK 4f90a19 random-zebra: utACK 4f90a19 and merging... Tree-SHA512: 9b757afa81335e8c9c0c1d3a283a87612d5e959506b290b6b7a65a643474e57fd3931081698f84f310609e5c28ba65f879fa90d905125ce6c97cbb38b6cad3b9
cf971c9 build: use -isysroot over --sysroot on macOS (fanquake) Pull request description: Not only does this seem to be the more correct behaviour when targeting Darwin, but if you use `-isysroot`, Clangs Darwin driver will [infer the deployment target](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L1652) from the SDK and use other SDK info when parsing arguments to the linker. In the case of [`-platform_version`](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L2656), which is added if the linker is [new enough](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L342), the version tuple is constructed from the SDKInfo, and SDKInfo, as far as I can tell, only exists when `-isysroot` has been passed, see [parseSDKSettings](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L1785) As a result, the SDK version field in the `LC_BUILD_VERSION` command is filled out. i.e when building master: ```bash cmd LC_BUILD_VERSION cmdsize 32 platform 1 minos 10.14 sdk n/a ntools 1 tool 3 version 650.9 ``` vs this PR: ```bash cmd LC_BUILD_VERSION cmdsize 32 platform 1 minos 10.14 sdk 11.3 ntools 1 tool 3 version 650.9 ``` This, from what I understand, will fix the issue we are having with Qt deciding wether or not to enable features like "Dark mode" on macOS, see #21771, however I have not tested that. Thus this is an alternative to #21782. Our usage of `--sysroot` was added in #17118. ```bash -isysroot <dir> Set the system root directory (usually /) ``` ACKs for top commit: Sjors: tACK cf971c9 hebasto: re-ACK cf971c9, only rebased and addressed comments since my [previous](#21793 (review)) review. Tree-SHA512: f01138179fb85083b5505bbaa48810451098ffa4da5d3c9b673785448790aa76f2e64b2aab6e698f6ee378a21f70626445a3fabee7c61dbfc44e96f3e3964656
cf971c9 build: use -isysroot over --sysroot on macOS (fanquake) Pull request description: Not only does this seem to be the more correct behaviour when targeting Darwin, but if you use `-isysroot`, Clangs Darwin driver will [infer the deployment target](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L1652) from the SDK and use other SDK info when parsing arguments to the linker. In the case of [`-platform_version`](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L2656), which is added if the linker is [new enough](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L342), the version tuple is constructed from the SDKInfo, and SDKInfo, as far as I can tell, only exists when `-isysroot` has been passed, see [parseSDKSettings](https://github.com/llvm/llvm-project/blob/3e037f8f0e26acab8cc784ea4c7d05da79f7c22e/clang/lib/Driver/ToolChains/Darwin.cpp#L1785) As a result, the SDK version field in the `LC_BUILD_VERSION` command is filled out. i.e when building master: ```bash cmd LC_BUILD_VERSION cmdsize 32 platform 1 minos 10.14 sdk n/a ntools 1 tool 3 version 650.9 ``` vs this PR: ```bash cmd LC_BUILD_VERSION cmdsize 32 platform 1 minos 10.14 sdk 11.3 ntools 1 tool 3 version 650.9 ``` This, from what I understand, will fix the issue we are having with Qt deciding wether or not to enable features like "Dark mode" on macOS, see bitcoin#21771, however I have not tested that. Thus this is an alternative to bitcoin#21782. Our usage of `--sysroot` was added in bitcoin#17118. ```bash -isysroot <dir> Set the system root directory (usually /) ``` ACKs for top commit: Sjors: tACK cf971c9 hebasto: re-ACK cf971c9, only rebased and addressed comments since my [previous](bitcoin#21793 (review)) review. Tree-SHA512: f01138179fb85083b5505bbaa48810451098ffa4da5d3c9b673785448790aa76f2e64b2aab6e698f6ee378a21f70626445a3fabee7c61dbfc44e96f3e3964656
Fixes errors like
fatal error: 'unistd.h' file not foundwhen building depends on macOS.Replaces #14352 (which doesn't work on Catalina).