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

Unable to install on OS X 10.11.1 w/ PHP 7.0.0 #20

Closed
ablyler opened this issue Dec 4, 2015 · 9 comments
Closed

Unable to install on OS X 10.11.1 w/ PHP 7.0.0 #20

ablyler opened this issue Dec 4, 2015 · 9 comments

Comments

@ablyler
Copy link

ablyler commented Dec 4, 2015

I'm attempting to create a homebrew-php package for this extension, but I am having a hard time getting it to compile. Output below:

==> Cloning https://github.com/nikic/php-ast.git
Cloning into '/Library/Caches/Homebrew/php70-ast--git'...
remote: Counting objects: 41, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 41 (delta 1), reused 19 (delta 0), pack-reused 0
Unpacking objects: 100% (41/41), done.
Checking connectivity... done.
==> Checking out branch master
==> /usr/local/opt/php70/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php70-ast/HEAD --with-php-config=/usr/local/opt/php70/bin/php-config
==> make
Last 15 lines from /Users/ablyler/Library/Logs/Homebrew/php70-ast/03.make:
./php_ast.h:37:28: note: expanded from macro 'AST_STR'
#define AST_STR(str) AST_G(str_ ## str)
                     ~~~~~~^~~~~~~~~~~~
<scratch space>:52:1: note: expanded from here
str_0
^
./php_ast.h:35:52: note: expanded from macro 'AST_G'
#define AST_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(ast, v)
                                                   ^
/usr/local/Cellar/php70/7.0.0/include/php/Zend/zend_API.h:173:77: note: expanded from macro 'ZEND_MODULE_GLOBALS_ACCESSOR'
#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) (module_name##_globals.v)
                                                                            ^
4 errors generated.
make: *** [ast.lo] Error 1
make: *** Waiting for unfinished jobs....
@nikic
Copy link
Owner

nikic commented Dec 4, 2015

It looks like the ZEND_MODULE_GLOBALS_ACCESSOR macro doesn't get resolved when doing an out-of-tree build. I don't understand why...

@nikic
Copy link
Owner

nikic commented Dec 4, 2015

Nevermind, that was a problem on my side. Can you please paste the whole log file? The actual error message is not part of the output thanks to overly helpful compilers.

@tpunt
Copy link
Contributor

tpunt commented Dec 4, 2015

@nikic I'm getting compilation errors because the following lines are concatenating 1 and 0 in the AST_STR macro (instead of literally "true" and "false").

case 1: return AST_STR(true);
case 2: return AST_STR(false);

@ablyler
Copy link
Author

ablyler commented Dec 4, 2015

@nikic sure! full logs are here https://gist.github.com/7057fbd5c4447ac75782

@nikic
Copy link
Owner

nikic commented Dec 4, 2015

@tpunt Yup, that's it. Should be fixed with fed12fa.

@nikic nikic closed this as completed Dec 4, 2015
@nikic
Copy link
Owner

nikic commented Dec 4, 2015

If someone confirms this works I'll tag another release for it :)

@ablyler
Copy link
Author

ablyler commented Dec 4, 2015

@nikic confirmed, it working for me! let me know when there is a new release tagged.

@tpunt
Copy link
Contributor

tpunt commented Dec 4, 2015

Yep, it works fine now :)

@nikic
Copy link
Owner

nikic commented Dec 4, 2015

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

No branches or pull requests

3 participants