Ask questionsBuild failure - missing dependency declarations LLVM

With the current trunk at 8b87c1a09bf156ca9a42d9f72fad07da62100318 (Jun 29), even after a bazel clean, I see:

$  CC=clang CXX=clang++ bazel  --per_file_copt=llvm-project@-UNDEBUG   --linkopt="-fuse-ld=lld"    //tensorflow/compiler/mlir/xla/tests:all
INFO: Found 1 target and 40 test targets...
ERROR: /ws/2cca323f33485b8e970325d856ce9b72/external/llvm-project/llvm/BUILD:665:1: undeclared inclusion(s) in rule '@llvm-project//llvm:count':
this rule is missing dependency declarations for the following files included by 'external/llvm-project/llvm/utils/count/count.c':
INFO: Elapsed time: 0.140s, Critical Path: 0.02s
INFO: 0 processes.
$ clang --version
clang version 10.0.0 (Fedora 10.0.0-2.fc32)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ bazel --version
bazel 3.1.0

OS: Fedora 32, x86-64


Answer questions jpienaar

Maybe, but if the same header is included from different files build with different C++ macros enabled, then you would end with different includes. You'd need to ensure that any header or build rule that is optionally included due to macro (which one can do with conditional rules) is always included or not for all compilation paths else bazel is correct in flagging it as it is a missing dependency.

I don't know why this happens for count though. But unless one wrote the build files expecting this and have a CI for it, it may or may not work.


Related questions

ModuleNotFoundError: No module named 'tensorflow.contrib' hot 9
Tf.Keras metrics issue hot 8
Error occurred when finalizing GeneratorDataset iterator hot 7
Error loading tensorflow hot 6
module 'tensorflow' has no attribute 'ConfigProto' hot 6
TF 2.0 'Tensor' object has no attribute 'numpy' while using .numpy() although eager execution enabled by default hot 6
tensorflow-gpu CUPTI errors
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
ModuleNotFoundError: No module named 'tensorflow.contrib'
When importing TensorFlow, error loading Hadoop
OSError: SavedModel file does not exist at: saved_model_dir/{saved_model.pbtxt|saved_model.pb}
AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'
tf.keras.layers.Conv1DTranspose ?
[TF 2.0] tf.keras.optimizers.Adam hot 4
TF2.0 AutoGraph issue hot 4
Github User Rank List