Bug #74039 [Csd]: is_infinite(-INF) returns false
| From: | nikic@php.net | Date: | Fri, 17 Mar 2017 16:50:43 +0000 |
| Subject: | Bug #74039 [Csd]: is_infinite(-INF) returns false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207899@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74039&edit=1
ID: 74039
Updated by: nikic@php.net
Reported by: bugs dot php dot net at chsc dot dk
Summary: is_infinite(-INF) returns false
Status: Closed
Type: Bug
Package: Math related
Operating System: Alpine Linux
PHP Version: 7.0.15
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Does
#include <math.h>
#ifndef isfinite
# error Not defined
#endif
void main() {}
compile for you? This seems pretty weird, because glibc should have isfinite().
Previous Comments:
------------------------------------------------------------------------
[2017-03-17 16:32:12] georgi at unixsol dot org
The fix in https://github.com/php/php-src/commit/714d825b62e719447686da6efe3b4063c2f25749
breaks the build for me for PHP 7.1.3 and PHP 7.0.17 branches:
The build fails with:
ext/filter/.libs/logical_filters.o: In function `php_filter_float':
/home/georgi/build/BUILD/php71-7.1.3/src/ext/filter/logical_filters.c:411: undefined reference to
`isfinite'
ext/intl/collator/.libs/collator_is_numeric.o: In function `collator_is_numeric':
/home/georgi/build/BUILD/php71-7.1.3/src/ext/intl/collator/collator_is_numeric.c:255: undefined
reference to `isfinite'
ext/standard/.libs/math.o: In function `zif_is_finite':
/home/georgi/build/BUILD/php71-7.1.3/src/ext/standard/math.c:589: undefined reference to
`isfinite'
ext/standard/.libs/math.o: In function `_php_math_round':
/home/georgi/build/BUILD/php71-7.1.3/src/ext/standard/math.c:133: undefined reference to
`isfinite'
/home/georgi/build/BUILD/php71-7.1.3/src/ext/standard/math.c:201: undefined reference to
`isfinite'
ext/standard/.libs/var.o:/home/georgi/build/BUILD/php71-7.1.3/src/ext/standard/var.c:473: more
undefined references to `isfinite' follow
After reverting 714d825b62e719447686da6efe3b4063c2f25749, I can build both 7.0 and 7.1 as before.
I can provide any logs necessary to track the problem. The build machine is CentOS 5.5 with
glibc-devel-2.5-58.el5_6.3.
------------------------------------------------------------------------
[2017-02-05 17:15:44] nikic@php.net
Fixed by https://github.com/php/php-src/commit/9ea0949f43959ff0cf519e7a10ef9de7a538cde3.
------------------------------------------------------------------------
[2017-02-05 01:51:03] ajf@php.net
See also: bug #73954
------------------------------------------------------------------------
[2017-02-03 15:15:19] wilkowski dot kontakt at gmail dot com
On php 5.4.39-0+deb7u2
var_dump(is_infinite(-INF)); // true
------------------------------------------------------------------------
[2017-02-03 14:56:40] g dot sokol99 at g-sokol dot info
On Arch linux PHP 7.1.1 Everything is ok.
------------------------------------------------------------------------
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=74039
--
Edit this bug report at https://bugs.php.net/bug.php?id=74039&edit=1