Closed
Conversation
This commit fixes the macOS Bazel build failures in Kokoro by: 1. Disabling the experimental downloader config in .bazelrc. The build was attempting to download dependencies from an outdated mirror, which resulted in 404 errors. 2. Re-enabling the default Apple C++ toolchain. The build was explicitly disabling the default toolchain without providing an alternative, which caused toolchain resolution errors. The original reason for disabling the toolchain, a gRPC incompatibility with Bazel 7 (as documented in #13311), is no longer relevant as the project now uses a version of gRPC that is compatible with Bazel 7.
This commit removes the dependency on from . This dependency is very old and is incompatible with modern Bazel's C++ toolchain resolution, especially when using bzlmod. Removing this dependency allows Bazel to use its built-in toolchain configuration, which should fix the toolchain resolution errors on macOS. This change is part of the effort to get the macOS Kokoro CI builds working.
This commit updates the @rules_cc dependency to a modern version (0.9.0) and updates the capture_build_info.bzl file to use the correct load statements. This change is necessary because modern versions of Bazel have externalized the C++ rules into the @rules_cc repository.
This commit removes an outdated dependency fetching loop from the ci/kokoro/macos/builds/bazel.sh script. The script was attempting to fetch the C++ toolchain and other dependencies as external repositories, which is incorrect for modern Bazel with bzlmod. By removing this loop, we allow Bazel and bzlmod to handle dependency resolution and toolchain configuration automatically. The --toolchain_resolution_debug flag has been added to get more information in case of further build failures. This commit also disables the -Werror flag for the boringssl library for all builds. This is necessary to resolve a compilation error caused by a conflict between the boringssl headers and a system-installed version of OpenSSL on macOS.
This commit adds the -nostdinc flag to the boringssl dependency in MODULE.bazel. This is necessary to prevent the compiler from finding a system-installed version of OpenSSL on macOS, which was causing a compilation failure due to header conflicts.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15485 +/- ##
=======================================
Coverage 93.04% 93.04%
=======================================
Files 2403 2403
Lines 219626 219626
=======================================
+ Hits 204348 204360 +12
+ Misses 15278 15266 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is