Bazel build error

I’m getting the following error when trying to build libspeech.so and generate_trie:

INFO: Build options --copt and --define have changed, discarding analysis cache.
ERROR: /home/william/speech/deepspeech/tensorflow/native_client/BUILD:68:1: no such target '//tensorflow:darwin': target 'darwin' not declared in package 'tensorflow' defined by /home/william/speech/deepspeech/tensorflow/tensorflow/BUILD and referenced by '//native_client:libdeepspeech.so'
ERROR: Analysis of target '//native_client:libdeepspeech.so' failed; build aborted: no such target '//tensorflow:darwin': target 'darwin' not declared in package 'tensorflow' defined by /home/william/speech/deepspeech/tensorflow/tensorflow/BUILD
INFO: Elapsed time: 0.432s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 208 targets configured)

I followed the steps from here. I’m using tensorflow 1.14.0 from the mozilla tensorflow repo and bazel release 0.24.1. I ran ./configure in the tensorflow folder without any issue (chose the recommended options). I created the symbolic link to native_client in the tensorflow folder.

I’m trying to output more transcriptions (top-ten) by changing the top_paths in ctc_beam_search_decoder.cpp file. But this (at least currently) requires a re-compile of the native_client source.

1 Like

Related to:

Please make sure you checkout properly for r1.14

Aha, when checking out the latest alpha version of DeepSpeech (with the updated native_client/BUILD) it’s compiling properly. Thanks.

The only reason I had downgraded to 0.5.1 is because I got compatibility errors with the latest pre-built acoustic model (see here for example). But that’s somehow no longer a problem now.

Spoke too soon … Getting the following error when running the latest version of deepspeech (v0.6.0-alpha.4) with the latest pre-built acoustic model (0.5.1):

TensorFlow: v1.14.0-14-g1aad02a78e
DeepSpeech: v0.6.0-alpha.4-28-gdaa6167
2019-08-10 15:08:30.671535: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Specified model file version (0) is incompatible with minimum version supported by this client (2). See https://github.com/mozilla/DeepSpeech/#model-compatibility for more information
Could not create model.

This seems like a catch-22 … I need the latest deepspeech version to compile the native_client code but need an earlier version to run the acoustic model

Maybe I should try and manually copy the native_client/BUILD file in version 0.5.1 to make the compiling work?

Yes, it will work, just removing the macos select from the BAZEL file did the trick for me . I think 0.5.1 requires tf 1.13, not really sure, if it fails try with 1.13

Yes, reverting TensorFlow to r1.13 works, thanks.