[php-src] Issue #20546: PHP 8.5.0: preserve_none check fails on macOS (undefined symbol `fun` as macOS uses `_fun`)

From: Date: Fri, 21 Nov 2025 02:35:21 +0000
Subject: [php-src] Issue #20546: PHP 8.5.0: preserve_none check fails on macOS (undefined symbol `fun` as macOS uses `_fun`)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251266@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20546 Author: cho-m ### Description While preparing PHP 8.5.0 release in Homebrew (#255299), I noticed that the new TAILCALL VM feature wasn't getting enabled on macOS. From config.log, the error is ``` configure:81621: checking for preserve_none calling convention configure:81715: clang -o conftest -g -O2 -ffp-contract=off -fvisibility=hidden -DNDEBUG -D_GNU_SOURCE -Wl,-rpath,/opt/homebrew/Cellar/openssl@3/3.6.0/lib -L/opt/homebrew/Cellar/openssl@3/3.6.0/lib -Wl,-rpath,/opt/homebrew/Cellar/pcre2/10.47/lib -L/opt/homebrew/Cellar/pcre2/10.47/lib -Wl,-rpath,/opt/homebrew/opt/sqlite/lib -L/opt/homebrew/opt/sqlite/lib -Wl,-rpath,/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/lib -Wl,-rpath,/opt/homebrew/Cellar/curl/8.17.0/lib -L/opt/homebrew/Cellar/curl/8.17.0/lib -Wl,-rpath,/opt/homebrew/Cellar/gd/2.3.3_6/lib -L/opt/homebrew/Cellar/gd/2.3.3_6/lib -Wl,-rpath,/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/gettext/lib -Wl,-rpath,/opt/homebrew/opt/gmp/lib -L/opt/homebrew/opt/gmp/lib -Wl,-rpath,/opt/homebrew/opt/openldap/lib -L/opt/homebrew/opt/openldap/lib -Wl,-rpath,/opt/homebrew/Cellar/oniguruma/6.9.10/lib -L/opt/homebrew/Cellar/oniguruma/6.9.10/lib -Wl,-rpath,/opt/homebrew/Cellar/unixodbc/2.3.14/lib -L/opt/homebrew/Cellar/unixodbc/2.3.14/lib -Wl,-rpath,/opt/homebrew/opt/freetds/lib -L/opt/homebrew/opt/freetds/lib -Wl,-rpath,/opt/homebrew/opt/libpq/lib -L/opt/homebrew/opt/libpq/lib -Wl,-rpath,/opt/homebrew/Cellar/net-snmp/5.9.4/lib -L/opt/homebrew/Cellar/net-snmp/5.9.4/lib -Wl,-rpath,/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/opt/openssl@3/lib -Wl,-rpath,/opt/homebrew/Cellar/libsodium/1.0.20/lib -L/opt/homebrew/Cellar/libsodium/1.0.20/lib -Wl,-rpath,/opt/homebrew/Cellar/argon2/20190702_1/lib -L/opt/homebrew/Cellar/argon2/20190702_1/lib -Wl,-rpath,/opt/homebrew/opt/tidy-html5/lib -L/opt/homebrew/opt/tidy-html5/lib -Wl,-rpath,/opt/homebrew/Cellar/libzip/1.11.4/lib -L/opt/homebrew/Cellar/libzip/1.11.4/lib conftest.c >&5 Undefined symbols for architecture arm64: "fun", referenced from: _test in conftest-4b4b9c.o _main in conftest-4b4b9c.o ``` This can also be reproduced by just trying to manually compile - https://github.com/php/php-src/blob/php-8.5.0/Zend/Zend.m4#L479 The issue is due to macOS symbol being _fun not fun, e.g. ```console ❯ clang -c test.c && nm -gU test.o | grep fun 0000000000000000 T _fun ``` https://github.com/php/php-src/blob/ca7f55600232fdcde8da1cc27167006dca1cf967/Zend/Zend.m4#L518 Also, minor issue but there is a typo (preverve) which I noticed when trying to override the cache variable https://github.com/php/php-src/blob/685e99655ae97c667950f7f7d176985958718f56/Zend/Zend.m4#L477 ### PHP Version ```plain PHP 8.5.0 (cli) (built: Nov 18 2025 08:02:20) (NTS) Copyright (c) The PHP Group Built by Homebrew Zend Engine v4.5.0, Copyright (c) Zend Technologies with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies ``` ### Operating System macOS 26

« previous php.bugs (#251266) next »