我需要使用SRILM合并到Pocketsphinx的语言模型。当尝试在Ubuntu 18.04 Virtual Box (x86-64)上安装SRILM时,在make过程中总是出现错误2。
我已经删除了链接器的几个问题和其他我可以从日志中读到的错误,但现在我甚至不理解错误消息,因为它显然没有给我一个关于哪里出了问题的线索。我已经在google和stack overflow上搜索过帮助,但什么也没找到。
我已经使用以下命令启动了make:
sudo make NO_TCL=1 MACHINE_TYPE=i686-ubuntu World这是结果日志中运行不流畅的部分:
make[2]: Verzeichnis „/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2/lm/src“ wird betreten
/usr/bin/g++ -march=athlon64 -m64 -Wall -Wno-unused-variable -Wno-uninitialized -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I. -I../../include -u matherr -L../../lib/i686-ubuntu -g -O3 -o ../bin/i686-ubuntu/ngram ../obj/i686-ubuntu/ngram.o ../obj/i686-ubuntu/liboolm.a ../../lib/i686-ubuntu/libflm.a ../../lib/i686-ubuntu/libdstruct.a ../../lib/i686-ubuntu/libmisc.a ../../lib/i686-ubuntu/libz.a -lm -L/usr/local/lib -liconv 2>&1 | c++filt
../obj/i686-ubuntu/liboolm.a(Vocab.o): In Funktion »Vocab::compare(unsigned int const*, unsigned int const*)«:
/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2/lm/src/../../include/TLSWrapper.h:61: Warnung: undefinierter Verweis auf »pthread_getspecific« 然后有几个关于"pthread“的警告。
最后make的结尾是:
/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2/misc/src/tls.cc:15: Warnung: undefinierter Verweis auf »pthread_key_create«
collect2: error: ld returned 1 exit status
test -f ../bin/i686-ubuntu/ngram
/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2/common/Makefile.common.targets:117: recipe for target '../bin/i686-ubuntu/ngram' failed
make[2]: *** [../bin/i686-ubuntu/ngram] Error 1
make[2]: Verzeichnis „/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2/lm/src“ wird verlassen
Makefile:109: recipe for target 'release-programs' failed
make[1]: *** [release-programs] Error 1
make[1]: Verzeichnis „/home/christian/Schreibtisch/SPHINX/Sprachmodelle/SRILM/ModelMIxSRILM/srilm-1.7.2“ wird verlassen
Makefile:57: recipe for target 'World' failed
make: *** [World] Error 2 我还能尝试什么呢?
发布于 2019-05-02 19:57:51
我已经找到了一种让它工作的方法:我已经重新安装了所有依赖项,并且与它们各自的构建说明中的建议相反,所有安装目录都是默认的(运行"./configure“,没有任何选项,但遇到了旧的libinconv问题。可以通过发出以下命令来解决此问题:
make NO_LIBV=1 MACHINE_TYPE=i686-ubuntu并省略
World在make-command中。这样,所有命令都会安装到SRILM/bin/i686-ubuntu - Directory中。然后,我将命令添加到system-path,现在它可以工作了。会对如何使用libiconv和World运行它感兴趣。
https://stackoverflow.com/questions/55918922
复制相似问题