hightman/scws

不支持php7.1.8的扩展模块

Closed this issue · 6 comments

[root@sdkback phpext]# php -m|grep scws
PHP Warning:  PHP Startup: scws: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20160303
These options need to match
 in Unknown on line 0

phpinfo()页面不能显示scws扩展

7.0.26 碰到同样问题。。

OK 稍后测试一下,我7.1在mac上是可以的

我试了可以啊,你上面的错误提示是scws.so的编译版本不对,注意用最新的 phpize + php-config 重新编译

多谢
我先试了php 7.1.20 使用php -m|grep scws 没有任何记录,也没有报错

然后安装php 7.0.26,碰到了楼主的问题。现在正在看phpize 和php-config的问题,奇怪的是我很确定这两个都是7.0.26的版本。

我的php版本是 PHP 7.1.13 (cli) (built: Feb 24 2018 20:25:19) ( NTS )
在安装php扩展的时候make出错, 具体错误如下:

[root@localhost phpext]# make /bin/sh /data/shell/tools/scws-1.2.1/phpext/libtool --mode=compile cc -I. -I/data/shell/tools/scws-1.2.1/phpext -DPHP_ATOM_INC -I/data/shell/tools/scws-1.2.1/phpext/include -I/data/shell/tools/scws-1.2.1/phpext/main -I/data/shell/tools/scws-1.2.1/phpext -I/data/soft/php/include/php -I/data/soft/php/include/php/main -I/data/soft/php/include/php/TSRM -I/data/soft/php/include/php/Zend -I/data/soft/php/include/php/ext -I/data/soft/php/include/php/ext/date/lib -I/usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -c /data/shell/tools/scws-1.2.1/phpext/php_scws.c -o php_scws.lo mkdir .libs cc -I. -I/data/shell/tools/scws-1.2.1/phpext -DPHP_ATOM_INC -I/data/shell/tools/scws-1.2.1/phpext/include -I/data/shell/tools/scws-1.2.1/phpext/main -I/data/shell/tools/scws-1.2.1/phpext -I/data/soft/php/include/php -I/data/soft/php/include/php/main -I/data/soft/php/include/php/TSRM -I/data/soft/php/include/php/Zend -I/data/soft/php/include/php/ext -I/data/soft/php/include/php/ext/date/lib -I/usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -c /data/shell/tools/scws-1.2.1/phpext/php_scws.c -fPIC -DPIC -o .libs/php_scws.o /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘php_scws_dtor’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:145:6: error: ‘rsrc’ undeclared (first use in this function) if (rsrc->ptr) ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:145:6: note: each undeclared identifier is reported only once for each function it appears in /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_new’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:278:2: warning: passing argument 4 of ‘add_property_resource_ex’ makes pointer from integer without a cast [enabled by default] add_property_resource(return_value, "handle", ps->rsrc_id); ^ In file included from /data/soft/php/include/php/main/php.h:39:0, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_API.h:458:14: note: expected ‘struct zend_resource *’ but argument is of type int’ ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_close’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:288:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:288:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:288:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:298:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:300:2: warning: passing argument 1 of ‘zend_list_delete’ makes pointer from integer without a cast [enabled by default] zend_list_delete(ps->rsrc_id); ^ In file included from /data/soft/php/include/php/Zend/zend_API.h:28:0, from /data/soft/php/include/php/main/php.h:39, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_list.h:59:14: note: expected ‘struct zend_resource *’ but argument is of type int’ ZEND_API int zend_list_delete(zend_resource *res); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_charset’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:313:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:313:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:313:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:325:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_add_dict’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:345:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:345:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:345:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:357:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_dict’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:396:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:396:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:396:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:408:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_rule’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:446:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:446:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:446:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:458:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_ignore’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:495:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:495:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:495:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:507:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_multi’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:522:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:522:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:522:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:534:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_set_duality’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:552:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:552:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:552:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:564:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_send_text’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:579:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:579:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:579:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:591:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:593:2: warning: passing argument 1 of ‘zval_get_type’ from incompatible pointer type [enabled by default] convert_to_string_ex(&text); ^ In file included from /data/soft/php/include/php/Zend/zend.h:31:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_types.h:331:38: note: expected ‘const struct zval *’ but argument is of type ‘struct zval **’ static zend_always_inline zend_uchar zval_get_type(const zval* pz) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:593:2: warning: passing argument 1 of ‘zval_get_type’ from incompatible pointer type [enabled by default] convert_to_string_ex(&text); ^ In file included from /data/soft/php/include/php/Zend/zend.h:31:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_types.h:331:38: note: expected ‘const struct zval *’ but argument is of type ‘struct zval **’ static zend_always_inline zend_uchar zval_get_type(const zval* pz) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:593:2: warning: passing argument 1 of ‘_convert_to_string’ from incompatible pointer type [enabled by default] convert_to_string_ex(&text); ^ In file included from /data/soft/php/include/php/Zend/zend.h:324:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_operators.h:253:29: note: expected ‘struct zval *’ but argument is of type ‘struct zval **’ ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op ZEND_FILE_LINE_DC); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_get_result’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:615:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:615:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:615:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:625:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:635:68: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4 add_assoc_stringl(row, "word", ps->s->txt + cur->off, cur->len, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:635:3: error: ‘add_assoc_stringl’ undeclared (first use in this function) add_assoc_stringl(row, "word", ps->s->txt + cur->off, cur->len, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:639:78: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4 add_assoc_stringl(row, "attr", cur->attr, (cur->attr[1] == '\0' ? 1 : 2), 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_get_tops’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:661:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:661:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:661:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:673:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:684:45: error: macro "add_assoc_string" passed 4 arguments, but takes just 3 add_assoc_string(row, "word", cur->word, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:684:3: error: ‘add_assoc_string’ undeclared (first use in this function) add_assoc_string(row, "word", cur->word, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:687:78: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4 add_assoc_stringl(row, "attr", cur->attr, (cur->attr[1] == '\0' ? 1 : 2), 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:687:3: error: ‘add_assoc_stringl’ undeclared (first use in this function) add_assoc_stringl(row, "attr", cur->attr, (cur->attr[1] == '\0' ? 1 : 2), 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_has_word’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:706:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:706:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:706:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:718:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_get_words’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:739:3: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: expected ‘struct zend_string *’ but argument is of type ‘char *’ ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:739:3: error: too many arguments to function ‘zend_hash_find’ if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ In file included from /data/soft/php/include/php/Zend/zend.h:36:0, from /data/soft/php/include/php/main/php.h:35, from /data/shell/tools/scws-1.2.1/phpext/php_scws.c:25: /data/soft/php/include/php/Zend/zend_hash.h:161:30: note: declared here ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:739:86: warning: comparison between pointer and integer [enabled by default] if (zend_hash_find(Z_OBJPROP_P(object), "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:751:26: error: expected expression before ‘struct’ ZEND_FETCH_RESOURCE(ps, struct php_scws *, tmp, -1, PHP_SCWS_OBJECT_TAG, le_scws); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:759:45: error: macro "add_assoc_string" passed 4 arguments, but takes just 3 add_assoc_string(row, "word", cur->word, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:759:3: error: ‘add_assoc_string’ undeclared (first use in this function) add_assoc_string(row, "word", cur->word, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:762:78: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4 add_assoc_stringl(row, "attr", cur->attr, (cur->attr[1] == '\0' ? 1 : 2), 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:762:3: error: ‘add_assoc_stringl’ undeclared (first use in this function) add_assoc_stringl(row, "attr", cur->attr, (cur->attr[1] == '\0' ? 1 : 2), 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c: In function ‘zif_scws_version’: /data/shell/tools/scws-1.2.1/phpext/php_scws.c:776:22: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 RETURN_STRING(buf, 1); ^ /data/shell/tools/scws-1.2.1/phpext/php_scws.c:776:2: error: ‘RETURN_STRING’ undeclared (first use in this function) RETURN_STRING(buf, 1); ^ make: *** [php_scws.lo] Error 1 [root@localhost phpext]#

kency commented

1.2.1编译不通过////1.2.3编译通过了
PHP 7.1.16 (cli) (built: Apr 12 2018 03:25:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.16, Copyright (c) 1999-2018, by Zend Technologies