Bug #80171 [Com]: reentrancy.c:139:23: error: too few arguments to function call

From: Date: Fri, 02 Oct 2020 17:05:59 +0000
Subject: Bug #80171 [Com]: reentrancy.c:139:23: error: too few arguments to function call
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229345@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80171&edit=1 ID: 80171 Comment by: php-bugs-2020 at ryandesign dot com Reported by: smillerdev at me dot com Summary: reentrancy.c:139:23: error: too few arguments to function call Status: Open Type: Bug Package: Compile Failure Operating System: macOS 10.15 PHP Version: 7.3.23 Block user comment: N Private report: N New Comment: Hi, sorry for filing the duplicate #80176; I didn't see this one. Apple did not redefine readdir_r; instead, as of Xcode 12, implicit function declarations are an error. They used to be just warnings. php's configure script fails to include various required headers, causing it to misidentify the system's capabilities (such as how many arguments the readdir_r function needs). php needs to fix its configure script to include the right headers for each test. Previous Comments: ------------------------------------------------------------------------ [2020-10-02 16:47:58] cmb@php.net Related To: Bug #80176 ------------------------------------------------------------------------ [2020-10-02 10:01:10] smillerdev at me dot com > Where does the -Werror flag come from in your case? Is this a new default flag in macos 10.15? As far as I know it's added by Homebrew. That has been the case for tons of software years though, without any issues. ------------------------------------------------------------------------ [2020-10-02 09:46:50] nikic@php.net Relevant part: conftest.c:277:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] main() { ^ conftest.c:284:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] exit(1); ^ conftest.c:284:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' conftest.c:286:5: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] close(dir); ^ conftest.c:289:3: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] close(dir); ^ 1 warning and 3 errors generated. configure:15832: $? = 1 configure: program exited with status 1 It fails due to implicit declaration warnings that become errors under -Werror. While we can fix the missing includes, running configure with -Werror will also break other checks -- and if I remember correct, some of them are ones done by autoconf itself, so we cannot easily address them. This is why we have an --enable-werror option that enables -Werror only for the build of PHP itself, not for configure checks. Where does the -Werror flag come from in your case? Is this a new default flag in macos 10.15? ------------------------------------------------------------------------ [2020-10-02 09:38:29] smillerdev at me dot com I'm personally running the macOS 11.0 beta, but the error is the same. Here is a gist with the log. I can't get it from the CI servers, but I can ask someone to run it on 10.15 if needed. https://gist.github.com/SMillerDev/638547b3840380fac9f9fd8e0eefb5f6 ------------------------------------------------------------------------ [2020-10-02 09:21:06] nikic@php.net PHP >= 7.4 sidesteps the issue by removing use of readdir_r: https://github.com/php/php-src/commit/2b28f7189144a21e753dbc09efadd571121a82b9 It looks like PHP_READDIR_R_TYPE is detecting the wrong readdir_r signature for your case. Could you provide the config.log dump? ------------------------------------------------------------------------ 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=80171 -- Edit this bug report at https://bugs.php.net/bug.php?id=80171&edit=1

« previous php.bugs (#229345) next »