Reputation: 12138
Our Bazel build complains as
ERROR: XXX/BUILD:5:1: undeclared inclusion(s) in rule 'YYY':
this rule is missing dependency declarations for the following files included by 'ZZZ.c':
'/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
'/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'.
Why does it complain about dependencies to gcc system header files?
I'm using Ubuntu 17.04 with GCC 6.3.0.
Upvotes: 0
Views: 1005
Reputation: 12138
I solved it by cleaning up Bazels temporary files.
The reason was an upgrade of GCC during Bazel development.
Upvotes: 1
Reputation: 3270
Do you use custom crosstool? If so, can you check that those directories are covered by cxx_builtin_include_directory messages?
If you use builtin Bazel autoconfiguration, can you make sure Bazel is not using some other gcc? Bazel calls cc -E -xc++ - -v
to find all the builtin directories, do you expect this to work? Also, Bazel checks whether CC
environment variable is set, and if yes, it will take the compiler from there.
Upvotes: 1