Edit report at https://bugs.php.net/bug.php?id=76826&edit=1
ID: 76826
Updated by: ab@php.net
Reported by: php-bugs-2018 at ryandesign dot com
Summary: error: use of undeclared identifier 'finite'
-Status: Open
+Status: Feedback
Type: Bug
Package: Compile Failure
Operating System: Mac OS X 10.7.5
PHP Version: 7.2.9
Block user comment: N
Private report: N
New Comment:
@elis the build log seems to available anymore. Perhaps a gist could work? Also the OS and compiler
version were interesting to know.
@php-bugs-2018 Otherwise I was doing some research and stumbled upon the fact, that OS X 10.7 is EOL
already for about 4 years. It seems that even 10.9 already EOL. The issue seems quite weird because
the condition https://github.com/php/php-src/blob/master/configure.ac#L85
checks already whether it's lower than C++11. You could try to remove __cplusplus check in
configure.ac and Zend/configure.ac and see whether it changes something. If it doesn't, that it
is probably missing the other part of the condition.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2018-09-17 09:51:22] elis at hirwing dot se
In Nix we have the same issue when building our packages on darwin.
It's present in 7.2.9, 7.2.10 as well as 7.1.21. It's not present in 7.0.32 or 5.6.38.
Here's a full build log of 7.2.10 on Darwin: https://logs.nix.ci/?key=nixos/nixpkgs.46694&attempt_id=f33785ed-b114-4eee-82b6-83fe93439e25
For the moment we have disabled the intl module on Darwin just to get the new versions into our
unstables. But since we changed the feature set available it also means that we're unable to
backport bug fix releases to our users of our stable channels on both NixOS, other Linux and Darwin.
------------------------------------------------------------------------
[2018-09-03 13:08:57] php-bugs-2018 at ryandesign dot com
I do use phpize from the same version of PHP. I know that intl can be built as a separate extension
using phpize; we do so in MacPorts. This bug report is that on this specific version of Mac OS X
with its version of Xcode, and this version of PHP, it fails to compile. It's not a problem
with older versions of PHP on this version of Mac OS X and Xcode, and it's not a problem with
this version of PHP on other versions of Mac OS X and Xcode.
Both on Mac OS X 10.7 where the build fails, and on 10.8 and later up to at least 10.13 where the
build succeeds, __cplusplus is 199711L. On Mac OS X 10.6 where the build also succeeds, the Apple
gcc 4.2.1 compiler is used, and its __cplusplus value is 1.
------------------------------------------------------------------------
[2018-09-03 12:53:36] ab@php.net
Thanks for the report. Perhaps you need to use phpize from the same (or at least) PHP version. Older
PHP versions will have different php_config.h. Otherwise, ext/intl can also be built shared.
Btw, what does __cplusplus macro contain?
Thanks.
------------------------------------------------------------------------
[2018-08-31 04:11:25] php-bugs-2018 at ryandesign dot com
Description:
------------
Building the bundled intl extension (I happen to build it separately from php, using phpize) fails
on Mac OS X 10.7.5 (with clang 425.0.28 as provided by Xcode 4.6.3), in several PHP versions (7.2.9,
7.1.21). It worked in previous PHP versions. Here's the error message from PHP 7.2.9:
In file included from ext/intl/intl_convertcpp.cpp:24:
In file included from /opt/local/include/php72/php/main/php.h:35:
In file included from /opt/local/include/php72/php/Zend/zend.h:328:
/opt/local/include/php72/php/Zend/zend_operators.h:114:18: error: use of undeclared identifier
'finite'
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/opt/local/include/php72/php/main/../main/php_config.h:2619:24: note: expanded from macro
'zend_finite'
#define zend_finite(a) finite(a)
^
/opt/local/include/php72/php/Zend/zend_portability.h:312:52: note: expanded from macro
'UNEXPECTED'
# define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
^
Perhaps it was caused by this commit: https://github.com/php/php-src/commit/ad790bea2e4a8a25c79ceab964601f3785cd2bf1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76826&edit=1