php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80176 configure script fails to include required headers
Submitted: 2020-10-02 16:32 UTC Modified: 2020-10-02 17:07 UTC
From: php-bugs-2020 at ryandesign dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 7.4.11 OS: macOS 10.15.6
Private report: No CVE-ID: None
 [2020-10-02 16:32 UTC] 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.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-02 16:47 UTC] cmb@php.net
> 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.
 [2020-10-02 17:07 UTC] php-bugs-2020 at ryandesign dot com
-Status: Open +Status: Closed
 [2020-10-02 17:07 UTC] php-bugs-2020 at ryandesign dot com
Sorry about filing a duplicate; I didn't see that one. Thanks for pointing me to it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 09:01:27 2024 UTC