tensorflow: Compile Failed Numerous Times

Ubuntu 14.04 GCC 4.8.4 Cuda 7.5 Cudnn 4.0.7 Bazel 0.2.2b


bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer INFO: Found 1 target… ERROR: /home/peiguo/.cache/bazel/_bazel_peiguo/67521296d96959142b2d5d303d9c774c/external/re2/BUILD:9:1: undeclared inclusion(s) in rule ‘@re2//:re2’: this rule is missing dependency declarations for the following files included by ‘external/re2/util/rune.cc’: ‘/usr/include/stdc-predef.h’ ‘/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h’ ‘/usr/include/string.h’ ‘/usr/include/features.h’ ‘/usr/include/x86_64-linux-gnu/sys/cdefs.h’ ‘/usr/include/x86_64-linux-gnu/bits/wordsize.h’ ‘/usr/include/x86_64-linux-gnu/gnu/stubs.h’ ‘/usr/include/x86_64-linux-gnu/gnu/stubs-64.h’ ‘/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h’ ‘/usr/include/xlocale.h’ ‘/usr/include/x86_64-linux-gnu/bits/string3.h’ ‘/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h’ ‘/usr/include/stdint.h’ ‘/usr/include/x86_64-linux-gnu/bits/wchar.h’. Target //tensorflow/cc:tutorials_example_trainer failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 2.329s, Critical Path: 2.01s


I have tried many times, the error is always undeclared inclusion(s) in rule xxxx, but the xxxx is changing constantly.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (14 by maintainers)

Most upvoted comments

Thank you so much @yaroslavvb , adding the following line to third_party/gpus/crosstool/CROSSTOOL worked:

cxx_builtin_include_directory: “/usr/local/cuda-7.5/include”

@bostonbuddy Maybe add cxx_builtin_include_directory pointing to your 7.5 cuda similar to https://github.com/tensorflow/tensorflow/issues/3431