kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.24k stars 5.32k forks source link

build kaldi with tcmalloc ,cannot find -ltcmalloc_minimal #4625

Closed hm-0714 closed 3 years ago

hm-0714 commented 3 years ago

i use tools/install_tcmalloc.sh to build tcmalloc and ./congure --enable-tcmalloc
but when make,this is build error: /opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: cannot find -ltcmalloc_minimal why?

danpovey commented 3 years ago

@LvHang ?

csukuangfj commented 3 years ago

https://github.com/kaldi-asr/kaldi/blob/3b8a97d859464912ddc50877f7280048f654c275/src/configure#L1305-L1319

I think the above code works.

@hm-0714 Could you post the detailed error log and the output of ./configure and make?

hm-0714 commented 3 years ago

thank you for your reply danpovey and csukuangfj , i just found out that when i configure , the problem arises. Here is the log: ./configure --mathlib=OPENBLAS --enable-tcmalloc Configuring KALDI to use OPENBLAS. Backing up kaldi.mk to kaldi.mk.bak ... Checking compiler g++ ... Checking OpenFst library in /data/nfs_rt21/kaldi-master/tools/openfst-1.6.7 ... Checking cub library in /data/nfs_rt21/kaldi-master/tools/cub-1.8.0 ... Performing OS specific configuration ... On Linux: Checking for linear algebra header files ... Your math library seems to be OpenBLAS from /data/nfs_rt21/kaldi-master/tools/OpenBLAS/install. Configuring appropriately. Configuring dynamically loaded OpenBlas since --static-math=no (the default) Successfully configured for Linux with OpenBLAS from /data/nfs_rt21/kaldi-master/tools/OpenBLAS/install Using CUDA toolkit /usr/local/cuda (nvcc compiler and runtime libraries) INFO: Configuring Kaldi not to link with Speex. Don't worry, it's only needed if you intend to use 'compress-uncompress-speex', which is very unlikely. Configuring tcmalloc since --enable-tcmalloc Successfully configured tcmalloc for Linux from /data/nfs_rt21/kaldi-master/tools/gperftools /opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld: cannot find -ltcmalloc_minimal collect2: error: ld returned 1 exit status make: [exp-test] Error 1 ./configure: line 239: ./exp-test: No such file or directory WARNING: expf() seems to be slower than exp() on your machine. This is a known bug in old versions of glibc. Please consider updating it. Kaldi will be configured to use exp() instead of expf() in *** base/kaldi-math.h Exp() routine for single-precision floats. Kaldi has been successfully configured. To compile:

make -j clean depend; make -j

where is the number of parallel builds you can afford to do. If unsure, use the smaller of the number of CPUs or the amount of RAM in GB divided by 2, to stay within safe limits. 'make -j' without the numeric value may not limit the number of parallel jobs at all, and overwhelm even a powerful workstation, since Kaldi build is highly parallelized.

csukuangfj commented 3 years ago

@hm-0714

Please have a try with #4626. It should fix your problem, I think.

kkm000 commented 3 years ago

@hm-0714, please try again and let us know if your issue is fixed. Backup and delete the file src/kaldi.mk, re-run ./configure to be sure.