-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
[Question] Failed to build with Bazel on macOS #5376
Comments
More detail logs:
|
Cannot reproduce it on another mac machine. I think there was a deeper cause for this issue. |
@hcoona I think the problem is that you have some local protobuf headers in |
Deleting |
Expanding on the useful tip from @mennanov, here's the commands that I used:
I believe that this formula is routinely installed for use of the |
This works for me. Thanks! |
Why is deleting Are there any other alternatives I could try? |
@acozzette Should be reopened? As far as I can tell, depending on files from outside of the build is a bug in the usage of bazel. It probably breaks all sorts of reproducibility and remote caching expectations |
I'm afraid I don't know enough about Bazel to know the right way to keep it from accessing system headers, but I would be happy to review a fix if you want to send a pull request. |
@acozzette With respect to this, a quick search showed that -nostdinc is supported by gcc and llvm, so you could probably pass that as an option to however cc is called. Alternatively, from bazelbuild/bazel#8053 (comment):
Perhaps the protobuf bazel build can explicitly sandbox out these paths? This is my first time dealing with Bazel myself so I'm not sure how reasonable these suggestions are. |
@kjeet Thank you for the suggestions. The |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
I believe this is still a problem that can and should be addressed |
What version of protobuf and what language are you using?
Version: v3.5.2,v3.6.1,master(4361398)
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
What operating system (Linux, Windows, ...) and version?
macOS 10.14.1
What runtime / compiler are you using (e.g., python version or gcc version)
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Build label: 0.19.1
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Nov 12 15:30:36 2018 (1542036636)
Build timestamp: 1542036636
Build timestamp as int: 1542036636
What did you do?
Steps to reproduce the behavior:
What did you expect to see
Building it successfully
What did you see instead?
The building failed with a few errors.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: