-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Followed the instructions and ran
- npm install -g node-gyp
- sudo apt-get install build-essential
- npm install
During npm install, there is an error building sha3. How can we fix this?
Running node v10.4,0, npm v6.1.0, Ubuntu 18.04
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> [email protected] install /root/tokenpool/node_modules/sha3
> node-gyp rebuild
make: Entering directory '/root/tokenpool/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:
/root/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.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:
/root/.node-gyp/10.4.0/include/node/node.h:165:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.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:
/root/.node-gyp/10.4.0/include/node/node.h:158:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.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:
/root/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.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:49:23: warning: ‘new’ of type ‘SHA3Hash’ with extended alignment 32 [-Waligned-new=]
obj = new SHA3Hash();
^
../src/addon.cpp:49:23: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
../src/addon.cpp:49:23: note: use ‘-faligned-new’ to enable C++17 over-aligned new support
../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 /root/.node-gyp/10.4.0/include/node/node.h:63:0,
from ../src/addon.cpp:1:
/root/.node-gyp/10.4.0/include/node/v8.h:3905: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(
^~~~~~~~~~~
/root/.node-gyp/10.4.0/include/node/v8.h:3905:44: note: candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.4.0/include/node/v8.h:3908:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.4.0/include/node/v8.h:3908:44: note: candidate expects 1 argument, 2 provided
sha3.target.mk:99: recipe for target 'Release/obj.target/sha3/src/addon.o' failed
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
make: Leaving directory '/root/tokenpool/node_modules/sha3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.15.0-22-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/tokenpool/node_modules/sha3
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0-beta.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] scripts['server'] should probably be scripts['start'].
npm WARN The package mocha is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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! /root/.npm/_logs/2018-06-06T16_37_55_183Z-debug.log
Here is debug.log:
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ └── [email protected]
2229 silly saveTree ├─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ └─┬ [email protected]
2229 silly saveTree │ │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ └── [email protected]
2229 silly saveTree └── [email protected]
2230 warn [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
2231 warn [email protected] requires a peer of webpack@^4.0.0-beta.1 but none is installed. You must install peer dependencies yourself.
2232 warn [email protected] No repository field.
2233 warn [email protected] scripts['server'] should probably be scripts['start'].
2234 warn The package mocha is included as both a dev and production dependency.
2235 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
2236 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2238 verbose stack Error: [email protected] install: `node-gyp rebuild`
2238 verbose stack Exit status 1
2238 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
2238 verbose stack at EventEmitter.emit (events.js:182:13)
2238 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2238 verbose stack at ChildProcess.emit (events.js:182:13)
2238 verbose stack at maybeClose (internal/child_process.js:961:16)
2238 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
2239 verbose pkgid [email protected]
2240 verbose cwd /root/tokenpool
2241 verbose Linux 4.15.0-22-generic
2242 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
2243 verbose node v10.4.0
2244 verbose npm v6.1.0
2245 error code ELIFECYCLE
2246 error errno 1
2247 error [email protected] install: `node-gyp rebuild`
2247 error Exit status 1
2248 error Failed at the [email protected] install script.
2248 error This is probably not a problem with npm. There is likely additional logging output above.
2249 verbose exit [ 1, true ]
Metadata
Metadata
Assignees
Labels
No labels