Centos PHP 7.2 Error

问答中心分类: PHPCentos PHP 7.2 Error
instrye asked 6 年 ago
/bin/sh /root/oneinstack/src/php-7.2.7/libtool --silent --preserve-dup-deps --mode=compile g++ -I/usr/include -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -DU_USING_ICU_NAMESPACE=1 -Iext/intl/ -I/root/oneinstack/src/php-7.2.7/ext/intl/ -DPHP_ATOM_INC -I/root/oneinstack/src/php-7.2.7/include -I/root/oneinstack/src/php-7.2.7/main -I/root/oneinstack/src/php-7.2.7 -I/root/oneinstack/src/php-7.2.7/ext/date/lib -I/usr/include/libxml2 -I/usr/local/openssl/include -I/usr/local/curl/include -I/usr/include/freetype2 -I/root/oneinstack/src/php-7.2.7/ext/mbstring/oniguruma -I/root/oneinstack/src/php-7.2.7/ext/mbstring/libmbfl -I/root/oneinstack/src/php-7.2.7/ext/mbstring/libmbfl/mbfl -I/root/oneinstack/src/php-7.2.7/ext/sqlite3/libsqlite -I/usr/local/include -I/root/oneinstack/src/php-7.2.7/ext/zip/lib -I/root/oneinstack/src/php-7.2.7/TSRM -I/root/oneinstack/src/php-7.2.7/Zend -g -O2 -c /root/oneinstack/src/php-7.2.7/ext/intl/intl_convertcpp.cpp -o ext/intl/intl_convertcpp.lo
In file included from /root/oneinstack/src/php-7.2.7/Zend/zend_types.h:27:0,
from /root/oneinstack/src/php-7.2.7/ext/intl/intl_convertcpp.h:27,
from /root/oneinstack/src/php-7.2.7/ext/intl/intl_convertcpp.cpp:21:
/root/oneinstack/src/php-7.2.7/Zend/zend_operators.h: In function ‘void fast_long_increment_function(zval*)’:
/root/oneinstack/src/php-7.2.7/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))) {
^
/root/oneinstack/src/php-7.2.7/Zend/zend_portability.h:312:52: note: in definition of macro ‘UNEXPECTED’
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/root/oneinstack/src/php-7.2.7/Zend/zend_operators.h: In function ‘void fast_long_decrement_function(zval*)’:
/root/oneinstack/src/php-7.2.7/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))) {
^
/root/oneinstack/src/php-7.2.7/Zend/zend_portability.h:312:52: note: in definition of macro ‘UNEXPECTED’
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/root/oneinstack/src/php-7.2.7/Zend/zend_operators.h: In function ‘void fast_long_add_function(zval*, zval*, zval*)’:
/root/oneinstack/src/php-7.2.7/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))) {
^
/root/oneinstack/src/php-7.2.7/Zend/zend_portability.h:312:52: note: in definition of macro ‘UNEXPECTED’
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
/root/oneinstack/src/php-7.2.7/Zend/zend_operators.h: In function ‘void fast_long_sub_function(zval*, zval*, zval*)’:
/root/oneinstack/src/php-7.2.7/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))) {
^
/root/oneinstack/src/php-7.2.7/Zend/zend_portability.h:312:52: note: in definition of macro ‘UNEXPECTED’
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
make: *** [ext/intl/intl_convertcpp.lo] Error 1
[1;31mPHP install failed, Please Contact the author! [0m
Question Tags:

2 Answers
instrye answered 6 年 ago
GCC -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-amazon-linux/7/lto-wrapper
Target: x86_64-amazon-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-default-libstdcxx-abi=gcc4-compatible --without-isl --disable-libmpx --disable-libsanitizer --enable-gnu-indirect-function --disable-libcilkrts --disable-libatomic --disable-libquadmath --disable-libquadmath-suport --disable-libitm --disable-libgomp --with-tune=generic --with-arch_32=x86-64 --build=x86_64-amazon-linux
Thread model: posix
gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)
 

oneinstack answered 6 年 ago
升级了gcc吗? 报错提供php官方看看吧