我已经在 Ubuntu 中安装了 Open Fst,并且运行良好。现在我正在尝试安装 Open GRM thrax。我尝试安装 2 个不同版本的 thrax。
Thrax 版本 1.1.0:
thraxOpenGrm/thrax-1.1.0$ ./configure
下面是我得到的错误。
checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... yes
checking fst/fst.h presence... no
configure: WARNING: fst/fst.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/fst.h: proceeding with the compiler's result
checking for fst/fst.h... yes
checking fst/extensions/far/far.h usability... yes
checking fst/extensions/far/far.h presence... no
configure: WARNING: fst/extensions/far/far.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/extensions/far/far.h: proceeding with the compiler's result
checking for fst/extensions/far/far.h... yes
checking fst/extensions/pdt/pdt.h usability... no
checking fst/extensions/pdt/pdt.h presence... no
checking for fst/extensions/pdt/pdt.h... no
configure: error: fst/extensions/pdt/pdt.h header not found
Thrax 版本 0.1.0:
thraxOpenGrm/thrax-0.1.0$ ./configure
下面是我得到的错误。
checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... no
checking fst/fst.h presence... no
checking for fst/fst.h... no
configure: error: fst/fst.h header not found
它会针对不同的 thrax 版本抛出不同的错误。我在这个论坛上阅读了一个解决方案。
http://www.openfst.org/twiki/bin/view/Forum/GrmThraxForum
它说 openfst 必须使用 ./configure --enable-far=true
来“构建”。我卸载了 openfst 并使用 ./configure --enable-far=true
和 ./configure --enable-far
安装了它。错误仍然存在。
最佳答案
在安装 openfst 期间,您必须键入:
./configure --enable-far=true --enable-pdt=true --enable-mpdt=true
然后您应该安装 thrax 并在其上输入终端:
export LD_LIBRARY_PATH=/usr/local/lib
为我工作的 openfst-1.5.4 和 thrax-1.2.2。
当我得到:
checking fst/extensions/pdt/pdt.h usability... no
我补充说:
--enable-pdt=true
to ./configure
for openfst 我对 mpdt 错误做了同样的事情。如果出现其他错误,您可以尝试执行相同的操作。
关于c++ - 安装 Open GRM thrax 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29253913/