-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit ./configure flags for capstone and oprofile #10876
Comments
I don't think so. Your suggestion to make this flag opt-in seems reasonable. |
Yeah, It make sense to add --with-capstone in master branch, allow building php without disassembler, and may be completely remove oprofile and bundled libudix86. |
I started work on this at #10918:
|
Same reasoning as phpGH-10876
The PR fixed the immediate problem, so I'll close this. We can do libudis86 later -- feel free to ping me about it. |
Description
Hello, we've noticed on Gentoo that some of our users are winding up with capstone and oprofile linked into their PHP builds "accidentally." These are used for JIT debugging, and if the configure script finds them available, it sets
HAVE_CAPSTONE
orHAVE_OPROFILE
respectively, and prepares the build system to link with the corresponding library.We have a big wiki page explaining why this can lead to problems, but I can sum it up in a sentence or two: sometimes, users have capstone or oprofile installed for some other reason, and not because they want to use it with PHP. If that reason changes and if the user decides to uninstall capstone (for example), doing so will break PHP if PHP was linked against capstone. Essentially the problem is that the user won't know that PHP picked up capstone or oprofile as runtime dependencies.
To fix this, the usual solution is to add explicit configure flags like
--with-capstone
and--with-oprofile
. (Our package manager can then track the dependencies.) These features are at least nominally optional, since PHP can build without them. My main question is, does anything bad happen if someone then tries to setopcache.jit_debug
to a value that uses capstone or oprofile? If not, do you foresee any other problems that I've overlooked? I've never personally debugged the JIT so I'm in over my head here.paging @dstogov and @shqking who I see have done related work
PHP Version
git master
Operating System
No response
The text was updated successfully, but these errors were encountered: