Please answer these questions before submitting your issue. Thanks!
running: make
/bin/sh /var/tmp/pear-build-rootfXDirn/swoole-4.4.1/libtool --mode=compile g++ -I. -I/var/tmp/swoole -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfXDirn/swoole-4.4.1/include -I/var/tmp/pear-build-rootfXDirn/swoole-4.4.1/main -I/var/tmp/swoole -I/opt/remi/php72/root/usr/include/php -I/opt/remi/php72/root/usr/include/php/main -I/opt/remi/php72/root/usr/include/php/TSRM -I/opt/remi/php72/root/usr/include/php/Zend -I/opt/remi/php72/root/usr/include/php/ext -I/opt/remi/php72/root/usr/include/php/ext/date/lib -I/var/tmp/swoole -I/var/tmp/swoole/include -I/var/tmp/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /var/tmp/swoole/php_swoole_cxx.cc -o php_swoole_cxx.lo
libtool: compile: g++ -I. -I/var/tmp/swoole -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfXDirn/swoole-4.4.1/include -I/var/tmp/pear-build-rootfXDirn/swoole-4.4.1/main -I/var/tmp/swoole -I/opt/remi/php72/root/usr/include/php -I/opt/remi/php72/root/usr/include/php/main -I/opt/remi/php72/root/usr/include/php/TSRM -I/opt/remi/php72/root/usr/include/php/Zend -I/opt/remi/php72/root/usr/include/php/ext -I/opt/remi/php72/root/usr/include/php/ext/date/lib -I/var/tmp/swoole -I/var/tmp/swoole/include -I/var/tmp/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /var/tmp/swoole/php_swoole_cxx.cc -fPIC -DPIC -o .libs/php_swoole_cxx.o
In file included from /opt/remi/php72/root/usr/include/php/Zend/zend_types.h:27:0,
from /opt/remi/php72/root/usr/include/php/Zend/zend.h:29,
from /opt/remi/php72/root/usr/include/php/main/php.h:35,
from /var/tmp/swoole/php_swoole.h:25,
from /var/tmp/swoole/php_swoole_cxx.h:19,
from /var/tmp/swoole/php_swoole_cxx.cc:1:
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_increment_function(zval*)':
/opt/remi/php72/root/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))) {
^
/opt/remi/php72/root/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_decrement_function(zval*)':
/opt/remi/php72/root/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))) {
^
/opt/remi/php72/root/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_add_function(zval*, zval*, zval*)':
/opt/remi/php72/root/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))) {
^
/opt/remi/php72/root/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'void fast_long_sub_function(zval*, zval*, zval*)':
/opt/remi/php72/root/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))) {
^
/opt/remi/php72/root/usr/include/php/Zend/zend_portability.h:312:52: note: in definition of macro 'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
make: *** [php_swoole_cxx.lo] Error 1
ERROR: `make' failed
What did you expect to see?
What did you see instead?
What version of Swoole are you using (show your php --ri swoole)?
swoole-4.4.1
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
# uname -a
Linux api-1 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# php -v
PHP 7.2.20 (cli) (built: Jul 2 2019 12:53:41) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
OK, Solved.
# upgrade gcc
yum install centos-release-scl -y
yum install devtoolset-7 -y
scl enable devtoolset-7 bash
Most helpful comment
OK, Solved.