Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 857597 - >=dev-lang/php-8: lack opcache-jit support in ebuild (missing (optional) dependencies)
Summary: >=dev-lang/php-8: lack opcache-jit support in ebuild (missing (optional) depe...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-11 11:36 UTC by Xiami
Modified: 2023-05-14 19:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.log,6.57 KB, text/plain)
2022-07-11 11:36 UTC, Xiami
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xiami 2022-07-11 11:36:39 UTC
Created attachment 791024 [details]
emerge --info

Starting with PHP 8.0, opcache-jit is added (amd64/x86/aarch64 only).

opcache-jit is enabled by default and can be disabled by --disable-opcache-jit.

Two new optional dependencies are introduced along with opcache-jit:

1. dev-util/oprofile
   According to https://wiki.php.net/rfc/jit , oprofile is used for opcache.jit_debug .

   opcache.jit_debug - JIT debug control options, where each bit enabling some debugging options. Default - 0.
     ...
     (1<<6) - provide information about JIt-ed code for Linux Oprofile
     ...

2. >=dev-libs/capstone-3.0.0
   By looking into ext/opcache/jit/zend_jit_disasm.c , it is used for disassembly.
   
   TL;DR: It is MANDATORY for aarch64 builds.

   If capstone is installed, PHP uses it.
   If capstone is missing and we are building for amd64/x86, PHP would use ext/opcache/jit/libudis86 . Otherwise (no capstone && building for aarch64), no disasm is built.


I don't use PHP for a long time. Information above are inferred from PHP's source code (config.m4, ...). I apologise in advance for anything misleading.
Earlier today, I depclean-ed oprofile and portage reports `existing preserved libs` on libopagent.so.1.0.1 by opcache.so (php-8.1.8).
Comment 1 Michael Orlitzky gentoo-dev 2023-04-16 01:54:09 UTC
oprofile is now gone, and capstone can be toggled with a ./configure flag. If anything it should probably go behind USE=debug.