2017-01-05 134 views
1

我尝试从源代码安装Tensorflow。Tensorflow安装失败。 TensorContractionThreadPool.h:没有这样的文件或目录

./configure 
bazel build --copt=-march=native --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package 

但是当我做“巴泽勒建设......”它提升一个像这样的异常..

ERROR: /home/anderson/Downloads/tensorflow/tensorflow/core/kernels/BUILD:300:1: C++ compilation of rule '//tensorflow/core/kernels:reader_base' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter ... (remaining 115 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. 
In file included from ./tensorflow/core/framework/numeric_types.h:25:0, 
      from ./tensorflow/core/framework/allocator.h:23, 
      from ./tensorflow/core/framework/op_kernel.h:22, 
      from ./tensorflow/core/framework/queue_interface.h:22, 
      from ./tensorflow/core/kernels/reader_base.h:21, 
      from tensorflow/core/kernels/reader_base.cc:16: 
./third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint:42:52: fatal error: src/Tensor/TensorContractionThreadPool.h: No such file or directory 
compilation terminated. 
Target //tensorflow/tools/pip_package:build_pip_package failed to build 
Use --verbose_failures to see the command lines of failed build steps. 

说得简单,它说“SRC /张量/ TensorContractionThreadPool.h:无这样的文件或目录“

我能做些什么来解决这个问题?

+0

是的,已知的问题。在https://github.com/tensorflow/tensorflow/issues/6558 –

+0

@YaroslavBulatov的评论中有一个解决方法谢谢。但没有任何建议不能解决问题.... – Anderson

回答

0

我是这样做的:

  1. 克隆https://bitbucket.org/eigen/eigen
  2. 复制Tensor文件夹放到tensorflow:cp -r eigen/unsupported/Eigen/CXX11/src/Tensor tensorflow/third_party/eigen3/unsupported/Eigen/CXX11/src/
  3. 编辑tensorflow/third_party/eigen3/BUILD改变:

    glob(["unsupported/Eigen/CXX11/src/FixedPoint/*.h"]) + [ 
    

    到:

    hdrs = glob(["unsupported/Eigen/CXX11/src/FixedPoint/*.h"]) + 
         glob(["unsupported/Eigen/CXX11/src/Tensor/*.h"]) + [ 
    

    你也许还可以使用.../src/*/*.h

  4. 运行bazel build正常
0

@naktinis是正确的!从到位桶 但汞克隆回购是怕麻烦,ü应该安装水银首先:在HEAD

# Debian/Ubuntu 
$ apt-get install mercurial 

# Fedora 
$ yum install mercurial 

# Gentoo 
$ emerge mercurial 

# Mac OS (homebrew) 
$ brew install mercurial 

# FreeBSD 
$ cd /usr/ports/devel/mercurial 
$ make install 

# Solaris 11 Express 
$ pkg install SUNWmercurial 
相关问题