编译phonetisaurus时configure找不到openfst的问题解决

Phonetisaurus

Phonetisaurus是用于做g2p(grapheme to phoneme)的工具,它的源码地址在这里

编译

它的编译依赖openfst,在编译openfst时,如果不指定构建路径在系统路径下,生成的include和lib可能就无法被直接引用到。所以在编译Phonetisaurus时,特别是在configure步骤,会提示依赖的openfst找不到。

checking for openfst libraries... 
configure: error: Can't find OpenFST or one or more of its extensions. 
Use --with-openfst-includes and --with-openfst-libs to specify where you have installed OpenFst. 
OpenFst should have been configured with the following flags: 
--enable-static --enable-shared --enable-far --enable-ngram-fsts

起始这里的报错信息说的已经很明显了,需要注意两点

  1. 在编译openfst时,一定要在configure时加上==–enable-static --enable-shared --enable-far --enable-ngram-fsts==这些参数
  2. 如果openfst不是build在系统路径下,那么在编译Phonetisaurus时,通过 --with-openfst-includes和 --with-openfst-libs可以显示地指定openfst的头文件和库文件的位置,从而在configure可以找到他们。
    比如,openfst构建位置在/home/xxx/openfst/build下,那么需要指定 --with-openfst-includes=/home/xxx/openfst/build/include --with-openfst-libs=/home/xxx/openfst/build/lib即可。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值