2017-04-25 89 views
1

编译TensorFlow时出现错误。 我得到命令:问题编译TensorFlow

/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-march=native' '-std=c++0x' '-march=native' -MD -MF bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/reduction_ops/tensorflow/core/kernels/reduction_ops_mean.pic.d '-frandom-seed=bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/reduction_ops/tensorflow/core/kernels/reduction_ops_mean.pic.o' -fPIC -DEIGEN_MPL2_ONLY -DTENSORFLOW_USE_JEMALLOC -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/local-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/local-opt/genfiles/external/local_config_sycl -iquote external/jemalloc -iquote bazel-out/local-opt/genfiles/external/jemalloc -iquote external/protobuf -iquote bazel-out/local-opt/genfiles/external/protobuf -iquote external/gif_archive -iquote bazel-out/local-opt/genfiles/external/gif_archive -iquote external/jpeg -iquote bazel-out/local-opt/genfiles/external/jpeg -iquote external/com_googlesource_code_re2 -iquote bazel-out/local-opt/genfiles/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/local-opt/genfiles/external/farmhash_archive -iquote external/highwayhash -iquote bazel-out/local-opt/genfiles/external/highwayhash -iquote external/png_archive -iquote bazel-out/local-opt/genfiles/external/png_archive -iquote external/zlib_archive -iquote bazel-out/local-opt/genfiles/external/zlib_archive -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/eigen_archive -isystem bazel-out/local-opt/genfiles/external/eigen_archive -isystem external/jemalloc/include -isystem bazel-out/local-opt/genfiles/external/jemalloc/include -isystem external/protobuf/src -isystem bazel-out/local-opt/genfiles/external/protobuf/src -isystem external/gif_archive/lib -isystem bazel-out/local-opt/genfiles/external/gif_archive/lib -isystem external/farmhash_archive/src -isystem bazel-out/local-opt/genfiles/external/farmhash_archive/src -isystem external/highwayhash -isystem bazel-out/local-opt/genfiles/external/highwayhash -isystem external/png_archive -isystem bazel-out/local-opt/genfiles/external/png_archive -isystem external/zlib_archive -isystem bazel-out/local-opt/genfiles/external/zlib_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions -pthread -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/core/kernels/reduction_ops_mean.cc -o bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/reduction_ops/tensorflow/core/kernels/reduction_ops_mean.pic.o 

但我得到的错误:

In file included from ./tensorflow/core/kernels/reduction_ops_common.h:26:0, 
       from tensorflow/core/kernels/reduction_ops_mean.cc:16: 
./third_party/eigen3/Eigen/Core:1:22: fatal error: Eigen/Core: No such file or directory 

我看着内Eigen/Core它只包含一个行:

> cat third_party/eigen3/Eigen/Core 
#include "Eigen/Core" 

有任何人有类似的问题,并设法解决?

感谢, 阿里克

+1

你真的运行过那个命令吗?或者这是bazel正在执行的?如果你手工操作它,你可以用bazel建造吗?如果你用bazel来运行它,你建的是什么版本的bazel和tensorflow的版本? – mhlopko

+0

这是Bazel正在执行,并且我也自己运行了这个命令,两者都有相同的结果。我正在使用最新的Bazel(它在家,所以我会写后),我正在尝试构建tensorflow HEAD(上周拉)。 –

+0

@mhlopko Bazel ver:0.4.5 TF:branch r1.0(也是HEAD有同样的问题)Ubuntu版本:16.04 –

回答

1

我手动安装Eigen3然后我改变了编译器标志包含只是打电话巴泽勒之前正确包含路径。