mirror of
https://github.com/vale981/ray
synced 2025-03-04 17:41:43 -05:00
Don't use local files / headers when using Bazel's sandboxed execution (#25752)
Why are these changes needed? Wasn't able to build Ray following these instructions : https://docs.ray.io/en/latest/ray-contribute/development.html#building-ray It fails to run pip install -e . --verbose # Add --user if you see a permission denied error. I have a local installation of protobuf via Homebrew and bazel is using its headers against the protobuf that it is pulling into its sandbox. It is a known issue with bazel and one of the workarounds is to block the local dir so it doesn't accidentally pick up the header if someone happens to have it installed locally. Manually tested by running bazel build --verbose_failures --sandbox_debug -- //:ray_pkg Without the fix I would get an error similar to https://gist.github.com/clarng/ff7b7bf7672802d1e3e07b4b509e4fc8 With the fix it builds
This commit is contained in:
parent
1feb702327
commit
922bd1ed69
1 changed files with 5 additions and 0 deletions
5
.bazelrc
5
.bazelrc
|
@ -192,3 +192,8 @@ build:ubsan --linkopt -fno-sanitize-recover=all
|
|||
# Import local specific llvm config options, which can be generated by
|
||||
# ci/env/install-llvm-dependencies.sh
|
||||
try-import %workspace%/.llvm-local.bazelrc
|
||||
|
||||
# Even with sandbox mode bazel prioritizes system headers over the ones in the sandbox.
|
||||
# It picks up the system headers when someone has protobuf installed via Homebrew.
|
||||
# Work around for https://github.com/bazelbuild/bazel/issues/8053
|
||||
build:macos --sandbox_block_path=/usr/local/
|
||||
|
|
Loading…
Add table
Reference in a new issue