1

I am running my program on Ubuntu20.04. My program produced the following error when using several Kaldi libraries:

symbol lookup error: /home/Documents/xxx/libkaldi-chain.so: undefined symbol: _ZN5kaldi16g_cuda_allocatorE

Following the answer under this question: Symbol lookup error undefined symbol, but all symbols seem to be present, I looked up the output of ldd libkaldi-chain.so:

linux-vdso.so.1 (0x00007ffea1bc7000)
libkaldi-cudamatrix.so (0x00007fed03c5d000)
libkaldi-lat.so (0x00007fed036b3000)
libkaldi-fstext.so (0x00007fed035f6000)
libkaldi-hmm.so (0x00007fed0330a000)
libkaldi-util.so (0x00007fed0327f000)
libkaldi-matrix.so (0x00007fed0318b000)
libkaldi-base.so (0x00007fed03162000)
libfst.so.10 (0x00007fed0301a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed02fe3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed02e94000)
libcudart.so.9.2 (0x00007fed02c2a000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed02a47000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed02a2c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed0283a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fed04152000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed02834000)
libkaldi-tree.so (0x00007fed02731000)
libmkl_intel_lp64.so => /lib/x86_64-linux-gnu/libmkl_intel_lp64.so (0x00007fed01bc3000)
libmkl_core.so => /lib/x86_64-linux-gnu/libmkl_core.so (0x00007fecfd8a3000)
libmkl_sequential.so => /lib/x86_64-linux-gnu/libmkl_sequential.so (0x00007fecfc28b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fecfc280000)

If I am understanding this correctly, it looks like it's because the libkaldi-chain.so is not linked against several shared libs like 'libkaldi-cudamatrix.so', 'libkaldi-hmm.so'...

Could someone please enlighten me on how to correctly link these libraries and fix this error? I am really new to gcc.

nebula
  • 11
  • 2

0 Answers0