[MacPorts] #71718: php71 @7.1.33_5+libedit: error: too few arguments to function call, expected 3, have 2 (was: php71 @7.1.33_5+libedit: Failure to build on Sequoia 15.2)
MacPorts
noreply at macports.org
Thu Jan 2 04:54:18 UTC 2025
#71718: php71 @7.1.33_5+libedit: error: too few arguments to function call,
expected 3, have 2
----------------------+------------------------
Reporter: pspanja | Owner: ryandesign
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords: sequoia
Port: php71 |
----------------------+------------------------
Changes (by ryandesign):
* keywords: arm64 => sequoia
* owner: (none) => ryandesign
* status: new => accepted
Comment:
There is a bug in this configure test:
{{{
checking for readdir_r... yes
checking for type of readdir_r... old-style
}}}
On my macOS 12 system, I get the correct answer:
{{{
checking for readdir_r... yes
checking for type of readdir_r... POSIX
}}}
If I use the newer MacPorts clang 19 instead of the older Apple clang 14
from my Xcode, I get the same configure result you got, and the config.log
shows the reason for the misunderstanding is:
{{{
configure:15148: checking for type of readdir_r
configure:15188: ccache /opt/local/bin/clang-mp-19 -o conftest -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch
x86_64 -fvisibility=hidden -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -no-cpp-
precomp -L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
-arch x86_64 conftest.c -lm >&5
conftest.c:242:11: error: incompatible pointer to integer conversion
passing 'DIR *' to parameter of type 'int' [-Wint-conversion]
242 | close(dir);
| ^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/unistd.h:437:15:
note: passing argument to parameter here
437 | int close(int) __DARWIN_ALIAS_C(close);
| ^
conftest.c:245:9: error: incompatible pointer to integer conversion
passing 'DIR *' to parameter of type 'int' [-Wint-conversion]
245 | close(dir);
| ^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/unistd.h:437:15:
note: passing argument to parameter here
437 | int close(int) __DARWIN_ALIAS_C(close);
| ^
2 errors generated.
}}}
php80 and earlier need #70468 to be fixed first; then I can move on to
whatever additional fixes even earlier versions like php71 might need.
#60988 was an earlier report of the same ultimate error caused also by
misdetection of `readdir_r` however the problem there was implicit
function declarations, for which I backported the fixes to php70 and
later; the ticket remains open because I haven't yet backported the fixes
to php56 and earlier. Now, even newer compilers consider pointer type
mismatches to be an error so we need to identify how upstream fixed that
and backport that fix as well.
For now if you're on macOS 15 or later you'll need to use php80 or later.
php80 and earlier have reached end of life. You should use php81 or newer.
--
Ticket URL: <https://trac.macports.org/ticket/71718#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list