Closed ekkis closed 3 years ago
@fanatid any ideas?
secp256k1_gej_has_quad_y_var
used in test/benchmarksecp256k1_ge_set_gej_var
used in test/recovery modulesecp256k1_gej_is_valid_var
used in testsecp256k1_ecmult_const
used in test/ecdh moduleWhat is really unclear, why this warnings generated while they disabled in gyp file: https://github.com/bitcoinjs/tiny-secp256k1/blob/v1.1.3/binding.gyp#L32
It looks like this is now throwing errors. Happening with Node v13.11.0 (locally) and Node 13.1.0 (Travis).
> tiny-secp256k1@1.1.3 build /Users/lemoustachiste/work/cert-verifier-js/node_modules/tiny-secp256k1
> node-gyp rebuild
CXX(target) Release/obj.target/secp256k1/native/addon.o
../native/addon.cpp:240:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:320:34: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
strict = info[3]->BooleanValue(Nan::GetCurrentContext()).FromJust();
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/lemoustachiste/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate* isolate) const;
^
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:142:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<2, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested
here
const auto flags = assumeCompression<2>(info, pA);
^
/Users/lemoustachiste/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate* isolate) const;
^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
~~~~~~~~~~~~~ ^ ~~~~~
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:174:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested
here
const auto flags = assumeCompression<1>(info, p);
^
/Users/lemoustachiste/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate* isolate) const;
^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
~~~~~~~~~~~~~ ^ ~~~~~
../native/addon.cpp:89:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:189:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value> >' requested here
const auto flags = assumeCompression<1>(info);
^
/Users/lemoustachiste/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate* isolate) const;
^
../native/addon.cpp:87:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;
~~~~~~~~~~~~~ ^ ~~~~~
4 warnings and 4 errors generated.
make: *** [Release/obj.target/secp256k1/native/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/lemoustachiste/.nvm/versions/node/v13.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/lemoustachiste/.nvm/versions/node/v13.11.0/bin/node" "/Users/lemoustachiste/.nvm/versions/node/v13.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lemoustachiste/work/cert-verifier-js/node_modules/tiny-secp256k1
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tiny-secp256k1@1.1.3 build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tiny-secp256k1@1.1.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lemoustachiste/.npm/_logs/2020-03-18T14_59_09_752Z-debug.log
secp256k1 bindings compilation fail. Pure JS implementation will be used.
I can avoid this error using Node 11.
Node v10.18.1 also have the same😕
Node v10.18.1 also have the same
I have verified that it successfully installs on v10.18.1
Some strange behaviour. Using Node 14.5.0 I had errors and compilation failure. Then I downgrade to 13.14.0 and it installs successfully with warnings. I go back to 14.5.0 just to make sure, and this time it installs successfully with warnings...
A WIP of switching over to use N-API is here: https://github.com/bitcoinjs/tiny-secp256k1/tree/napi
If anyone wants to help, these issues would be gone.
I am hoping to have things moved to N-API before the end-of-year.
Node v10.18.1 also have the same
I have verified that it successfully installs on v10.18.1
Terminal Output
Had similar problem on node 13 and 14. Downgraded to v10.18.1 - build is successful.
installing on OSX 10.14.6 (Mojave) I get the following warnings. The "unused function" warnings I guess are just a matter of cleaning up the code but the integer comparisons I would think are of concern. I'm guessing that's a platform dependent thing. is there some way to tweak the meaning of "int" to "unsigned long"? this should get cleaned up no?
~/dev $ npm i bitcoinjs-lib