Native_client/deepspeech_utils.so - undefined reference to symbol 'roundf@@GLIBC_2.2.5'

Oh yes, sorry, I should have mentioned that !

Without this flag I had link errors, not finding tensorflow functions. I will rebuild and tell you which ones.

…/tensorflow/bazel-bin/native_client/libctc_decoder_with_kenlm.so: undefined symbol: _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

ldd ../tensorflow/bazel-bin/native_client/libctc_decoder_with_kenlm.so finds tensorflow at ../tensorflow/bazel-bin/native_client/../_solib_local/_U_S_Snative_Uclient_Clibctc_Udecoder_Uwith_Ukenlm.so___Uexternal_Sorg_Utensorflow_Stensorflow/libtensorflow_framework.so

I am going to try with --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" as suggested here https://www.tensorflow.org/extend/adding_an_op

The thing is, you should not build this one with monolithic :), see the difference there: https://github.com/mozilla/DeepSpeech/blob/31c01db541e6c9d9e8cb86fa766e643ece95c29b/native_client/README.md#building

I second your choice for the CXX11 String ABI, you’ll hit that as well: our build system relies on older GCC where this is not needed, though.

Cool, now it is working !

I had added --monolithic since it seemed to solve the link error and I had forgotten about it later when I found --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"

1 Like

So it was definitively the C++ ABI. I think we should mention it in the docs then (and re-reading the docs, might be also useful to mention properly the branch to use, I know we have the information but it’s in fact kind of buried into the AOT model section). I’d be happy to review a PR if you can do one :).

How much useful would it be that we also document the Bazel version there? We used to rely on redirecting people to TensorFlow docs, but obviously, it’s not working / not good.

I agree that a few more pointers in the docs would be useful.

I will consider doing a PR.