Coreseek在Ubuntu系统上编译不通过的问题(解决方案)


coreseek安装需要预装的软件:apt-get install make gcc g++ automake libtool mysql-client libmysqlclient15-dev   libxml2-dev libexpat1-dev

今天在archlinux在安装coreseek 4.1-beta时碰到的问题,在g++编译sphinxexpr.cpp时:


g++ -DHAVE_CONFIG_H -I. -I../config  -DSYSCONFDIR="\"/opt/coreseek-3.2.14/etc\"" -DDATADIR="\"/opt/coreseek-3.2.14/var/data\"" -I/usr/local/include -pthread -I/usr/include/mysql -fPIC -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer  -g  -I/opt/mmseg-3.2.14/include/mmseg/   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxexpr.o -MD -MP -MF .deps/sphinxexpr.Tpo -c -o sphinxexpr.o sphinxexpr.cpp
sphinxexpr.cpp: In constructor ‘ExprParser_t::ExprParser_t(CSphSchema*, ISphExprHook*)’:
sphinxexpr.cpp:742:17: warning: ‘ExprParser_t::m_pExtra’ will be initialized after [-Wreorder]
sphinxexpr.cpp:711:19: warning:   ‘ISphExprHook* ExprParser_t::m_pHook’ [-Wreorder]
sphinxexpr.cpp:698:2: warning:   when initialized here [-Wreorder]
..........................................................

sphinxexpr.cpp:1746: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:1746:43: note: declarations in dependent base ‘Expr_ArgVsSet_c<int>’ are not found by unqualified lookup
sphinxexpr.cpp:1746:43: note: use ‘this->ExprEval’ instead
make[2]: *** [sphinxexpr.o] Error 1
make[2]: Leaving directory `/home/mac/Downloads/coreseek-4.1-beta/csft-4.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/mac/Downloads/coreseek-4.1-beta/csft-4.1/src'
make: *** [all-recursive] Error 1

在替换为coreseek 3.2.13后仍然发生了类似问题,但是在自己的Centos上类似的编译却没有碰到这个问题,于是觉得很奇怪。

搜索之后,仅找到一个有用的链接:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667378,是关于coreseek上游的sphinx的同样问题的,看了一下了解似乎是gcc 4.7的C++作用域的问题(?),上面的debian bugs里面提供了一个patch,看了下patch的内容,也对自己本地的coreseek的制作了同样的补丁,压缩包发布如下,使用时注意版本:

sphinxexpr.cpp.patch.zip



root@china:/home/china/Downloads/coreseek-4.1-beta/csft-4.1# patch -p1 < /home/china/Downloads/sphinxexpr.cpp-csft-4.1-beta.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /home/china/Downloads/coreseek-4.1-beta/csft-4.1/src/sphinxexpr.cpp    2011-10-07 20:08:58.000000000 +0800
|+++ sphinxexpr.cpp    2012-04-16 13:47:35.237820912 +0800 QQ:327168521
--------------------------
File to patch:

在file to patch:后输入sphinxexpr.cpp文件的位置  我当时输入的是  /home/china/Downloads/coreseek-4.1-beta/csft-4.1/src/sphinxexpr.cpp


补丁打后就可以直接编译通过了



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值