ext-async
ext-async copied to clipboard
swoole_async_client.cc:413:44: error: invalid conversion from ‘int’ to ‘swSocket_type’ [-fpermissive]
Hello! I can’t install the extension. Help me find and solve the problem.
PHP 7.4.5 (cli) (built: Apr 19 2020 07:36:30) I also tried under PHP-7.3, PHP-7.2
php --ri swoole
$ php --ri swoole
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.5.0RC1
Built => Apr 15 2020 15:35:26
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
make -j 4
$ make -j 4
/bin/bash /home/user/ext-async/libtool --mode=compile g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_async.cc -o swoole_async.lo
/bin/bash /home/user/ext-async/libtool --mode=compile g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_async_client.cc -o swoole_async_client.lo
/bin/bash /home/user/ext-async/libtool --mode=compile g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_http_client.cc -o swoole_http_client.lo
g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_async_client.cc -fPIC -DPIC -o .libs/swoole_async_client.o
g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_http_client.cc -fPIC -DPIC -o .libs/swoole_http_client.o
g++ -I. -I/home/user/ext-async -DPHP_ATOM_INC -I/home/user/ext-async/include -I/home/user/ext-async/main -I/home/user/ext-async -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/home/user/ext-async -I/home/user/ext-async/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/user/ext-async/swoole_async.cc -fPIC -DPIC -o .libs/swoole_async.o
/home/user/ext-async/swoole_async_client.cc: In function ‘swClient* php_swoole_async_client_new(zval*, char*, int, int)’:
/home/user/ext-async/swoole_async_client.cc:413:44: error: invalid conversion from ‘int’ to ‘swSocket_type’ [-fpermissive]
if (swClient_create(cli, client_type, 1) < 0)
^
In file included from /home/user/ext-async/php_swoole_async.h:28:0,
from /home/user/ext-async/swoole_async_client.cc:17:
/usr/include/php/20190902/ext/swoole/include/client.h:153:5: note: initializing argument 2 of ‘int swClient_create(swClient*, swSocket_type, int)’
int swClient_create(swClient *cli, enum swSocket_type type, int async);
^~~~~~~~~~~~~~~
Makefile:194: recipe for target 'swoole_async_client.lo' failed
make: *** [swoole_async_client.lo] Error 1
make: *** Waiting for unfinished jobs....
/home/user/ext-async/swoole_async.cc: In function ‘void zif_swoole_async_set(zend_execute_data*, zval*)’:
/home/user/ext-async/swoole_async.cc:1106:21: error: ‘struct swGlobal_t’ has no member named ‘reuse_port’
SwooleG.reuse_port = 1;
^~~~~~~~~~
/home/user/ext-async/swoole_async.cc: In function ‘int swDNSResolver_request(char*, void (*)(char*, swDNSResolver_result*, void*), void*)’:
/home/user/ext-async/swoole_async.cc:1467:48: error: ‘SW_FD_DNS_RESOLVER’ was not declared in this scope
if (!swReactor_isset_handler(sw_reactor(), SW_FD_DNS_RESOLVER))
^~~~~~~~~~~~~~~~~~
/home/user/ext-async/swoole_async.cc:1467:48: note: suggested alternative: ‘SW_FD_DGRAM_SERVER’
if (!swReactor_isset_handler(sw_reactor(), SW_FD_DNS_RESOLVER))
^~~~~~~~~~~~~~~~~~
SW_FD_DGRAM_SERVER
/home/user/ext-async/swoole_async.cc:1474:70: error: ‘SW_FD_DNS_RESOLVER’ was not declared in this scope
if (sw_reactor()->add(sw_reactor(), resolver_socket->socket, SW_FD_DNS_RESOLVER) < 0)
^~~~~~~~~~~~~~~~~~
/home/user/ext-async/swoole_async.cc:1474:70: note: suggested alternative: ‘SW_FD_DGRAM_SERVER’
if (sw_reactor()->add(sw_reactor(), resolver_socket->socket, SW_FD_DNS_RESOLVER) < 0)
^~~~~~~~~~~~~~~~~~
SW_FD_DGRAM_SERVER
/home/user/ext-async/swoole_http_client.cc: In function ‘void zim_swoole_http_client_close(zend_execute_data*, zval*)’:
/home/user/ext-async/swoole_http_client.cc:1749:23: error: ‘swConnection_error’ was not declared in this scope
if (!cli->keep || swConnection_error(SwooleG.error) == SW_CLOSE)
^~~~~~~~~~~~~~~~~~
/home/user/ext-async/swoole_http_client.cc:1749:23: note: suggested alternative: ‘swConnection’
if (!cli->keep || swConnection_error(SwooleG.error) == SW_CLOSE)
^~~~~~~~~~~~~~~~~~
swConnection
Makefile:192: recipe for target 'swoole_async.lo' failed
make: *** [swoole_async.lo] Error 1
Makefile:200: recipe for target 'swoole_http_client.lo' failed
make: *** [swoole_http_client.lo] Error 1