/bin/sh /root/swoole-src/libtool --mode=compile g++ -I. -I/root/swoole-src -DPHP_ATOM_INC -I/root/swoole-src/include -I/root/swoole-src/main -I/root/swoole-src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/thirdparty/hiredis -I/root/swoole-src -I/root/swoole-src/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /root/swoole-src/swoole_async.cc -o swoole_async.lo
libtool: compile: g++ -I. -I/root/swoole-src -DPHP_ATOM_INC -I/root/swoole-src/include -I/root/swoole-src/main -I/root/swoole-src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/thirdparty/hiredis -I/root/swoole-src -I/root/swoole-src/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /root/swoole-src/swoole_async.cc -fPIC -DPIC -o .libs/swoole_async.o
In file included from /usr/include/php/Zend/zend_types.h:27:0,
from /usr/include/php/Zend/zend.h:29,
from /usr/include/php/main/php.h:35,
from /root/swoole-src/php_swoole.h:25,
from /root/swoole-src/swoole_async.cc:17:
/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_increment_function(zval)':
/usr/include/php/Zend/zend_operators.h:446:68: error: '__builtin_saddl_overflow' was not declared in this scope
if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
^
/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_decrement_function(zval)':
/usr/include/php/Zend/zend_operators.h:500:68: error: '__builtin_ssubl_overflow' was not declared in this scope
if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
^
/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_add_function(zval, zval, zval)':
/usr/include/php/Zend/zend_operators.h:554:80: error: '__builtin_saddl_overflow' was not declared in this scope
if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), Z_LVAL_P(op2), &lresult))) {
^
/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_sub_function(zval, zval, zval)':
/usr/include/php/Zend/zend_operators.h:657:80: error: '__builtin_ssubl_overflow' was not declared in this scope
if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), Z_LVAL_P(op2), &lresult))) {
^
/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
make: * [swoole_async.lo] Error 1
============ gcc 目前版本 =========
[root@xxxxxxswoole-src]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-7/root/usr --mandir=/opt/rh/devtoolset-7/root/usr/share/man --infodir=/opt/rh/devtoolset-7/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --with-default-libstdcxx-abi=gcc4-compatible --with-isl=/builddir/build/BUILD/gcc-7.3.1-20180303/obj-x86_64-redhat-linux/isl-install --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
Ping @petk , I really don't know too much about it, can you take a look? thanks.
同样的错误,gcc 从4.8.5升级到5.4再到8.2,还是这个问题。 不知是否和php版本有关,php:7.2.12, centos7.4,swoole 4.2.7
Hello, I unfortunately don't have much idea what this issue is about. Care to explain how this can be reproduced? Any particular steps how this happens?
hi @petk , bellow is the detail steps:
os:centos7.4 php:7.2.12 (install by yum)
steps for install swoole:
1.git clone https://github.com/swoole/swoole-src.git
2.cd swoole-src
3.sudo phpize
4.sudo ./configure
5.sudo make && make install
i have upgrade gcc from 4.8.5 to 5.4.0 to 8.2.0, still have this issue
thanks,
billy
@baiyou520
have a try with https://forum.phalconphp.com/discussion/17595/problem-with-compiled-phalcon-with-php-721
@twose yes i found another similar solution :https://github.com/Microsoft/msphpsql/issues/726
now it works. thanks.
it seems like the same solution
I will record it, thanks everyone for trying.
sudo yum install centos-release-scl
sudo yum install devtoolset-7
scl enable devtoolset-7 bash
Most helpful comment
@twose yes i found another similar solution :https://github.com/Microsoft/msphpsql/issues/726
now it works. thanks.