Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Bazel was working great for me on Mac OS X Serra, but then I made the mistake of installing Xcode 8.1 instead of just the command line tools. Now I get
shimura:hol% bazel build ...
INFO: Found 2 targets...
ERROR: /Users/geoffreyi/deepmath/hol/BUILD:26:1: undeclared inclusion(s) in rule '//hol:trace':
this rule is missing dependency declarations for the following files included by 'hol/trace_main.cc':
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string'
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config'
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd'
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.0.0/include/stdarg.h'
...
The issue happens with https://github.com/tensorflow/deepmath but not with https://github.com/tensorflow/tensorflow.
I'm not sure how to reproduce this with installing Xcode, and the fact that it differs between deepmath and tensorflow means something subtle is happening.
If it matters, I installed Xcode 8.1 through the Managed Software Center, not via the normal App Store process.
Mac OS X Sierra
Bazel version (output of bazel info release):
shimura:hol% bazel info release
release 0.4.0-homebrew
No.
(If they are large, please upload as attachment or provide link).
Ah, this may be the same: https://github.com/bazelbuild/bazel/issues/803.
Upgrading to release 0.4.1-homebrew fixed the problem!
I'm on release 0.4.3 and I still get this inclusion issue. I'm seeing it when trying to run bazel run //src/tools/generate_workspace (on HEAD). Any ideas what the cause is here?
I encountered this after an upgrade to Xcode 8.3. I fixed it by cleaning:
rm -rf /private/var/tmp/_bazel_kersson/*
bazel clean --expunge should be easier
+1 I ran into this issue when I upgraded to Xcode 9 beta
I ran into this again, not sure what triggered it, but bazel clean --expunge did not fix it. I had to rm -rf like @kersson did.
Most helpful comment
I encountered this after an upgrade to Xcode 8.3. I fixed it by cleaning: