Search code examples
pythontensorflowbazelalpine-linuxtensorflow-lite

how to exclude a package from building in bazel?


I am trying to build tensorflow-1.10.0 using bazel-0.16 in alpine 3.8. However it is giving me an error as mentioned below.

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

Commands I am using to build is:

bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

GCC and g++ version are 6.4 and 6.4 respectively. How can i avoid building of tensorflow/contrib/lite package, since I don't need to use it anyway.

Plus tensorflow-1.7.0 is getting build successfully, however tensorflow-1.10.0 is giving compilation issues as above.


Solution

  • The type portability issue has been fixed recently, and should be in the upcoming 1.11 release. You can either: