Use Bazel-provided DEVELOPER_DIR and SDKROOT#938
Use Bazel-provided DEVELOPER_DIR and SDKROOT#938Yannic wants to merge 1 commit intobazel-contrib:mainfrom
DEVELOPER_DIR and SDKROOT#938Conversation
f1b9a8a to
effdb22
Compare
|
@lfpino FYI |
843f2c3 to
e222a7e
Compare
With this change, `rules_foreign_cc` respects the value from `--xcode_version` and doesn't rely on the user's default Xcode being the one that's used.
|
I'm pretty sure we don't get values for these variables which is why I had to do this in the first place 🤔 #767 did something change in bazel for this? |
|
There are a lot of subtleties unfortunately. We get the vars iff we set |
|
Aren't there other downsides of setting that to False? I can't recall the behavior matrix but I remember hitting issues with this before bazelbuild/rules_swift#502 |
|
We are adding |
This upgrades `rules_foreign_cc` to a version including bazel-contrib/rules_foreign_cc#938, which fixes a build failure when the requested Apple SDK from `--xcode_version` does not match the system's default Xcode's SDKs. Example output: ``` rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreign_cc: Printing build logs: _____ BEGIN BUILD LOGS _____ xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'macosx12.1' + XCODE_VERSION_OVERRIDE=13.2.1.13C100 + APPLE_SDK_VERSION_OVERRIDE=12.1 + APPLE_SDK_PLATFORM=MacOSX ``` This fixes a hermeticity problem in the build and is a prerequisite for upgradting the macOS RE cluster to macOS 12, which in turn is a requirement for upgrading to Xcode 13.4. Progress on envoyproxy#2100
This upgrades `rules_foreign_cc` to a version including bazel-contrib/rules_foreign_cc#938, which fixes a build failure when the requested Apple SDK from `--xcode_version` does not match the system's default Xcode's SDKs. Example output: ``` rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreign_cc: Printing build logs: _____ BEGIN BUILD LOGS _____ xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'macosx12.1' + XCODE_VERSION_OVERRIDE=13.2.1.13C100 + APPLE_SDK_VERSION_OVERRIDE=12.1 + APPLE_SDK_PLATFORM=MacOSX ``` This fixes a hermeticity problem in the build and is a prerequisite for upgradting the macOS RE cluster to macOS 12, which in turn is a requirement for upgrading to Xcode 13.4. Progress on envoyproxy#2100 Signed-off-by: Yannic Bonenberger <yannic@engflow.com>
|
This is what I get on my local machine without this patch when explicitly passing |
This upgrades `rules_foreign_cc` to a version including bazel-contrib/rules_foreign_cc#938, which fixes a build failure when the requested Apple SDK from `--xcode_version` does not match the system's default Xcode's SDKs. Example output: ``` rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreign_cc: Printing build logs: _____ BEGIN BUILD LOGS _____ xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'macosx12.1' + XCODE_VERSION_OVERRIDE=13.2.1.13C100 + APPLE_SDK_VERSION_OVERRIDE=12.1 + APPLE_SDK_PLATFORM=MacOSX ``` This fixes a hermeticity problem in the build and is a prerequisite for upgradting the macOS RE cluster to macOS 12, which in turn is a requirement for upgrading to Xcode 13.4. Progress on #2100 Signed-off-by: Yannic Bonenberger <yannic@engflow.com>
|
Would a more focused solution be to exclude or override |
|
Explicitly setting |
IIRC the issue had something to do with the |
This upgrades `rules_foreign_cc` to a version including bazel-contrib/rules_foreign_cc#938, which fixes a build failure when the requested Apple SDK from `--xcode_version` does not match the system's default Xcode's SDKs. Example output: ``` rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreign_cc: Printing build logs: _____ BEGIN BUILD LOGS _____ xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: SDK "macosx12.1" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'macosx12.1' + XCODE_VERSION_OVERRIDE=13.2.1.13C100 + APPLE_SDK_VERSION_OVERRIDE=12.1 + APPLE_SDK_PLATFORM=MacOSX ``` This fixes a hermeticity problem in the build and is a prerequisite for upgradting the macOS RE cluster to macOS 12, which in turn is a requirement for upgrading to Xcode 13.4. Progress on envoyproxy/envoy-mobile#2100 Signed-off-by: Yannic Bonenberger <yannic@engflow.com> Signed-off-by: JP Simard <jp@jpsim.com>
Not clear if this is needed the related PR (bazel-contrib/rules_foreign_cc#938) never landed, but it seems the pinned version is not compatible with hermetic toolchains Signed-off-by: Ryan Northey <ryan@synca.io>
Not clear if this is needed - the related PR (bazel-contrib/rules_foreign_cc#938) never landed, but it seems the pinned version is not compatible with hermetic toolchains Signed-off-by: Ryan Northey <ryan@synca.io>
Not clear if this is needed - the related PR (bazel-contrib/rules_foreign_cc#938) never landed, but it seems the pinned version is not compatible with hermetic toolchains Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: Gustavo <grnmeira@gmail.com>
With this change,
rules_foreign_ccrespects the value from--xcode_versionand doesn't rely on the user's default Xcodebeing the one that's used.