Sphinx/Coreseek 4.1 执行 buildconf.sh 报错,无法生成configure文件【转】

之前在安装 coorseek 的时候,遇到了一些错误,在官网根本看不到解决方案,最后 google 在一个大牛博客的评论区找到了解决方法,顿时把膝盖献上去了~~

整理到这里是为了方便一些人找到,长城防火墙毕竟让 google 不是那么友好了 %>_<% 不过大牛的博客还是上得了的:传送门

错误现象:执行 buildconf.sh 报错,无法生成configure文件

提示的主要错误为:

libstemmer_c/mkinc.mak:10: warning: source file 'runtime/utilities.c' is in a subdirectory,
libstemmer_c/mkinc.mak:10: but option 'subdir-objects' is disabled
libstemmer_c/Makefile.am:3: 'libstemmer_c/mkinc.mak' included from here
libstemmer_c/mkinc.mak:10: warning: source file 'libstemmer/libstemmer.c' is in a subdirectory,
libstemmer_c/mkinc.mak:10: but option 'subdir-objects' is disabled
libstemmer_c/Makefile.am:3: 'libstemmer_c/mkinc.mak' included from here
/usr/local/share/automake-1.14/am/library.am: warning: 'libstemmer.a': linking libraries using a non-POSIX
/usr/local/share/automake-1.14/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libstemmer_c/Makefile.am:2: while processing library 'libstemmer.a'
/usr/local/share/automake-1.14/am/library.am: warning: 'libsphinx.a': linking libraries using a non-POSIX
/usr/local/share/automake-1.14/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/Makefile.am:14: while processing library 'libsphinx.a'

看起来非常多其实就是两个:1.but option 'subdir-objects' is disabled    2. archiver requires 'AM_PROG_AR' in 'configure.ac'

解决方案:

1. 在 csft-4.1/buildconf.sh 文件中,查找

&& aclocal \

后加上

&& automake --add-missing \

2. 在 csft-4.1/configure.ac 文件中,查找:

AM_INIT_AUTOMAKE([-Wall -Werror foreign])

改为:

AM_INIT_AUTOMAKE([-Wall foreign])

查找:

AC_PROG_RANLIB

后面加上

AM_PROG_AR

3. 最后,在 csft-4.1/src/sphinxexpr.cpp 文件中, 替换所有:

T val = ExprEval ( this->m_pArg, tMatch );

成为:

T val = this->ExprEval ( this->m_pArg, tMatch );

修改完后再按说明安装

 

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注