DeepSpeech: [Mozilla TensorFlow] Bazel build failure (if_cuda missing)

  • Have I written custom code: No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch
  • TensorFlow installed from (our builds, or upstream TensorFlow): Mozilla
  • TensorFlow version (use command below): 1.14
  • Python version: 3.8.0
  • Bazel version (if compiling from source): 0.25.0
  • GCC/Compiler version (if compiling from source): gcc 9.2.0
  • CUDA/cuDNN version: X
  • GPU model and memory: Radeon RX 560
  • Exact command to reproduce: clone https://github.com/mozilla/tensorflow - branch 1.14
    cd $srcdir/tensorflow-r1.14
    ./configure

    ln -s ../DeepSpeech/native_client ./
    bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:generate_trie

Error:

Starting local Bazel server and connecting to it...
ERROR: ./tensorflow-r1.14/native_client/BUILD:3:1: file '@org_tensorflow//tensorflow:tensorflow.bzl' does not contain symbol 'if_cuda'
ERROR: ./tensorflow-r1.14/native_client/BUILD:85:1: name 'tf_cc_shared_object' is not defined
ERROR: error loading package 'native_client': Package 'native_client' contains errors

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

@tarnh this repository is governed by the Mozilla Community Participation Guidelines. In particular, see the section “Be Respectful” in expected behaviors.

If you believe someone is wrong, either be constructive or don’t say anything at all.

How did you ran ./configure ? What options did you validate ? That looks like misconfiguration.

Also, upstream documents Bazel 0.24.1 for this TensorFlow version. Please stick to it.

Today I tried to build Mozilla TensorFlow-1.14 with DeepSpeech 0.6.0 and faced the same issue. Initially I used Bazel 0.25.2 because there is “check_bazel_version(‘0.24.1’, ‘0.25.2’)” line in tensorflow/configure.py file (I followed the instructions here: https://www.tensorflow.org/install/source (“Make sure to install a supported Bazel version: any version between _TF_MIN_BAZEL_VERSION and _TF_MAX_BAZEL_VERSION as specified in tensorflow/configure.py.”)).

I tried “TF_NEED_CUDA=0” as you suggested. No effect in my case. Then as you suggested I tried to downgrade Bazel down to 0.24.1, and this helped! Now I found this: https://www.tensorflow.org/install/source#tested_build_configurations (tensorflow-1.14.0: Bazel 0.24.1). It seems https://www.tensorflow.org/install/source is confusing.

I suppose if @tarnh tries to downgrade Bazel to 0.24.1 like me, it should be fixed as well.