Uniswap/v2-core

Error Building v2-core

blockchain-trainer opened this issue · 1 comments


yash@sampu:/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core$ yarn
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
[8/13] ⡀ scrypt
[-/13] ⡀ waiting...
[-/13] ⡀ waiting...
[-/13] ⡀ waiting...
warning Error running install script for optional dependency: "/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/scrypt: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/scrypt
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.18.1 | linux | x64
gyp info find Python using Python version 2.7.18 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/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 '/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/scrypt/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/yash/.cache/node-gyp/14.18.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=/home/yash/.cache/node-gyp/14.18.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/yash/.cache/node-gyp/14.18.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/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 ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/scrypt/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
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
2298 | , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
| ^
CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o
In file included from ../src/node-boilerplate/scrypt_params_async.cc:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
2298 | , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
| ^
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28,
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::Localv8::Object&)’:
../src/node-boilerplate/inc/scrypt_common.h:39:48: error: no matching function for call to ‘v8::Object::Get(v8::Localv8::String)’
39 | N(obj->Get(Nan::New("N").ToLocalChecked())->Uint32Value()),
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, v8::Localv8::Value)’
3717 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate expects 2 arguments, 1 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, uint32_t)’
3720 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate expects 2 arguments, 1 provided
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28,
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: error: no matching function for call to ‘v8::Object::Get(v8::Localv8::String)’
40 | r(obj->Get(Nan::New("r").ToLocalChecked())->Uint32Value()),
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, v8::Localv8::Value)’
3717 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate expects 2 arguments, 1 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, uint32_t)’
3720 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate expects 2 arguments, 1 provided
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28,
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: error: no matching function for call to ‘v8::Object::Get(v8::Localv8::String)’
41 | p(obj->Get(Nan::New("p").ToLocalChecked())->Uint32Value()) {}
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, v8::Localv8::Value)’
3717 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate expects 2 arguments, 1 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocalv8::Value v8::Object::Get(v8::Localv8::Context, uint32_t)’
3720 | V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate expects 2 arguments, 1 provided
In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28,
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::Localv8::Value Nan::Callback::Call(int, v8::Localv8::Value) const’ is deprecated [-Wdeprecated-declarations]
53 | callback->Call(1, argv);
| ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:1:
../../nan/nan.h:1740:3: note: declared here
1740 | Call(int argc, v8::Localv8::Value argv[]) const {
| ^~~~
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../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()’
35 | maxtime(info[0]->NumberValue()),
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2861:39: note: candidate: ‘v8::Maybe v8::Value::NumberValue(v8::Localv8::Context) const’
2861 | V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const;
| ^~~~~~~~~~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2861:39: note: candidate expects 1 argument, 0 provided
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:36:39: error: no matching function for call to ‘v8::Value::NumberValue()’
36 | maxmemfrac(info[1]->NumberValue()),
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2861:39: note: candidate: ‘v8::Maybe v8::Value::NumberValue(v8::Localv8::Context) const’
2861 | V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const;
| ^~~~~~~~~~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2861:39: note: candidate expects 1 argument, 0 provided
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:37:36: error: no matching function for call to ‘v8::Value::IntegerValue()’
37 | maxmem(info[2]->IntegerValue()),
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2863:40: note: candidate: ‘v8::Maybe v8::Value::IntegerValue(v8::Localv8::Context) const’
2863 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
| ^~~~~~~~~~~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2863:40: note: candidate expects 1 argument, 0 provided
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:38:39: error: no matching function for call to ‘v8::Value::IntegerValue()’
38 | osfreemem(info[3]->IntegerValue())
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2863:40: note: candidate: ‘v8::Maybe v8::Value::IntegerValue(v8::Localv8::Context) const’
2863 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
| ^~~~~~~~~~~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:2863: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: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Integer::return_t)’
23 | obj->Set(Nan::New("N").ToLocalChecked(), Nan::New(logN));
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)’
3670 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)’
3673 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/node-boilerplate/scrypt_params_async.cc:24:64: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Integer::return_t)’
24 | obj->Set(Nan::New("r").ToLocalChecked(), Nan::New(r));
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)’
3670 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)’
3673 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/node-boilerplate/scrypt_params_async.cc:25:64: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Integer::return_t)’
25 | obj->Set(Nan::New("p").ToLocalChecked(), Nan::New(p));
| ^
In file included from /home/yash/.cache/node-gyp/14.18.1/include/node/node.h:67,
from ../../nan/nan.h:54,
from ../src/node-boilerplate/scrypt_params_async.cc:1:
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)’
3670 | V8_WARN_UNUSED_RESULT Maybe Set(Local context,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate: ‘v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)’
3673 | V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
| ^~~
/home/yash/.cache/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/node-boilerplate/scrypt_params_async.cc:32:25: warning: ‘v8::Localv8::Value Nan::Callback::Call(int, v8::Localv8::Value
) const’ is deprecated [-Wdeprecated-declarations]
32 | callback->Call(2, argv);
| ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:1:
../../nan/nan.h:1740:3: note: declared here
1740 | Call(int argc, v8::Localv8::Value argv[]) const {
| ^~~~
make: *** [scrypt.target.mk:131: Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o] Error 1
make: Leaving directory '/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/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/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 5.11.0-40-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core/node_modules/scrypt
warning Your current version of Yarn is out of date. The latest version is "1.22.17", while you're on "1.22.15".
info To upgrade, run the following command:
$ sudo apt-get update && sudo apt-get install yarn
Done in 30.30s.
yash@sampu:/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core$ node -v
v14.18.1
yash@sampu:/media/yash/fc51dc5b-56d1-4d01-8310-d7b0048238d5/block8/swap8/v2-core/v2-core$

Use:

yarn config set legacy-peer-deps true