I am trying to build the native_client binaries from source, as documented in “native_client/README.md”.
In the section “Building”, I am requested to run the following command :
bazel build --config=monolithic -c opt --copt=-O3 --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:deepspeech_utils //native_client:generate_trie
The target //native_client:deepspeech_utils gives the following error :
undefined reference to symbol ‘roundf@@GLIBC_2.2.5’
So I add “-lm” to “linkopts” in “native_client/BUILD”, I then get :
undefined reference to `main’
So I add “-c” to “linkopts” in “native_client/BUILD”, I then get :
output ‘native_client/libdeepspeech_utils.so’ was not created
How is it even supposed to be created, I don’t know… However libdeepspeech_utils.a is created, so it seems we might be building a static library instead of a shared one ?
Why is this target using “cc_library” and not “tf_cc_shared_object” as for “libdeepspeech.so” ?
Why isn’t named “libdeepspeech_utils.so” with the .so extension ?
It seems that almost nobody ever used bazel except to build TensorFlow and the documentation is very poor. So it is hard to find any help.