我试图在El Capitan上构建Tensorflow iOS并遇到很多错误。我已按照https://github.com/tensorflow/tensorflow/pull/3382/files和https://github.com/tensorflow/tensorflow/pull/2936/files#r67559693中的更改进行操作,直到我在运行tensorflow/contrib/makefile/build_all_ios.sh
时遇到此错误:
gcc --std=c++11 -I. -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/ -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/eigen -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/gemmlowp -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/ -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/include -I/usr/local/include -c tensorflow/core/platform/windows/env_time.cc -o /Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/tensorflow/core/platform/windows/env_time.o
tensorflow/core/platform/windows/env_time.cc:19:10: fatal error: 'windows.h' file not
found
#include <windows.h>
^
1 error generated.
make: *** [/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/tensorflow/core/platform/windows/env_time.o] Error 1
+ '[' 2 -ne 0 ']'
+ echo 'armv7 compilation failed.'
armv7 compilation failed.
+ exit 1
有谁知道怎么通过那个?我假设它正在尝试在Mac上构建Windows。
答案 0 :(得分:0)
我只是通过删除所有内容来解决问题,并从头开始使用以下内容:
brew install bazel
brew install automake
brew install autoconf
brew uninstall libtool && brew install libtool
git clone https://github.com/tensorflow/tensorflow
tensorflow/contrib/makefile/download_dependencies.sh
tensorflow/contrib/makefile/build_all_ios.sh