secp256k1-php
secp256k1-php copied to clipboard
Building secp256k1-php with secp256k1 master fails to compile
Hey guys!
PHPize
root@nmind:~/secp256k1-php-0.1/secp256k1# phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718
PHPversion
root@nmind:/secp256k1-php-0.1/secp256k1# php -v PHP 7.2.11-2+0-20181015120801.9+stretch-1.gbp8105e0 (cli) (built: Oct 15 2018 12:08:03) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.11-2+0-20181015120801.9+stretch-1.gbp8105e0, Copyright (c) 1999-2018, by Zend Technologies root@nmind:-/secp256k1-php-0.1/secp256k1#
I'm using branch v0.1 When i try make i get this error:
`
root@nmind:~/secp256k1-php-0.1/secp256k1# make /bin/bash /root/secp256k1-php-0.1/secp256k1/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/secp256k1-php-0.1/secp256k1 -DPHP_ATOM_INC -I/root/secp256k1-php-0.1/secp256k1/include -I/root/secp256k1-php-0.1/secp256k1/main -I/root/secp256k1-php-0.1/secp256k1 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/secp256k1-php-0.1/secp256k1/secp256k1.c -o secp256k1.lo libtool: compile: cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/secp256k1-php-0.1/secp256k1 -DPHP_ATOM_INC -I/root/secp256k1-php-0.1/secp256k1/include -I/root/secp256k1-php-0.1/secp256k1/main -I/root/secp256k1-php-0.1/secp256k1 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/secp256k1-php-0.1/secp256k1/secp256k1.c -fPIC -DPIC -o .libs/secp256k1.o /root/secp256k1-php-0.1/secp256k1/secp256k1.c: In function ‘zif_secp256k1_context_randomize’: /root/secp256k1-php-0.1/secp256k1/secp256k1.c:435:17: warning: implicit declaration of function ‘zend_throw_exception_ex’ [-Wimplicit-function-declaration] zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, ^~~~~~~~~~~~~~~~~~~~~~~ /root/secp256k1-php-0.1/secp256k1/secp256k1.c: In function ‘zif_secp256k1_ecdh’: /root/secp256k1-php-0.1/secp256k1/secp256k1.c:1329:14: error: too few arguments to function ‘secp256k1_ecdh’ result = secp256k1_ecdh(ctx, resultChars, pubkey, privKey->val); ^~~~~~~~~~~~~~ In file included from /root/secp256k1-php-0.1/secp256k1/php_secp256k1.h:3:0, from /root/secp256k1-php-0.1/secp256k1/secp256k1.c:10: /usr/local/include/secp256k1_ecdh.h:42:48: note: declared here SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh( ^~~~~~~~~~~~~~
Makefile:194: fallo en las instrucciones para el objetivo 'secp256k1.lo' make: *** [secp256k1.lo] Error 1 root@nmind:~/secp256k1-php-0.1/secp256k1#
Hey! Yea upstream recently broke the ECDH api. When installing libsecp256k1, check out commit 95e99f196fd08a8b2c236ab99d7e7fec8f6dc78f
for the last working version, or cd329dbc3eaf096ae007e807b86b6f5947621ee3 which we test against
Thanks, it did work! @afk11
I also have this issue, what should i do?
How to check out commmit 95e99f196fd08a8b2c236ab99d7e7fec8f6dc78f ?
git checkout 95e99f196fd08a8b2c236ab99d7e7fec8f6dc78f
Sorry, but I am getting a fatal: reference is not a tree
for both commits.
Also, https://github.com/Bit-Wasp/secp256k1-php/commit/95e99f196fd08a8b2c236ab99d7e7fec8f6dc78f and https://github.com/Bit-Wasp/secp256k1-php/commit/cd329dbc3eaf096ae007e807b86b6f5947621ee3 show a 404 page.
I've landed here because I am getting same error as OP.
Perhaps these commits were lost in any merge?
I've tested with all branches and none escaped the error.
@willystadnick the checkout should be done in the github.com/bitcoin-core/secp256k1 directory, not secp256k1-php.
Working on a fix for this, should be possible to run against secp256k1 master soon.
Thanks for the update, Thomas!
On Wed, May 8, 2019 at 12:27 PM Thomas Kerin [email protected] wrote:
Working on a fix for this, should be possible to run against secp256k1 master soon.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Bit-Wasp/secp256k1-php/issues/124#issuecomment-490532761, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN5PQWVN7KNT3RHPMSWEZTPULWNHANCNFSM4GBTYHDA .