Opened 11 months ago
Last modified 3 months ago
#71718 accepted defect
php71 @7.1.33_5+libedit: error: too few arguments to function call, expected 3, have 2
| Reported by: | pspanja (Petar Španja) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.5 |
| Keywords: | sequoia | Cc: | cooljeanius (Eric Gallager) |
| Port: | php71 |
Description
:info:build /bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/libtool --silent --preserve-dup-deps --mode=compile /usr/bin/clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -IZend/ -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/Zend/ -DPHP_ATOM_INC -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/main -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/ext/date/lib -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/TSRM -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/Zend -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -no-cpp-precomp -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -fvisibility=hidden -DZEND_SIGNALS -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/Zend/zend_language_parser.c -o Zend/zend_language_parser.lo
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33/main/reentrancy.c:139:23: error: too few arguments to function call, expected 3, have 2
:info:build 139 | readdir_r(dirp, entry);
:info:build | ~~~~~~~~~ ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/dirent.h:110:5: note: 'readdir_r' declared here
:info:build 110 | int readdir_r(DIR *, struct dirent *, struct dirent **) __DARWIN_INODE64(readdir_r);
:info:build | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 1 error generated.
:info:build make: *** [main/reentrancy.lo] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33'
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/work/php-7.1.33" && /usr/bin/make -j10 -w all
:info:build Exit code: 2
:error:build Failed to build php71: command execution failed
:debug:build Error code: CHILDSTATUS 54951 2
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build (procedure "portbuild::build_main" line 10)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php71/main.log for details.
Change History (4)
comment:1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
| Keywords: | sequoia added; arm64 removed |
|---|---|
| Owner: | set to ryandesign |
| Status: | new → accepted |
| Summary: | php71 @7.1.33_5+libedit: Failure to build on Sequoia 15.2 → php71 @7.1.33_5+libedit: error: too few arguments to function call, expected 3, have 2 |
comment:2 Changed 11 months ago by pspanja (Petar Španja)
Yes indeed. If I could, I would, but some projects just have their own lifecycle.
Thanks for looking into this!
comment:3 Changed 3 months ago by cooljeanius (Eric Gallager)
This affects php72, btw, which in turn affects swig3-php
comment:4 Changed 3 months ago by cooljeanius (Eric Gallager)
| Cc: | cooljeanius added |
|---|
Note: See
TracTickets for help on using
tickets.

There is a bug in this configure test:
On my macOS 12 system, I get the correct answer:
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_rhowever 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.