tensorflow: Error when bazel building after pull down newest master branch

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 1.3.0
  • Python version: 2.7.12
  • Bazel version (if compiling from source): 0.5.4
  • CUDA/cuDNN version: 8.0.61
  • GPU model and memory: NVIDIA Corporation Device 1b06
  • Exact command to reproduce:
bazel build tensorflow/python/tools:freeze_graph

Describe the problem

Here is the warning and error message I got :

WARNING: tensorflow/tensorflow/core/BUILD:1801:1: in includes attribute of cc_library rule //tensorflow/core:framework_headers_lib: '../../external/nsync/public' resolves to 'external/nsync/public' not below the relative path of its package 'tensorflow/core'. This will be an error in the future. Since this rule was created by the macro 'cc_header_only_library', the error might have been caused by the macro implementation in tensorflow/tensorflow/tensorflow.bzl:1108:30
WARNING: tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.
WARNING: /home/simonlee/Work/tensorflow/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.
INFO: Analysed target //tensorflow/python/tools:freeze_graph (0 packages loaded).
INFO: Found 1 target...
ERROR: tensorflow/tensorflow/contrib/lite/toco/BUILD:158:1: C++ compilation of rule '//tensorflow/contrib/lite/toco:graph_transformations' failed (Exit 1)
In file included from external/gemmlowp/public/../internal/dispatch_gemm_shape.h:20:0,
                 from external/gemmlowp/public/gemmlowp.h:19,
                 from ./tensorflow/contrib/lite/kernels/internal/common.h:48,
                 from ./tensorflow/contrib/lite/toco/runtime/types.h:18,
                 from ./tensorflow/contrib/lite/toco/model.h:25,
                 from ./tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.h:23,
                 from tensorflow/contrib/lite/toco/graph_transformations/identify_l2_pool.cc:20:
external/gemmlowp/public/../internal/../internal/kernel_default.h:88:2: error: #error "SIMD not enabled, you'd be getting a slow software fallback. Consider enabling SIMD extensions (for example using -msse4 if you're on modern x86). If that's not an option, and you would like to continue with the slow fallback, define GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK."
 #error \
  ^
Target //tensorflow/python/tools:freeze_graph failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.120s, Critical Path: 0.85s
FAILED: Build did NOT complete successfully

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (2 by maintainers)

Most upvoted comments

I have try below command , and it passed!

bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 tensorflow/python/tools:freeze_graph

I was having this same issue in a new container I created to build tensorflow and run some tests. Error went away after I remembered to run the ./configure script at the root of the project.

@yokiqust nope šŸ˜• it’s driving me crazy, I can’t find any information online about it either

I fellow the part of ā€œOptimized buildā€ on the page of https://www.tensorflow.org/serving/setup, and added msse4 options(Although mine is on modern x86_64) when building and testing,it seems work,but maybe not the best solution(maybe define GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK in the source code when x86_64). 1.> nohup.out && nohup bazel build -c opt –copt=-msse4.1 --copt=-msse4.2 tensorflow_serving/… & 2.bazel test -c opt –copt=-msse4.1 --copt=-msse4.2 tensorflow_serving/…