DeepSpeech: libctc_decoder_with_kenlm.so can't find symbol

For support and discussions, please use our Discourse forums.

If you’ve found a bug, or have a feature request, then please create an issue with the following information:

  • Have I written custom code (as opposed to running examples on an unmodified clone of the repository):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 16.04
  • TensorFlow installed from (our builds, or upstream TensorFlow): (‘v1.5.0-17-gad8f785’, ‘1.5.0-warpctc0.1’)
  • TensorFlow version (use command below):
  • Python version: 2.7.3
  • Bazel version (if compiling from source): 0.9
  • GCC/Compiler version (if compiling from source): gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  • CUDA/cuDNN version: 8.0/6
  • GPU model and memory: 8G
  • Exact command to reproduce:

Because tensorflow1.5 don’t support cuda8 and cudnn6, I built both tensorflow and native_client from source as follows:

  1. get tensorflow r1.5 from mozilla’s fork: git clone https://github.com/mozilla/tensorflow.git git checkout r1.5
  2. ./configure
  3. build native_client
  4. build tensorflow

But when I run python DeepSpeech.py, it print error messages:

tensorflow.python.framework.errors_impl.NotFoundError: native_client/libctc_decoder_with_kenlm.so: undefined symbol: _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

So I check this so file: ldd native_client

ldd native_client/libctc_decoder_with_kenlm.so 
        linux-vdso.so.1 =>  (0x00007ffcd6b41000)
        libtensorflow_framework.so => /home/lili/env-deepspeech/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so (0x00007f591c616000)
nm /home/lili/env-deepspeech/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so|grep _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS
000000000039fc50 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPb
000000000039fae0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPf
000000000039f930 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPi
00000000003a0270 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_11TensorShapeE
00000000003a0fc0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_12NameAttrListE
00000000003a00f0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_16TensorShapeProtoE
00000000003a0680 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_18PartialTensorShapeE
00000000003a1140 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_3gtl13InlinedVectorINS_8DataTypeELi4EEE
00000000003a0a90 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_6TensorE
000000000039ff80 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNS_8DataTypeE
00000000003a1460 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPPKNS_11TensorProtoE
00000000003a15d0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPPKNS_12NameAttrListE
000000000039f4d0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSs
000000000039fdc0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorIbSaIbEE
00000000003a1f10 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorIfSaIfEE
00000000003a1c10 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorIiSaIiEE
00000000003a0420 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_11TensorShapeESaIS5_EE
00000000003a18e0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_12NameAttrListESaIS5_EE
00000000003a1740 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_16TensorShapeProtoESaIS5_EE
00000000003a0830 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_18PartialTensorShapeESaIS5_EE
00000000003a0cb0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_6TensorESaIS5_EE
00000000003a2180 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorINS_8DataTypeESaIS5_EE
000000000039f650 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorISsSaISsEE
00000000003a1a80 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPSt6vectorIxSaIxEE
000000000039f7c0 T _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPx

it seems libctc_decoder_with_kenlm.so need _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE But libtensorflow_framework.so do not have that.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17

Most upvoted comments

@fancyerii Ok, I think I know why. Have a look at your first post, missing symbol is _ZN10tensorflow11GetNodeAttrERKNS_9AttrSliceENS_11StringPieceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, and then your grep returns some elements.

Your missing symbol contains cxx11 and none of your definitions in libtensorflow_framework.so contains any. How about adding GLIBCXX flags to your libctc build?

$ bazel build -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0"  //native_client:libctc_decoder_with_kenlm.so