我在 CentOS5.5 上编译 php7.1.4 出现错误:
ext/standard/.libs/var.o: In function `php_var_export_ex':
/PHP/32/source/php7.1.4_zts/ext/standard/var.c:473: undefined reference to `isfinite'
main/.libs/php_variables.o: In function `zend_dval_to_lval':
/PHP/32/source/php7.1.4_zts/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zendi_smart_strcmp':
/PHP/32/source/php7.1.4_zts/Zend/zend_operators.c:2789: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zend_dval_to_lval':
/PHP/32/source/php7.1.4_zts/Zend/zend_operators.h:117: undefined reference to `isfinite'
/PHP/32/source/php7.1.4_zts/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o:/PHP/32/source/php7.1.4_zts/Zend/zend_operators.h:117: more undefined references to `isfinite' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
系统信息 :
[root@localhost]# cat /etc/issue
CentOS release 5.5 (Final)
Kernel \r on an \m
[root@localhost]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR

在CentOS5.5上编译PHP7.1.4时遇到undefined reference to isfinite错误。GCC4.1.2不支持该功能,但4.3.3以上版本支持。通过对比php7.1.2和php7.1.3的config.log,发现在php7.1.3及后续版本中,脚本错误地检测到GCC支持。通过修改php7.1.4的源码文件,使编译通过。这是临时解决方案,建议等待PHP官方修复。
最低0.47元/天 解锁文章
1832

被折叠的 条评论
为什么被折叠?



