Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 901969 - dev-lang/php: automagic dev-libs/capstone dep?
Summary: dev-lang/php: automagic dev-libs/capstone dep?
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL: https://github.com/php/php-src/issues...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-17 17:25 UTC by Sam James
Modified: 2023-05-14 19:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-17 17:25:14 UTC
Noticed with iwdevtools:

[WW] VDB: detected possibly incorrect RDEPEND (dev-lang/php-8.2.4)
[WW]                   > dev-libs/capstone:=
[WW] dev-libs/libpcre2 | dev-libs/libpcre2:=
[WW] sys-devel/gettext <

I've no idea what PHP would use capstone for, though.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2023-03-17 18:14:14 UTC
capstone is used in the opcache JIT in recent versions, but only on amd64, x86 and arm64

It can also can do this with dev-util/oprofile which is detected in the same way.

However, a user would need to also set the appropriate opcache.jit_debug runtime option.

I am not sure of the best way to handle these deps on such an obscure feature for many (including myself).

Possibly tie to debug USE and patching? (and hidden for other arches)

Really is a messy situation
Comment 2 Michael Orlitzky gentoo-dev 2023-03-18 02:03:32 UTC
They're both apparently optional, though I have no idea what would happen if you tried to set opcache.jit_debug accordingly but without the dependencies installed. If nothing bad happens, we can probably turn them into --with-foo flags like I did with apparmor.

Have to say I'm getting bored of fixing this over and over again though. Not to mention:

    for i in /usr/local /usr; do
      if test -r $i/include/opagent.h; then
        OPAGENT_DIR=$i
        AC_MSG_RESULT(found in $i)
        break
      fi
    done

Come on.
Comment 3 Michael Orlitzky gentoo-dev 2023-03-22 22:41:16 UTC
Did the capstone-5.0 release candidate revert to,

  includedir=${prefix}/include

instead of

  includedir=${prefix}/include/capstone

in its pkg-config file?

It hasn't changed in the capstone (master) git repo, but I'm getting build failures with the 5.x RCs because of it.
Comment 4 Michael Orlitzky gentoo-dev 2023-03-25 16:58:02 UTC
Fixed upstream. Capstone now has a --with-opcache-capstone flag (default: off), and oprofile was removed.