Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mdys opened this issue Nov 7, 2023 · 1 comment

Comments

@mdys
Copy link

mdys commented Nov 7, 2023

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
Copy link
Owner

hightman commented Nov 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants