-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Cannot 'bazel build' master #8053
Comments
Hi @thundergolfer, sorry that you couldn't build Bazel. This should definitely work. What's the output of these commands?
|
I'm guessing the 2nd is a problem? |
I think the problem is 3: You're using a non-Apple toolchain (clang seems to come from NixOS?). We're not testing against this on CI and can't make any promise that it will work :/ Can you try building against the standard Apple tools? The Xcode command-line tools should be fine (if they're reasonably up to date), although a full, recent Xcode installation is the best tested environment, as we test it on CI. |
Actually sorry I was under a Nix env when I ran the command. Late-night messup 😖. Under
|
I can reproduce that Bazel doesn't build on MacOS.
Errors:
|
So, the fix for me is to:
|
@hlopko This sounds like Bazel accidentally picks up header files from the system when compiling Bazel's checked in Protobuf C++ sources on macOS? Can you have a look? |
Instead of simply delete
@philwo are you saying there that Bazel is exiting its build sandbox? |
@thundergolfer Bazel's usual sandboxing does not try to protect against accidental dependencies on files from the host filesystem. This is by design, because it's not possible to give a one-size-fits-all recipe regarding which files from the host system are still OK and which are not (e.g. is it OK if an action calls However, AFAIK the C++ rules should ensure that the include files are not used from the system. As a bonus: You can hide individual directories or files from actions using the |
How does Bazel get the include path for |
Found it.
|
I'm assigning this to the C++ team, because this looks like a potential bug in the C++ rules. |
Because by default we use system installed compiler, we also need to use system installed headers. We detect system installed headers by running |
@hlopko I see, that makes sense! In wonder, shouldn't Bazel's own protobuf headers take precedence over headers from a system-installed protobuf though? |
Was there any progress or further thoughts on this @philwo / @hlopko? I've worked around the issue by adding |
I think this is the same issue as #8984 and should plausibly be closed as a duplicate of it? |
Closing as duplicate |
(Additional scoping and an attempt to reopen over in #10472 (comment)) |
Description of the problem / feature request:
bazel build //src:bazel
resulting inFAILED: Build did not complete successfully
Feature requests: what underlying problem are you trying to solve with this feature?
Would like to be able to compile and run a development version of
bazel
so that I can debug issues that I'm having with the tool.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Get
bazel
(I usedbrew install bazel
). Then do:Outputs:
What operating system are you running Bazel on?
macOS Mojave
-Version 10.14.3
What's the output of
bazel info release
?What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Any other information, logs, or outputs that you want to share?
When I continuously re-run
bazel build //src:bazel
I keep getting:The text was updated successfully, but these errors were encountered: