Reputation: 491
I'm trying to build tensorflow on linux Mint 18 64x. I followed the instructions step by step by got this error:
ERROR: /home/david/tensorflow/tensorflow/core/kernels/BUILD:1489:1: undeclared inclusion(s) in rule '//tensorflow/core/kernels:batchtospace_op_gpu':
this rule is missing dependency declarations for the following files included by 'tensorflow/core/kernels/batchtospace_op_gpu.cu.cc':
'/usr/local/cuda-7.5/include/cuda_runtime.h'
'/usr/local/cuda-7.5/include/host_config.h'
'/usr/local/cuda-7.5/include/builtin_types.h'
The list of header files goes on and on, I just pasted the first 3. Any idea what might be causing this? Thanks!
Upvotes: 3
Views: 1946
Reputation: 491
I was able to solve this issue by adding cxx_builtin_include_directory: "/usr/local/cuda-7.5/include"
within toolchain{}
in the file tensorflow/third_party/gpus/crosstool/CROSSTOOL
However I then got another error:
ERROR: /home/david/tensorflow/tensorflow/core/kernels/BUILD:1489:1: output 'tensorflow/core/kernels/_objs/batchtospace_op_gpu/tensorflow/core/kernels/batchtospace_op_gpu.cu.pic.o' was not created.
I was able to solve that one by adding: cxx_flag: "-D_MWAITXINTRIN_H_INCLUDED"
below each of the two occurrences of cxx_flag: "-std=c++11"
in the CROSSTOOL file.
I then got yet another error:
'depthtospace_op_gpu.cu.o' was not created.
which I could solve by adding the following lines below each of the two occurrences of cxx_flag: "-std=c++11"
in the CROSSTOOL file :
cxx_flag: "-D_FORCE_INLINES"
cxx_flag: "-D__STRICT_ANSI__"
The solutions were found here:
Upvotes: 3