如何从 bazel 构建中排除包?
how to exclude a package from building in bazel?
我正在尝试在 alpine 3.8 中使用 bazel-0.16 构建 tensorflow-1.10.0。但是,它给我一个错误,如下所述。
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:46:22: error: 'tflite::internal::Log2Floor' declared as an 'inline' variable
inline int Log2Floor(uint n) {
^~~~
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:46:22: error: 'uint' was not declared in this scope
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:244:1: error: expected '}' at end of input
} // namespace tflite
^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
我用来构建的命令是:
bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package
GCC和g++版本分别是6.4和6.4。
我怎样才能避免构建 tensorflow/contrib/lite
包,因为无论如何我都不需要使用它。
此外,tensorflow-1.7.0 正在成功构建,但是 tensorflow-1.10.0 出现上述编译问题。
类型可移植性问题已 fixed recently,应该会出现在即将发布的 1.11 版本中。您可以:
- 尝试从 master 签出构建
- 等待 1.11 发布
- the fix 中的补丁到 1.10 分支
- 手动编辑 build script to remove the
lite
-specific dependencies。
我正在尝试在 alpine 3.8 中使用 bazel-0.16 构建 tensorflow-1.10.0。但是,它给我一个错误,如下所述。
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:46:22: error: 'tflite::internal::Log2Floor' declared as an 'inline' variable
inline int Log2Floor(uint n) {
^~~~
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:46:22: error: 'uint' was not declared in this scope
tensorflow/contrib/lite/kernels/internal/spectrogram.cc:244:1: error: expected '}' at end of input
} // namespace tflite
^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
我用来构建的命令是:
bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package
GCC和g++版本分别是6.4和6.4。
我怎样才能避免构建 tensorflow/contrib/lite
包,因为无论如何我都不需要使用它。
此外,tensorflow-1.7.0 正在成功构建,但是 tensorflow-1.10.0 出现上述编译问题。
类型可移植性问题已 fixed recently,应该会出现在即将发布的 1.11 版本中。您可以:
- 尝试从 master 签出构建
- 等待 1.11 发布
- the fix 中的补丁到 1.10 分支
- 手动编辑 build script to remove the
lite
-specific dependencies。