hightman / xunsearch

免费开源的中文搜索引擎,采用 C/C++ 编写 (基于 xapian 和 scws),提供 PHP 的开发接口和丰富文档
http://www.xunsearch.com
Other
1.64k stars 391 forks source link

求助。php8.2 下安装出错,php_scws.c:221:6: error: ‘rsrc’ undeclared (first use in this function) #146

Open mdys opened 10 months ago

mdys commented 10 months ago

centos 7.9 php8.2 gcc-8.3 执行编译出现如下错误,求解。 `make /bin/sh /usr/local/src/scws-1.2.3/phpext/libtool --mode=compile cc -I. -I/usr/local/src/scws-1.2.3/phpext -I/usr/local/src/scws-1.2.3/phpext/include -I/usr/local/src/scws-1.2.3/phpext/main -I/usr/local/src/scws-1.2.3/phpext -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/scws/include/scws -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /usr/local/src/scws-1.2.3/phpext/php_scws.c -o php_scws.lo -MMD -MF php_scws.dep -MT php_scws.lo libtool: compile: cc -I. -I/usr/local/src/scws-1.2.3/phpext -I/usr/local/src/scws-1.2.3/phpext/include -I/usr/local/src/scws-1.2.3/phpext/main -I/usr/local/src/scws-1.2.3/phpext -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/scws/include/scws -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /usr/local/src/scws-1.2.3/phpext/php_scws.c -MMD -MF php_scws.dep -MT php_scws.lo -fPIC -DPIC -o .libs/php_scws.o /usr/local/src/scws-1.2.3/phpext/php_scws.c: In function ‘php_scws_dtor’: /usr/local/src/scws-1.2.3/phpext/php_scws.c:221:6: error: ‘rsrc’ undeclared (first use in this function) if (rsrc->ptr) { ^~~~ /usr/local/src/scws-1.2.3/phpext/php_scws.c:221:6: note: each undeclared identifier is reported only once for each function it appears in /usr/local/src/scws-1.2.3/phpext/php_scws.c: In function ‘zm_startup_scws’: /usr/local/src/scws-1.2.3/phpext/php_scws.c:270:71: error: expected ‘)’ before ‘TSRMLS_CC’ scws_class_entry_ptr = zend_register_internal_class(&scws_class_entry TSRMLS_CC); ^~~~~~ ) /usr/local/src/scws-1.2.3/phpext/php_scws.c: In function ‘_php_create_scws’: /usr/local/src/scws-1.2.3/phpext/php_scws.c:308:14: warning: type of ‘TSRMLS_D’ defaults to ‘int’ [-Wimplicit-int] static void _php_create_scws(TSRMLS_D) ^~~~ /usr/local/src/scws-1.2.3/phpext/php_scws.c: In function ‘zif_scws_open’: /usr/local/src/scws-1.2.3/phpext/php_scws.c:339:43: error: ‘TSRMLS_C’ undeclared (first use in this function); did you mean ‘TSRM_H’? ps = (struct php_scws )_php_create_scws(TSRMLS_C); ^~~~ TSRM_H /usr/local/src/scws-1.2.3/phpext/php_scws.c:341:25: error: expected ‘)’ before ‘TSRMLS_CC’ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't create new scws handler");

`

hightman commented 10 months ago

用github上最新的scws应该可以的在 2023年11月8日,03:21,mdys @.***> 写道: centos 7.9

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>