Swoole make failed ubuntu16.04

故事扮演 提交于 2019-12-11 15:27:15

问题


I am trying to install SWOOLE on my Ubuntu-16.04

I tried this sudo pecl install swoole

But am getting a long list of errors(Skipped some lines)

In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable':
/tmp/pear/temp/swoole/php7_wrapper.h:238:5: error: unknown type name 'zend_string'
     zend_string *key = NULL;
     ^
/tmp/pear/temp/swoole/php7_wrapper.h:239:5: warning: passing argument 3 of 'zend_is_callable' from incompatible pointer type [enabled by default]
     int ret = zend_is_callable(cb, a, &key);
     ^
In file included from /usr/include/php5/main/php.h:39:0,
                 from /tmp/pear/temp/swoole/php_swoole.h:25,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/usr/include/php5/Zend/zend_API.h:301:20: note: expected 'char **' but argument is of type 'int **'
 ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC);
                    ^
In file included from /usr/include/php5/Zend/zend.h:252:0,
                 from /usr/include/php5/main/php.h:35,
                 from /tmp/pear/temp/swoole/php_swoole.h:25,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h:240:29: error: request for member 'val' in something not a structure or union
     char *tmp = estrndup(key->val, key->len);
                             ^
/usr/include/php5/Zend/zend_alloc.h:78:44: note: in definition of macro 'estrndup'
 #define estrndup(s, length)     _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
                                            ^
/tmp/pear/temp/swoole/php7_wrapper.h:240:39: error: request for member 'len' in something not a structure or union
     char *tmp = estrndup(key->val, key->len);
                                       ^
/usr/include/php5/Zend/zend_alloc.h:78:49: note: in definition of macro 'estrndup'
 #define estrndup(s, length)     _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
                                                 ^
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable_ex':
/tmp/pear/temp/swoole/php7_wrapper.h:248:5: error: unknown type name 'zend_string'
     zend_string *key = NULL;
     ^
/tmp/pear/temp/swoole/php7_wrapper.h:249:5: warning: passing argument 4 of 'zend_is_callable_ex' from incompatible pointer type [enabled by default]
     int ret = zend_is_callable_ex(callable, NULL, check_flags, &key, fcc, error);

make: *** [swoole.lo] Error 1
ERROR: `make' failed

I have also tried this

cd swoole-src
./configure
make

Which is also giving the similar errors.

How to solve this? thanks in advance!

EDIT : Added the first Generated ERRORS too

来源:https://stackoverflow.com/questions/52355058/swoole-make-failed-ubuntu16-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!