Bug #74265 [Com]: Build problems after 7.0.17 release: undefined reference to `isfinite'

From: Date: Wed, 03 May 2017 07:03:17 +0000
Subject: Bug #74265 [Com]: Build problems after 7.0.17 release: undefined reference to `isfinite'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208926@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74265&edit=1

 ID:                 74265
 Comment by:         letshi at 163 dot com
 Reported by:        deferraz at terra dot com dot br
 Summary:            Build problems after 7.0.17 release: undefined
                     reference to `isfinite'
 Status:             Closed
 Type:               Bug
 Package:            Compile Failure
 Operating System:   CentOS-5
 PHP Version:        7.0.17
 Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

I have some findings.
I found 7.1.2 before is no problem.
7.1.3 after the problem.

./configure --prefix=/PHP/32/target/php --with-config-file-path=/PHP/32/target/php/etc
--enable-maintainer-zts --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop
--enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-ftp
--enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap
--without-pear --with-gettext --enable-session

>>>config.log in 7.1.2 
configure:95485: checking for isfinite
configure:95485: gcc -m32 -o conftest -I/usr/include -g -O2 -fvisibility=hidden -pthread 
-D_REENTRANT  conftest.c  >&5
/tmp/ccsJhzxB.o: In function `main':
/usr/local/src/php-7.1.2/conftest.c:514: undefined reference to `isfinite'
.....
ac_cv_func_isfinite=no


>>>config.log in 7.1.3
configure:95505: checking whether isfinite is declared
configure:95505: gcc -m32 -c -I/usr/include -g -O2 -fvisibility=hidden -pthread  -D_REENTRANT
conftest.c >&5
configure:95505: $? = 0
.....
ac_cv_have_decl_isfinite=yes


>>>configure for 7.1.2 
95482  for ac_func in finite isfinite isinf isnan
95483  do :
95484    as_ac_var=$as_echo "ac_cv_func_$ac_func" | $as_tr_sh
95485  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
95486  if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
95487    cat >>confdefs.h <<_ACEOF
95488  #define $as_echo "HAVE_$ac_func" | $as_tr_cpp 1
95489  _ACEOF

>>>configure for 7.1.3
95505  ac_fn_c_check_decl "$LINENO" "isfinite"
"ac_cv_have_decl_isfinite" "#include <math.h>
95506  "
95507  if test "x$ac_cv_have_decl_isfinite" = xyes; then :
95508    ac_have_decl=1
95509  else
95510    ac_have_decl=0
95511  fi


Previous Comments:
------------------------------------------------------------------------
[2017-05-03 05:59:37] letshi at 163 dot com

rasmus@php.net 
Thank you very much for your reply, I will update gcc.

------------------------------------------------------------------------
[2017-05-03 05:23:12] rasmus@php.net

gcc version 4.1.2 ?? That compiler is over 10 years old. You are probably going to need to add
-std=c99 to your build flags to get it to work on any modern codebase, or for heaven's sake,
upgrade to a compiler from this decade.

------------------------------------------------------------------------
[2017-05-03 02:09:03] letshi at 163 dot com

Still having problems building 7.1.4 on CentOS5.5
gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)
ldd (GNU libc) 2.5

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

------------------------------------------------------------------------
[2017-05-02 02:46:42] yzaptx at gmail dot com

Sorry for the previous, incomplete comment. Still having problems building 7.0.18RC1 on CentOS 5:
ext/standard/.libs/var.o: In function `php_var_export_ex':
/root/adi/work/src/php-7.0.18RC1/ext/standard/var.c:469: undefined reference to `isfinite'
main/.libs/php_variables.o: In function `zend_dval_to_lval':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zendi_smart_strcmp':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.c:2774: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zend_dval_to_lval':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o:/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: more
undefined references to `isfinite' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

------------------------------------------------------------------------
[2017-04-05 05:05:10] adi at ddns dot com dot au

Sorry for the previous, incomplete comment. Still having problems building 7.0.18RC1 on CentOS 5:
ext/standard/.libs/var.o: In function `php_var_export_ex':
/root/adi/work/src/php-7.0.18RC1/ext/standard/var.c:469: undefined reference to `isfinite'
main/.libs/php_variables.o: In function `zend_dval_to_lval':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zendi_smart_strcmp':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.c:2774: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zend_dval_to_lval':
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o:/root/adi/work/src/php-7.0.18RC1/Zend/zend_operators.h:117: more
undefined references to `isfinite' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=74265


--
Edit this bug report at https://bugs.php.net/bug.php?id=74265&edit=1


Thread (22 messages)

« previous php.bugs (#208926) next »