php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74507 74265 still not fixed -- isfinite failure remains
Submitted: 2017-04-28 12:10 UTC Modified: 2017-04-28 12:31 UTC
From: franklinwhale at hotmail dot com Assigned:
Status: Duplicate Package: Compile Failure
PHP Version: 7.1.4 OS: RHEL 5
Private report: No CVE-ID: None
 [2017-04-28 12:10 UTC] franklinwhale at hotmail dot com
Description:
------------
PHP 7.1.4 included https://github.com/php/php-src/commit/2e8308260513015dbf80ff0239eca79dbca4f36e, which tries to fix #74265. Unfortunately, the fix appears not working.

The following error is displayed:

ext/standard/.libs/var.o: In function `php_var_export_ex':
/home/oosadm/php-7.1.4/ext/standard/var.c:473: undefined reference to `isfinite'
main/.libs/php_variables.o: In function `zend_dval_to_lval':
/home/oosadm/php-7.1.4/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zendi_smart_strcmp':
/home/oosadm/php-7.1.4/Zend/zend_operators.c:2789: undefined reference to `isfinite'
Zend/.libs/zend_operators.o: In function `zend_dval_to_lval':
/home/oosadm/php-7.1.4/Zend/zend_operators.h:117: undefined reference to `isfinite'
/home/oosadm/php-7.1.4/Zend/zend_operators.h:117: undefined reference to `isfinite'
Zend/.libs/zend_operators.o:/home/oosadm/php-7.1.4/Zend/zend_operators.h:117: more undefined references to `isfinite' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Another user has made a similar comment in #74265. As #74265 has been closed, that comment has not received any reply. I therefore create this new report.

I have also run ./buildconf --force before ./configure.

The configure command is ./configure --prefix=/usr/local/php --enable-fpm --disable-short-tags --with-pcre-regex=/usr/local/pcre --with-openssl=shared,/usr/local/ssl --with-mysqli --with-pdo-mysql --with-oci8=shared,instantclient --enable-soap

Expected result:
----------------
Build successful

Actual result:
--------------
Build failed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-28 12:31 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2017-04-28 12:31 UTC] requinix@php.net
@deferraz said s/he had problems with a custom autoconf/m4 and that the build worked with the stock versions. Is that the case for you too?
 [2017-05-03 03:50 UTC] letshi at 163 dot com
building 7.1.4 ZTS 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-03 03:56 UTC] letshi at 163 dot com
Supplementary explanation
I try in autoconf-2.59-12 m4-1.4.5-3 and autoconf-2.65 m4-1.4.13 build PHP7.1.4 
Still failed
 [2017-05-03 07:08 UTC] letshi at 163 dot com
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
 [2017-05-04 01:59 UTC] letshi at 163 dot com
I try modify PHP7.1.4 configure file.

I modify  lineno  95508  95519  95530
modify ac_have_decl=1 to ac_have_decl=0

Compile Success On CentOS5.5.

 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=0
 95509    else
 95510      ac_have_decl=0
 95511    fi
 95512    
 95513    cat >>confdefs.h <<_ACEOF
 95514    #define HAVE_DECL_ISFINITE $ac_have_decl
 95515    _ACEOF
 95516    ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 95517    "
 95518    if test "x$ac_cv_have_decl_isnan" = xyes; then :
 95519      ac_have_decl=0
 95520    else
 95521      ac_have_decl=0
 95522    fi
 95523    
 95524    cat >>confdefs.h <<_ACEOF
 95525    #define HAVE_DECL_ISNAN $ac_have_decl
 95526    _ACEOF
 95527    ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 95528    "
 95529    if test "x$ac_cv_have_decl_isinf" = xyes; then :
 95530      ac_have_decl=0
 95531    else
 95532      ac_have_decl=0
 95533    fi
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC