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

PHP8 Install Error #162

Open
in3rsha opened this issue Mar 2, 2021 · 2 comments
Open

PHP8 Install Error #162

in3rsha opened this issue Mar 2, 2021 · 2 comments

Comments

@in3rsha
Copy link

in3rsha commented Mar 2, 2021

Hello there,

Recently upgraded to PHP8.0 and want to install this extension. Everything works fine until I hit the make command when in the secp256k1-php/sec256k1 folder.

This is the error I'm seeing:

/secp256k1-php/secp256k1/secp256k1.c:1995:47: error: expected ‘)’ before ‘TSRMLS_CC’
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz/rS|flz",
                                               ^~~~~~~~~
/secp256k1-php/secp256k1/secp256k1.c:1995:9: error: too few arguments to function ‘zend_parse_parameters’
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz/rS|flz",
         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20200930/main/php.h:36:0,
                 from /secp256k1-php/secp256k1/secp256k1.c:7:
/usr/include/php/20200930/Zend/zend_API.h:304:22: note: declared here
 ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);

I don't know anything about C or PHP extensions so I don't know where to start to try and fix this. Can anyone help?

@afk11
Copy link
Member

afk11 commented Mar 2, 2021

Hmm, I haven't tried it out on PHP8 yet. FYI, if you're interested, that line is using macros which make the code look extra weird ;)

I'll try get to this a little later on. Normally there aren't significant differences, just a new function name or slightly different args. If anyone's looking at this sooner, there's probably some clues about this here: https://github.com/php/php-src/tree/master/ext/

@in3rsha
Copy link
Author

in3rsha commented Mar 2, 2021

Thanks Thomas, I'll see if I can figure out a fix.

Thanks for the great library by the way, it has been immensely useful over the years.

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

2 participants