barrysteyn / node-scrypt

Scrypt for Node
370 stars 88 forks source link

build error #199

Open XieXiaomei-ptr opened 4 years ago

XieXiaomei-ptr commented 4 years ago

version Linux version 4.15.0-66-generic (buildd@lgw01-amd64-044) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019

git clone https://github.com/barrysteyn/node-scrypt.git cd node-scrypt npm install node-gyp configure build

gyp info it worked if it ends with ok gyp info using node-gyp@6.0.1 gyp info using node@12.13.1 | linux | x64 gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3" gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/data/node-scrypt/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.cache/node-gyp/12.13.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/12.13.1', gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/12.13.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/data/node-scrypt', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] make: Entering directory '/data/node-scrypt/build' gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] SOLINK_MODULE(target) Release/obj.target/copied_files.node COPY Release/copied_files.node CC(target) Release/obj.target/scrypt_wrapper/src/util/memlimit.o CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/keyderivation.o CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/pickparams.o CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/hash.o AR(target) Release/obj.target/scrypt_wrapper.a COPY Release/scrypt_wrapper.a CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt.o CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt_smix.o CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/warnp.o CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/alg/sha256.o CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/insecure_memzero.o CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/scryptenc/scryptenc_cpuperf.o AR(target) Release/obj.target/scrypt_lib.a COPY Release/scrypt_lib.a CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_common.o CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h: In constructor ‘NodeScrypt::Params::Params(const v8::Local&)’: ../src/node-boilerplate/inc/scrypt_common.h:39:48: warning: ‘v8::Local v8::Object::Get(v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] N(obj->Get(Nan::New("N").ToLocalChecked())->Uint32Value()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3457:51: note: declared here V8_DEPRECATED("Use maybe version", Local Get(Local key)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h:39:63: error: no matching function for call to ‘v8::Value::Uint32Value()’ N(obj->Get(Nan::New("N").ToLocalChecked())->Uint32Value()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate: v8::Maybe v8::Value::Uint32Value(v8::Local) const V8_WARN_UNUSED_RESULT Maybe Uint32Value( ^~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h:40:48: warning: ‘v8::Local v8::Object::Get(v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] r(obj->Get(Nan::New("r").ToLocalChecked())->Uint32Value()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3457:51: note: declared here V8_DEPRECATED("Use maybe version", Local Get(Local key)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h:40:63: error: no matching function for call to ‘v8::Value::Uint32Value()’ r(obj->Get(Nan::New("r").ToLocalChecked())->Uint32Value()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate: v8::Maybe v8::Value::Uint32Value(v8::Local) const V8_WARN_UNUSED_RESULT Maybe Uint32Value( ^~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h:41:48: warning: ‘v8::Local v8::Object::Get(v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] p(obj->Get(Nan::New("p").ToLocalChecked())->Uint32Value()) {} ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3457:51: note: declared here V8_DEPRECATED("Use maybe version", Local Get(Local key)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:0, from ../src/node-boilerplate/inc/scrypt_params_async.h:28, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_common.h:41:63: error: no matching function for call to ‘v8::Value::Uint32Value()’ p(obj->Get(Nan::New("p").ToLocalChecked())->Uint32Value()) {} ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate: v8::Maybe v8::Value::Uint32Value(v8::Local) const V8_WARN_UNUSED_RESULT Maybe Uint32Value( ^~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2611:41: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28:0, from ../src/node-boilerplate/scrypt_params_async.cc:4: ../src/node-boilerplate/inc/scrypt_async.h: In member function ‘virtual void ScryptAsyncWorker::HandleErrorCallback()’: ../src/node-boilerplate/inc/scrypt_async.h:53:29: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations] callback->Call(1, argv); ^ In file included from ../src/node-boilerplate/scrypt_params_async.cc:1:0: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:0: ../src/node-boilerplate/inc/scrypt_params_async.h: In constructor ‘ScryptParamsAsyncWorker::ScryptParamsAsyncWorker(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/node-boilerplate/inc/scrypt_params_async.h:35:36: error: no matching function for call to ‘v8::Value::NumberValue()’ maxtime(info[0]->NumberValue()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2608:39: note: candidate: v8::Maybe v8::Value::NumberValue(v8::Local) const V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const; ^~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2608:39: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:0: ../src/node-boilerplate/inc/scrypt_params_async.h:36:39: error: no matching function for call to ‘v8::Value::NumberValue()’ maxmemfrac(info[1]->NumberValue()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2608:39: note: candidate: v8::Maybe v8::Value::NumberValue(v8::Local) const V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const; ^~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2608:39: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:0: ../src/node-boilerplate/inc/scrypt_params_async.h:37:36: error: no matching function for call to ‘v8::Value::IntegerValue()’ maxmem(info[2]->IntegerValue()), ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2609:40: note: candidate: v8::Maybe v8::Value::IntegerValue(v8::Local) const V8_WARN_UNUSED_RESULT Maybe IntegerValue( ^~~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2609:40: note: candidate expects 1 argument, 0 provided In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:0: ../src/node-boilerplate/inc/scrypt_params_async.h:38:39: error: no matching function for call to ‘v8::Value::IntegerValue()’ osfreemem(info[3]->IntegerValue()) ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:2609:40: note: candidate: v8::Maybe v8::Value::IntegerValue(v8::Local) const V8_WARN_UNUSED_RESULT Maybe IntegerValue( ^~~~ /root/.cache/node-gyp/12.13.1/include/node/v8.h:2609:40: note: candidate expects 1 argument, 0 provided ../src/node-boilerplate/scrypt_params_async.cc: In member function ‘virtual void ScryptParamsAsyncWorker::HandleOKCallback()’: ../src/node-boilerplate/scrypt_params_async.cc:23:67: warning: ‘bool v8::Object::Set(v8::Local, v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("N").ToLocalChecked(), Nan::New(logN)); ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3403:22: note: declared here bool Set(Local key, Local value)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ ../src/node-boilerplate/scrypt_params_async.cc:24:64: warning: ‘bool v8::Object::Set(v8::Local, v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("r").ToLocalChecked(), Nan::New(r)); ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3403:22: note: declared here bool Set(Local key, Local value)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ ../src/node-boilerplate/scrypt_params_async.cc:25:64: warning: ‘bool v8::Object::Set(v8::Local, v8::Local)’ is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("p").ToLocalChecked(), Nan::New(p)); ^ In file included from /root/.cache/node-gyp/12.13.1/include/node/v8-internal.h:14:0, from /root/.cache/node-gyp/12.13.1/include/node/v8.h:25, from /root/.cache/node-gyp/12.13.1/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/node-boilerplate/scrypt_params_async.cc:1: /root/.cache/node-gyp/12.13.1/include/node/v8.h:3403:22: note: declared here bool Set(Local key, Local value)); ^ /root/.cache/node-gyp/12.13.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ ../src/node-boilerplate/scrypt_params_async.cc:32:25: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations] callback->Call(2, argv); ^ In file included from ../src/node-boilerplate/scrypt_params_async.cc:1:0: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ scrypt.target.mk:129: recipe for target 'Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o' failed make: *** [Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o] Error 1 make: Leaving directory '/data/node-scrypt/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Linux 4.15.0-66-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "configure" "build" gyp ERR! cwd /data/node-scrypt gyp ERR! node -v v12.13.1 gyp ERR! node-gyp -v v6.0.1 gyp ERR! not ok

Myse1f commented 4 years ago

I have the same question. Have you solved it? @XieXiaomei-ptr

Divide-By-0 commented 4 years ago

@Myse1f @XieXiaomei-ptr seems that https://github.com/barrysteyn/node-scrypt/pull/197 resolves these problems, good to ask those w write access to this to merge it

peshrawahmed commented 4 years ago

Yeaaa Thanks man for reporting this issue and f*ck google search results for not showing this page in the first place! I Updated my node version to 12 and spend all the night pretending that it is an issue with my system. I am very sad. Ruined my all night.