Swoole-src: php compile error when include swoole as static extention

Created on 23 Jun 2018  ·  6Comments  ·  Source: swoole/swoole-src

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

try build a PECL extension statically into your PHP binary.

  1. What did you expect to see?

success php compile

  1. What did you see instead?

Error , only when i add --with-swoole=/root/php/ext/swoole/
if i remove it will compile successfuly
also i try compile swoole alone, but its fail

  1. What version of Swoole are you using (php --ri swoole)?

lastest now , updated 5 hours ago , from github
also i try php.net version

  1. What is your machine environment used (including version of kernel & php & gcc) ?

centos 6
uname -m = i686
uname -r = 2.6.32-042stab128.2

gcc 4.4

php 7.2.7
php 7.3 beta2

  1. If you are using ssl, what is your openssl version?

--- i dont use SSL
openssl-devel-1.0.1e-57.el6.i686
openssl-1.0.1e-57.el6.i686

question timeout (7 days)

Most helpful comment

when swoole ver >= 4.x, need gcc ver >= 4.8
and you'd better run swoole in cli mode instead of fpm

Module compiled with module API=20170718
PHP compiled with module API=20180606

it shows that you have multi PHP version and you mixed it up

All 6 comments

i compile swoole alone successfully when update gcc4.4 to gcc4.8
when i use .so file in php.ini :

[root@z ~]# service php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm [23-Jun-2018 14:40:31] NOTICE: PHP message: PHP Warning: PHP Startup: swoole: Unable to initialize module
Module compiled with module API=20170718
PHP compiled with module API=20180606
These options need to match
in Unknown on line 0
done

when swoole ver >= 4.x, need gcc ver >= 4.8
and you'd better run swoole in cli mode instead of fpm

Module compiled with module API=20170718
PHP compiled with module API=20180606

it shows that you have multi PHP version and you mixed it up

thanks dear twose

i installed gcc
but after some research i found sould install gcc-c++ also


i dont know how use swoole in cli mode ?
which solution have max performance ?
help please

/bin/sh /root/php/libtool --silent --preserve-dup-deps --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -IZend/ -I/root/php/Zend/ -DPHP_ATOM_INC -I/root/php/include -I/root/php/main -I/root/php -I/root/php/ext/date/lib -I/usr/include/libxml2 -I/root/php/ext/mbstring/oniguruma -I/root/php/ext/mbstring/libmbfl -I/root/php/ext/mbstring/libmbfl/mbfl -I/root/php/ext/sqlite3/libsqlite -I/root/php/ext/swoole -I/root/php/ext/swoole/include -I/root/php/ext/zip/lib -I/root/php/TSRM -I/root/php/Zend -Wall -pthread -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS -c /root/php/Zend/zend_execute.c -o Zend/zend_execute.lo
In file included from /root/php/Zend/zend.h:29:0,
from /root/php/Zend/zend_execute.c:28:
/root/php/Zend/zend_vm_execute.h: In function ‘ZEND_CALL_TRAMPOLINE_SPEC_HANDLER’:
/root/php/Zend/zend_types.h:785:16: _warning_: ‘args’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Z_ARR_P(__z) = __arr; \
^
In file included from /root/php/Zend/zend_execute.c:3377:0:
/root/php/Zend/zend_vm_execute.h:1932:14: _note_: ‘args’ was declared here
zend_array args;
^
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
make: *
* [Zend/zend_execute.lo] Error 1

i bought a new VPS with CentOS7 only for run swoole , but i only have errors :(

@kb667 it not looks like a swoole bug, is it?

Was this page helpful?
0 / 5 - 0 ratings