0

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

Sumithran
  • 6,217
  • 4
  • 40
  • 54
  • 2
    When looking at compiler errors it's always more important to look at the _first_ errors generated, not the last errors. The first errors are always real and useful, but the more errors are generated the more likely it is that they're just cascading failures due to previous problems. – MadScientist Sep 16 '18 at 17:48
  • @MadScientist thanks for your suggestion, question updated. – Sumithran Sep 17 '18 at 12:44

0 Answers0