解决 coreseek 因 gcc 版本大于 4.7导致安装失败

本文解决在安装Coreseek过程中遇到的特定GCC版本导致的编译错误。通过应用补丁并调整编译配置,最终成功安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在安装 coreseek 的过程中,抛出了以下错误

sphinxexpr.cpp:1013:43: error: ‘ExprEval’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
sphinxexpr.cpp:1013:43: note: declarations in dependent base ‘Expr_ArgVsSet_c<int>’ are not found by unqualified lookup
sphinxexpr.cpp:1013:43: note: use ‘this->ExprEval’ instead
make[2]: *** [sphinxexpr.o] Error 1
make[2]: Leaving directory `/core/coreseek-3.2.14/csft-3.2.14/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/core/coreseek-3.2.14/csft-3.2.14/src'
make: *** [all-recursive] Error 1

这个问题是因为 gcc 版本高于 4.7 造成的,具体可以点击这里查看 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667378

我们可以通过下载补丁,来解决这个问题

wget https://vifix.cn/blog/wp-content/uploads/2012/04/sphinxexpr.cpp_.patch_.zip

unzip sphinxexpr.cpp_.patch_.zip

patch -p1 < sphinxexpr.cpp-csft-3.2.13.patch

然后输入我 coreseek 源码的路径

/core/coreseek-3.2.14/csft-3.2.14/src/sphinxexpr.cpp

注意:我这里是 3.2.1 ,也有 4.1 的补丁,替换下路径就对了

然后我们重新编译


./configure --prefix=/usr/local/coreseek --without-python --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --without-mysql

make && make install

结果如丝滑般润爽

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值