2016-07-26 88 views
3

我想在linux Mint 18 64x上構建tensorflow。我跟着指示一步一步得到這個錯誤:在linux上構建tensorflow時的錯誤

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' 

的頭文件的例子不勝枚舉,我剛纔粘貼第一3.任何想法可能導致什麼呢? 謝謝!

回答

2

我能夠在文件tensorflow內toolchain{}加入cxx_builtin_include_directory: "/usr/local/cuda-7.5/include"來解決這個問題/ THIRD_PARTY/GPU的/ crosstool的/ crosstool的

但是我當時有另外一個錯誤:

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. 

我能通過在CROSSTOOL文件中cxx_flag: "-std=c++11"的兩次出現的每一個下面添加:cxx_flag: "-D_MWAITXINTRIN_H_INCLUDED"來解決該問題。

然後,我得到了另一個錯誤:

'depthtospace_op_gpu.cu.o' was not created. 

,我可以通過在crosstool的文件中添加以下各兩次出現cxx_flag: "-std=c++11"以下行解決:

cxx_flag: "-D_FORCE_INLINES" 
    cxx_flag: "-D__STRICT_ANSI__" 

的解決方案是在這裏找到: