Bug #80176 [Opn]: configure script fails to include required headers
| From: | cmb@php.net | Date: | Fri, 02 Oct 2020 16:47:59 +0000 |
| Subject: | Bug #80176 [Opn]: configure script fails to include required headers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229343@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80176&edit=1
ID: 80176
Updated by: cmb@php.net
Reported by: php-bugs-2020 at ryandesign dot com
Summary: configure script fails to include required headers
Status: Open
Type: Bug
Package: *General Issues
Operating System: macOS 10.15.6
PHP Version: 7.4.11
Block user comment: N
Private report: N
New Comment:
> main/reentrancy.c:125:23: error: too few arguments to function call, expected 3, have 2
> readdir_r(dirp, entry);
That has already been reported as bug #80171.
Previous Comments:
------------------------------------------------------------------------
[2020-10-02 16:32:14] php-bugs-2020 at ryandesign dot com
Description:
------------
php fails to build on macOS with Xcode 12. New in Xcode 12 is that implicitly declaring functions is
now an error; before it was just a warning. Many of the configure script tests fail to include all
of the required headers, leading to those tests failing to correctly identify the system's
capabilities, such as:
conftest.c:103:5: error: implicitly declaring library function 'exit' with type 'void
(int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
exit(2);
^
conftest.c:103:5: note: include the header <stdlib.h> or explicitly provide a declaration for
'exit'
conftest.c:111:3: error: implicit declaration of function 'unlink' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
unlink(filename);
^
The build later fails, for example with this error:
main/reentrancy.c:125:23: error: too few arguments to function call, expected 3, have 2
readdir_r(dirp, entry);
~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/dirent.h:110:1: note:
'readdir_r' declared here
int readdir_r(DIR *, struct dirent *, struct dirent **) __DARWIN_INODE64(readdir_r);
^
This was reported to MacPorts against php73 here: https://trac.macports.org/ticket/60988 and against
php72 here: https://trac.macports.org/ticket/61168 but it also
affects php74 and presumably all other php versions.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80176&edit=1