Closed qingfenghuohu closed 7 years ago
什么linux环境?看起来是找不到PG的include路径,运行一下which pg_config,看一下是否安装了pg_config。
[root@LS-SPTZ-219-118 zhparser]# make gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I/apps/search/scws/include/scws/include/scws -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o zhparser.o zhparser.c zhparser.c: In function ‘init’: zhparser.c:106: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:118: error: too many arguments to function ‘DefineCustomStringVariable’ zhparser.c:130: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:143: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:155: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:167: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:179: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:191: error: too many arguments to function ‘DefineCustomBoolVariable’
[root@LS-SPTZ-219-118 zhparser]# which pg_config /usr/bin/pg_config
搞了2天 还是一直报错 求救 求指导 重新装了 centos 还是一样 一直这个错误 看了源码 发现 是有很多 DefineCustomBoolVariable func QQ:2066827
PG是什么版本,如何安装的?也可以试一下源码安装PG,把PATH指向安装后的$PREFIX/bin,然后编译zhparser
我刚才在一个新安装的CentOS 7试了一下,编译没有问题,PG版本CentOS默认源里的9.2。 我的PG是这样安装的: yum install postgresql-devel postgresql 你是否没有安装postgresql-devel?
CentOS release 6.5 (Final) Package postgresql-devel-8.4.20-7.el6.x86_64 already installed and latest version Package postgresql-8.4.20-7.el6.x86_64 already installed and latest version
8.4不支持extension功能,在这里下载 https://www.postgresql.org/download/linux/redhat/ ,注意PG9.1及以下版本官方已经不支持了。
我去~ 为了搜索刚开始接触 postgresql 谢谢
SCWS_HOME=/usr/local make
zhparser.c: In function ‘init’: zhparser.c:106: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:118: error: too many arguments to function ‘DefineCustomStringVariable’ zhparser.c:130: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:143: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:155: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:167: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:179: error: too many arguments to function ‘DefineCustomBoolVariable’ zhparser.c:191: error: too many arguments to function ‘DefineCustomBoolVariable’ make: *\ [zhparser.o] Error 1