cjweeks / tensorflow-cmake

Integrate TensorFlow with CMake projects effortlessly
MIT License
331 stars 83 forks source link

build libtensorflow_all.so error #18

Closed MiloAnthony closed 7 years ago

MiloAnthony commented 7 years ago

Thank you for your work! I follow the instructions of install tensorflow , when I run 'bazel build tensorflow:libtensorflow_all.so' gcc threw an error: ERROR: /home/anthony/tensorflow/tensorflow/core/kernels/BUILD:76:1: C++ compilation of rule '//tensorflow/core/kernels:strided_slice_op' failed: gcc failed: error executing command /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 ... (remaining 107 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. ' In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:110:0, from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:4, from ./tensorflow/core/kernels/slice_op.h:21, from ./tensorflow/core/kernels/strided_slice_op_impl.h:21, from tensorflow/core/kernels/strided_slice_op_inst_2.cc:22: external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h: In instantiation of 'class Eigen::TensorBase<Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>, 0>': external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:833:7: required from 'class Eigen::TensorBase<Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>, 1>' external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:27:93: required from 'class Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>' ./tensorflow/core/kernels/strided_slice_op.h:119:14: In file included from ./tensorflow/core/kernels/slice_op.h:22:0, from ./tensorflow/core/kernels/strided_slice_op_impl.h:21, from tensorflow/core/kernels/strided_slice_op_inst_2.cc:22: ./tensorflow/core/framework/tensor_types.h: In instantiation of 'struct tensorflow::TTypes<short int, 2, long int>': external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:814:91: required from 'class Eigen::TensorBase<Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>, 0>' external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:833:7: required from 'class Eigen::TensorBase<Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>, 1>' external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:27:93: required from 'class Eigen::TensorMap<Eigen::Tensor<short int, 2, 1, int>, 16, Eigen::MakePointer>' ./tensorflow/core/kernels/strided_slice_op.h:119:14: required from 'void tensorflow::functor::StridedSliceAssign<Device, T, NDIMS>::operator()(const Device&, typename tensorflow::TTypes<T, NDIMS>::Tensor, typename tensorflow::TTypes<T, NDIMS>::ConstTensor, const Eigen::DSizes<long int, NDIMS>&, const Eigen::DSizes<long int, NDIMS>&, const Eigen::DSizes<long int, NDIMS>&) [with Device = Eigen::ThreadPoolDevice; T = short int; int NDIMS = 2; typename tensorflow::TTypes<T, NDIMS>::Tensor = <type error>; typename tensorflow::TTypes<T, NDIMS>::ConstTensor = <type error>]' ./tensorflow/core/kernels/strided_slice_op_impl.h:154:53: required from 'void tensorflow::HandleStridedSliceAssignCase<Device, T, NDIM>::operator()(tensorflow::OpKernelContext*, const tensorflow::gtl::ArraySlice<long long int>&, const tensorflow::gtl::ArraySlice<long long int>&, const tensorflow::gtl::ArraySlice<long long int>&, const tensorflow::TensorShape&, bool, tensorflow::Tensor*) [with Device = Eigen::ThreadPoolDevice; T = short unsigned int; int NDIM = 2]' ./tensorflow/core/kernels/strided_slice_op_impl.h:287:1: required from here in finish_member_declaration, at cp/semantics.c:2872 struct TTypes { Is it a problem with tensorflow's version? I used 1.0.0.