hightman / scws

开源免费的简易中文分词系统,PHP分词的上乘之选!
http://www.xunsearch.com/scws/
Other
1.66k stars 348 forks source link

php-8.1.7编译php扩展时在make时出错 #73

Closed greenHills closed 2 years ago

greenHills commented 2 years ago

系统 centos7 /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:133:46: error: too few arguments to function ‘zend_parse_parameters’ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ts, ##VA_ARGS) == FAILURE) { \ ^ /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:648:2: note: in expansion of macro ‘SCWS_FETCH_PARAMETERS’ SCWS_FETCH_PARAMETERS("s", &attr, &attr_len); ^ In file included from /apps/php-8.1.7/include/php/main/php.h:35:0, from /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:25: /apps/php-8.1.7/include/php/Zend/zend_API.h:335:22: note: declared here ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); ^ /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:137:46: error: expected ‘)’ before ‘TSRMLS_CC’ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r" ts, &tmp, ##VA_ARGS) == FAILURE) { \ ^ /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:648:2: note: in expansion of macro ‘SCWS_FETCH_PARAMETERS’ SCWS_FETCH_PARAMETERS("s", &attr, &attr_len); ^ /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:137:46: error: too few arguments to function ‘zend_parse_parameters’ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r" ts, &tmp, ##__VA_ARGS__) == FAILURE) { \ ^ /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:648:2: note: in expansion of macro ‘SCWS_FETCH_PARAMETERS’ SCWS_FETCH_PARAMETERS("s", &attr, &attr_len); ^ In file included from /apps/php-8.1.7/include/php/main/php.h:35:0, from /data/sinoicmsdata/source/scws-1.2.3/phpext/php_scws.c:25: /apps/php-8.1.7/include/php/Zend/zend_API.h:335:22: note: declared here ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); ^ make: *** [php_scws.lo] Error 1

greenHills commented 2 years ago

楼上错误scws-1.2.3。重新下载master分支后在php8下编译成功