hightman/scws

php7.3扩展编译出错

Opened this issue · 0 comments

系统:FreeBSD 10.1

`root@xxxx:/usr/src/scws-1.2.1/phpext # make
/bin/sh /usr/src/scws-1.2.1/phpext/libtool --mode=compile cc -I. -I/usr/src/scws-1.2.1/phpext -DPHP_ATOM_INC -I /usr/src/scws-1.2.1/phpext/include -I/usr/src/scws-1.2.1/phpext/main -I/usr/src/scws-1.2.1/phpext -I/usr/local/i nclude/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/loca l/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -c /usr/src/scws-1.2.1/phpext/php_scws.c -o php_scws.lo
cc -I. -I/usr/src/scws-1.2.1/phpext -DPHP_ATOM_INC -I/usr/src/scws-1.2.1/phpext/include -I/usr/src/scws-1.2.1/p hpext/main -I/usr/src/scws-1.2.1/phpext -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/incl ude/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I /usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -c /usr/src/scws-1.2.1/phpext/php_scws.c -fPIC -DPIC -o .libs/ph p_scws.o
/usr/src/scws-1.2.1/phpext/php_scws.c:145:6: error: use of undeclared identifier 'rsrc'
if (rsrc->ptr)
^
/usr/src/scws-1.2.1/phpext/php_scws.c:147:45: error: use of undeclared identifier 'rsrc'
struct php_scws *ps = (struct php_scws *) rsrc->ptr;
^
/usr/src/scws-1.2.1/phpext/php_scws.c:150:3: warning: implicit declaration of function 'FREE_ZVAL' is invalid in
C99 [-Wimplicit-function-declaration]
DELREF_SCWS(ps->zt);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:54:4: note: expanded from macro 'DELREF_SCWS'
FREE_ZVAL(x);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:152:3: error: use of undeclared identifier 'rsrc'
rsrc->ptr = NULL;
^
/usr/src/scws-1.2.1/phpext/php_scws.c:243:16: warning: implicit declaration of function 'ZEND_REGISTER_RESOURCE'
is invalid in C99 [-Wimplicit-function-declaration]
ps->rsrc_id = ZEND_REGISTER_RESOURCE(NULL, ps, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:264:2: warning: implicit declaration of function 'RETVAL_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
RETVAL_RESOURCE(ps->rsrc_id);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:278:48: warning: incompatible integer to pointer conversion passing 'int'
to parameter of type 'zend_resource *' (aka 'struct _zend_resource *') [-Wint-conversion]
add_property_resource(return_value, "handle", ps->rsrc_id);
^~~~~~~~~~~
/usr/local/include/php/Zend/zend_API.h:461:104: note: expanded from macro 'add_property_resource'
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key), __r)
^~~
/usr/local/include/php/Zend/zend_API.h:451:98: note: passing argument to parameter 'r' here
ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:288:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:298:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:298:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:300:19: warning: incompatible integer to pointer conversion passing 'int'
to parameter of type 'zend_resource *' (aka 'struct _zend_resource *') [-Wint-conversion]
zend_list_delete(ps->rsrc_id);
^~~~~~~~~~~
/usr/local/include/php/Zend/zend_list.h:57:60: note: passing argument to parameter 'res' here
ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:313:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:325:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:325:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:345:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:357:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:357:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:396:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:408:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:408:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:446:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:458:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:458:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:495:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:507:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:507:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:522:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:534:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:534:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:552:53: error: too many arguments to function call, expected 2, have 4
if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void *)&tmp) == FAILURE) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_find' declared here
ZEND_API zval
ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

define ZEND_API attribute ((visibility("default")))

              ^

/usr/src/scws-1.2.1/phpext/php_scws.c:564:2: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
invalid in C99 [-Wimplicit-function-declaration]
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
/usr/src/scws-1.2.1/phpext/php_scws.c:564:26: error: expected expression
ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/src/scws-1.2.1/phpext
`