MirrorX icon indicating copy to clipboard operation
MirrorX copied to clipboard

gyp ERR! build error

Open zhouzhou84 opened this issue 7 years ago • 2 comments

After git clone the MirrorX using git clone https://github.com/mvanderh/MirrorX.git,and then cd MirrorX.But when I use yarn install .there is something wrong:

ubuntu@ip-172-31-15-69:~/MirrorX$ yarn install
yarn install v1.9.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[---------------------------------------------------------------------------------] 0/383(node:4656) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/6] ⠂ keccak
[2/6] ⠂ secp256k1
[3/6] ⠂ ed25519
[4/6] ⠂ sha3
error /home/ubuntu/MirrorX/node_modules/sha3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/ubuntu/MirrorX/node_modules/sha3
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/ubuntu/nodejs/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   '/home/ubuntu/MirrorX/node_modules/sha3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ubuntu/nodejs/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ubuntu/.node-gyp/10.8.0/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/ubuntu/.node-gyp/10.8.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/ubuntu/nodejs/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/ubuntu/.node-gyp/10.8.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/ubuntu/MirrorX/node_modules/sha3',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/ubuntu/MirrorX/node_modules/sha3/build'
  CXX(target) Release/obj.target/sha3/src/addon.o
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:840:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../src/addon.cpp:1:0:
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:855:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../src/addon.cpp:1:0:
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:165:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:870:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../src/addon.cpp:1:0:
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:158:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../../nan/nan.h:1484:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../src/addon.cpp:1:0:
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/ubuntu/.node-gyp/10.8.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
../src/addon.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE SHA3Hash::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/addon.cpp:59:58: error: no matching function for call to ‘v8::Function::NewInstance(const int&, v8::Local<v8::Value> [1])’
    info.GetReturnValue().Set(cons->NewInstance(argc, argv));
                                                          ^
In file included from /home/ubuntu/.node-gyp/10.8.0/include/node/node.h:63:0,
                 from ../src/addon.cpp:1:
/home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3953:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3953:44: note:   candidate expects 3 arguments, 2 provided
/home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3956:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/ubuntu/.node-gyp/10.8.0/include/node/v8.h:3956:44: note:   candidate expects 1 argument, 2 provided
sha3.target.mk:105: recipe for target 'Release/obj.target/sha3/src/addon.o' failed
make: Leaving directory '/home/ubuntu/MirrorX/node_modules/sha3/build'
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ubuntu/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! System Linux 4.4.0-1061-aws
gyp ERR! command "/home/ubuntu/nodejs/bin/node" "/home/ubuntu/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/MirrorX/node_modules/sha3

zhouzhou84 avatar Aug 07 '18 07:08 zhouzhou84

Hey @zhouzhou84,

Looks like the sha3 package is failing to build. Other people are having issues with it too: https://github.com/phusion/node-sha3/issues/27 https://github.com/phusion/node-sha3/issues/32

Which node version are you using?

mitchelljustin avatar Aug 08 '18 18:08 mitchelljustin

ubuntu@ip-172-31-15-69:~$ node -v
v10.8.0

zhouzhou84 avatar Aug 09 '18 00:08 zhouzhou84