Skip to content
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

Building opcache/jit fails with pkg-config+capstone #10728

Closed
m6w6 opened this issue Feb 28, 2023 · 3 comments
Closed

Building opcache/jit fails with pkg-config+capstone #10728

m6w6 opened this issue Feb 28, 2023 · 3 comments

Comments

@m6w6
Copy link
Contributor

m6w6 commented Feb 28, 2023

Description

The following code:

./buildconf && ./configure && make

Resulted in this output:

ext/opcache/jit/zend_jit_disasm.c:24:11: fatal error: 'capstone/capstone.h' file not found
# include <capstone/capstone.h>
          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [ext/opcache/jit/zend_jit.lo] Error 1

But I expected this output instead:

Build complete.

More info:

$ brew info -q capstone |head -1 
==> capstone: stable 4.0.2 (bottled), HEAD

$ brew info -q pkg-config |head -1
==> pkg-config: stable 0.29.2 (bottled)

$ pkg-config --print-variables capstone
archive
includedir
libdir
pcfiledir

$ pkg-config --cflags --libs capstone
-I/opt/homebrew/Cellar/capstone/4.0.2/include/capstone -L/opt/homebrew/Cellar/capstone/4.0.2/lib -lcapstone

PHP Version

PHP-8.2 (git)

Operating System

macOS 13 (homebrew)

@devnexen
Copy link
Member

the "issue" lies here -I/opt/homebrew/Cellar/capstone/4.0.2/include/capstone, containing capstone folder.

@devnexen devnexen self-assigned this Feb 28, 2023
devnexen added a commit to devnexen/php-src that referenced this issue Feb 28, 2023
Remove capstone include folder.
For most of the supported systems it worked fine somehow despite
 the pkg-config --cflags, but is always include it even on Linux.
@m6w6
Copy link
Contributor Author

m6w6 commented Mar 1, 2023

I guess it worked "most of the time", because in a standard install, the headers would be located in /usr/include.

@orlitzky
Copy link
Contributor

This broke the build with the capstone-5.x release candidates, but it's not your fault: capstone-engine/capstone#1982

Just a heads up in case anyone else reports the build failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants