在swoole4.4.7版本下,如何安装ext-async扩展?

环境声明:

swoole

Swoole => enabled
Author => Swoole Team <team@swoole.com>
Version => 4.4.7-alpha
PHP Version => 7.3.10

然后我按照官方文档上的说明安装ext-async扩展,但是他总是说我函数错误。
操作如下:

git clone https://github.com/swoole/ext-async.git
cd ext-async
./configure --with-php-config=/home/phps/php/bin/php-config
make

然后就出错了
错误如下:

/tmp/ext-async/swoole_http_client.cc: In function ‘void zim_swoole_http_client_push(zend_execute_data*, zval*)’:
/tmp/ext-async/swoole_http_client.cc:2243:77: error: ‘swWebSocket_set_flags’ was not declared in this scope
     uint8_t flags = swWebSocket_set_flags(fin, http->websocket_mask, 0, 0, 0);
                                                                             ^
/tmp/ext-async/swoole_http_client.cc:2244:81: error: too few arguments to function ‘int php_swoole_websocket_frame_pack(swString*, zval*, zend_bool, zend_bool, zend_bool)’
     if (php_swoole_websocket_frame_pack(http_client_buffer, zdata, opcode, flags) < 0)
                                                                                 ^
In file included from /tmp/ext-async/php_swoole_async.h:26:0,
                 from /tmp/ext-async/swoole_http_client.cc:18:
/home/phps/php/include/php/ext/swoole/php_swoole.h:373:5: note: declared here
 int php_swoole_websocket_frame_pack(swString *buffer, zval *zdata, zend_bool opcode, zend_bool fin, zend_bool mask);
阅读 7.2k
2 个回答

升级swoole到正式版本,再安装async,版本对齐。试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏