Bug 294233 - lang/php85: Unnecessary dependency on devel/capstone
Summary: lang/php85: Unnecessary dependency on devel/capstone
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL: https://github.com/pmmp/PHP-Binaries/...
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-03 15:09 UTC by Christian Ullrich
Modified: 2026-04-11 15:02 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2026-04-03 15:09:04 UTC
lang/php85 has an unconditional (when not building a PHP module) LIB_DEPENDS on devel/capstone. It inherited this when the pre-85 opcache extension (www/php84-opcache etc.) was merged into the core.

According to all available documentation, the capstone library is required only for disassembling JITted code cached using the opcache feature, but this disassembly feature is not enabled by the lang/php85 port under any circumstances.

After removing this dependency the port builds correctly in poudriere with default options, but fails when I add --with-capstore to CONFIGURE_ARGS.

A random web application (net-mgmt/zabbix7-frontend) works with the resulting package. I don't know if this application even attempts to use any opcache feature; I do know that all lines mentioning opcache in the php.ini file are commented out. (The version currently in ports, 7.0.24, officially does not support PHP 8.5 at all; 7.0.25 will and cannot be long.)

Unless the dependency is actually necessary and cannot be made conditional, it should either be removed, or the feature that uses it should be enabled.
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-04-11 13:39:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=937147ce1af47bfa6f970f309a521d4288363ae1

commit 937147ce1af47bfa6f970f309a521d4288363ae1
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2026-04-11 12:18:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-04-11 13:38:01 +0000

    lang/php85: Update version 8.5.4=>8.5.5

    - Optionize JIT. JIT for opcache has been disabled by default. Make it
      and option to conditionally depend on capstone [1]

    Changelog: https://www.php.net/ChangeLog-8.php#8.5.5

    PR:             294233
    Reported by:    chris@chrullrich.net

 lang/php85/Makefile            | 10 ++++++----
 lang/php85/distinfo            |  6 +++---
 security/php85-sodium/Makefile |  1 -
 textproc/php85-xsl/Makefile    |  5 -----
 4 files changed, 9 insertions(+), 13 deletions(-)