[MacPorts] #66660: php: Certain older version opcache modules don't work properly on Ventura anymore (was: Certain older PHP version opcache modules don't work properly on Ventura anymore)
MacPorts
noreply at macports.org
Mon Jan 16 19:17:44 UTC 2023
#66660: php: Certain older version opcache modules don't work properly on Ventura
anymore
-------------------------------------------------+-------------------------
Reporter: hostep | Owner: ryandesign
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: ventura
Port: php70-opcache php71-opcache |
php72-opcache php73-opcache |
-------------------------------------------------+-------------------------
Changes (by ryandesign):
* keywords: => ventura
* status: assigned => accepted
* port: php72-opcache php73-opcache => php70-opcache php71-opcache
php72-opcache php73-opcache
Comment:
I would like for the older PHP ports to still work, so thanks for
reporting this problem and for letting me know these older ports are still
being used.
I can confirm this issue on Ventura x86_64 with php70-opcache through
php73-opcache inclusive and that the problem doesn't occur with
php74-opcache.
What I find strange is that even on Monterey, where I don't see the
problem, `nm` (if I understand how to interpret its output) says
`_zend_file_cache_invalidate` is undefined in php70 through php73 and I
don't know why.
{{{
% for x in /opt/local/lib/php*/extensions/*/opcache.so; do echo $x && nm
$x | grep _zend_file_cache_invalidate; done
/opt/local/lib/php70/extensions/no-debug-non-zts-20151012/opcache.so
U _zend_file_cache_invalidate
/opt/local/lib/php71/extensions/no-debug-non-zts-20160303/opcache.so
U _zend_file_cache_invalidate
/opt/local/lib/php72/extensions/no-debug-non-zts-20170718/opcache.so
U _zend_file_cache_invalidate
/opt/local/lib/php73/extensions/no-debug-non-zts-20180731/opcache.so
U _zend_file_cache_invalidate
/opt/local/lib/php74/extensions/no-debug-non-zts-20190902/opcache.so
0000000000021256 T _zend_file_cache_invalidate
/opt/local/lib/php80/extensions/no-debug-non-zts-20200930/opcache.so
0000000000022415 T _zend_file_cache_invalidate
/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/opcache.so
0000000000013bbd T _zend_file_cache_invalidate
/opt/local/lib/php82/extensions/no-debug-non-zts-20220829/opcache.so
0000000000013770 T _zend_file_cache_invalidate
}}}
`_zend_file_cache_invalidate` is part of "file-based caching"
[https://github.com/php/php-
src/commit/3abde432314787f697533c88e7afd64946676306 introduced in PHP 7.0]
as an optional feature that could be disabled at compile time (but we
enable it in MacPorts). In PHP 7.4 it [https://github.com/php/php-
src/commit/c32da66e129897f4f103ecc6319332f160ee52ea could no longer be
disabled] at compile time. Perhaps making the feature non-optional in 7.4
has something to do with the symbol becoming defined in `nm` or maybe
that's just a coincidence.
Comparing my build logs on Monterey and Ventura, on Ventura it says:
{{{
ld: warning: -undefined dynamic_lookup may not work with chained fixups
}}}
All PHP modules automatically get the `-undefined dynamic_lookup` linker
flags added which lets them look up undefined symbols at runtime, which is
I guess why it works at all on earlier systems. This "chained fixups"
feature appears to be [https://developer.apple.com/documentation/xcode-
release-notes/xcode-13-release-notes new in Xcode 13] and applies
automatically when compiling for macOS 12 and later:
> All programs and dylibs built with a deployment target of macOS 12 [...]
or later now use the chained fixups format
and [https://developer.apple.com/documentation/xcode-release-notes/xcode-
13_3-release-notes as of Xcode 13.3] it applies automatically for macOS 11
and later:
> The new chained fixups format is the default linking method when
targeting macOS 11 or later [...]
But maybe there is some new change to dyld on Ventura that causes new
problems and that's why they added the warning. This feature is
[https://github.com/python/cpython/issues/97524 causing problems in the
python ecosystem] as well. They are currently waiting for a new version of
Xcode to make chained fixups work better. In the meantime disabling
chained fixups (going back to the behavior of Xcode 12 and earlier) seems
to work.
I'm not sure how pervasive this problem is in MacPorts PHP modules so I'll
just make the change in the four affected php-opcache ports but if you
find other PHP modules with problems please file another ticket and I can
add the fix there too or make the fix more general.
--
Ticket URL: <https://trac.macports.org/ticket/66660#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list