我正在OS X 10.11.6上从源代码构建Tensorflow 13.1。 我收到以下错误:
tensorflow / core / grappler / graph_analyzer / graph_analyzer.cc:75:28:错误:没有用户提供的默认构造函数的const类型'const Subgraph :: Identity'的对象的默认初始化
我尝试使用bazel 18.1和bazel 0.21进行构建:
$ bazel version
WARNING: failed to raise resource limit 8 to 524288: Invalid argument
Starting local Bazel server and connecting to it...
INFO: Invocation ID: d50219c6-b1e2-418e-aaf1-7f4ca0dfba4d
Build label: 0.21.0- (@non-git)
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Feb 27 15:35:45 2019 (1551281745)
Build timestamp: 1551281745
Build timestamp as int: 1551281745
MacBook-Pro:tensorflow davidlaxer$ g++
clang: error: no input files
MacBook-Pro:tensorflow davidlaxer$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
MacBook-Pro:tensorflow davidlaxer$ c++ --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
MacBook-Pro:tensorflow davidlaxer$ clang --version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/davidlaxer/anaconda/bin
MacBook-Pro:tensorflow davidlaxer$ which clang
/Users/davidlaxer/anaconda/bin/clang
MacBook-Pro:tensorflow davidlaxer$ /Users/davidlaxer/anaconda/bin/clang --version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/davidlaxer/anaconda/bin
这是bazel的输出:
ERROR: /Users/davidlaxer/tensorflow/tensorflow/core/grappler/graph_analyzer/BUILD:5:1: C++ compilation of rule '//tensorflow/core/grappler/graph_analyzer:graph_analyzer_lib' failed (Exit 1)
tensorflow/core/grappler/graph_analyzer/graph_analyzer.cc:75:28: error: default initialization of an object of const type 'const Subgraph::Identity' without a user-provided default constructor
const Subgraph::Identity empty_parent;
^
{}
1 error generated.