SilentCicero / ethereumjs-accounts

A simple module for creating, managing and using Ethereum accounts in browser.
MIT License
150 stars 58 forks source link

problem for installing the lib from npm #22

Closed helxsz closed 6 years ago

helxsz commented 6 years ago

Installing etherumjs-accounts give me such issue log shown as below

> secp256k1@0.0.15 install /home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1
> node-gyp rebuild

make: Entering directory `/home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1/build'
  CXX(target) Release/obj.target/secp256k1/secp256k1.o
cc1plus: warning: command line option ‘-std=c11’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from ../../nan/nan.h:111:0,
                 from ../secp256k1.cc:1:
../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Int32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’:
../../nan/nan_new.h:34:64: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:9614): Use maybe version [-Wdeprecated-declarations]
 To<v8::Int32>(v8::Handle<v8::Integer> i)   { return i->ToInt32(); }
                                                                ^
../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Uint32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’:
../../nan/nan_new.h:39:65: warning: ‘v8::Local<v8::Uint32> v8::Value::ToUint32() const’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:9608): Use maybe version [-Wdeprecated-declarations]
 To<v8::Uint32>(v8::Handle<v8::Integer> i)  { return i->ToUint32(); }
                                                                 ^
In file included from ../../nan/nan_new.h:191:0,
                 from ../../nan/nan.h:111,
                 from ../secp256k1.cc:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../../nan/nan_implementation_12_inl.h:49:38: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:4749): Pass an isolate [-Wdeprecated-declarations]
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                      ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:166:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
                                                                     ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:173:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
                                                                     ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(const uint8_t*, int)’:
../../nan/nan_implementation_12_inl.h:206:42: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:2624): Use maybe version [-Wdeprecated-declarations]
         v8::String::kNormalString, length);
                                          ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(v8::String::ExternalStringResource*)’:
../../nan/nan_implementation_12_inl.h:217:66: warning: ‘static v8::Local<v8::String> v8::String::NewExternal(v8::Isolate*, v8::String::ExternalStringResource*)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:2663): Use maybe version [-Wdeprecated-declarations]
   return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
                                                                  ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:237:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1359): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
                                                                            ^
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:244:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1359): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
                                                                            ^
In file included from ../secp256k1.cc:1:0:
../../nan/nan.h: At global scope:
../../nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                           ^
../../nan/nan.h:319:17: error: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here
   v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                 ^
../../nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                           ^
../../nan/nan.h:334:27: error: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                           ^
../../nan/nan.h: In function ‘bool NanIdleNotification(int)’:
../../nan/nan.h:374:71: warning: ‘bool v8::Isolate::IdleNotification(int)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:7334): use IdleNotificationDeadline() [-Wdeprecated-declarations]
     return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
                                                                       ^
../../nan/nan.h: At global scope:
../../nan/nan.h:560:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../../nan/nan.h:560:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../../nan/nan.h:561:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:566:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../../nan/nan.h:566:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../../nan/nan.h:571:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../../nan/nan.h:571:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../../nan/nan.h:572:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:577:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../../nan/nan.h:577:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
../../nan/nan.h:659:11: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a type
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
           ^
../../nan/nan.h:659:15: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
               ^
../../nan/nan.h:659:31: error: expected ‘,’ or ‘...’ before ‘<’ token
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
                               ^
../../nan/nan.h: In function ‘void _NanWeakCallbackDispatcher(int)’:
../../nan/nan.h:660:42: error: ‘data’ was not declared in this scope
       _NanWeakCallbackInfo<T, P> *info = data.GetParameter();
                                          ^
../../nan/nan.h: At global scope:
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../../nan/nan.h:25:0,
                 from ../secp256k1.cc:1:
/root/.node-gyp/8.6.0/include/node/node_buffer.h:67:40: error:   initializing argument 2 of ‘v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t)’ [-fpermissive]
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
In file included from ../secp256k1.cc:1:0:
../../nan/nan.h:768:67: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char*)data), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../../nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan.h:806:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations]
     return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                                                                          ^
../../nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>)’:
../../nan/nan.h:813:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations]
     return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                                                                          ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:769:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
make: *** [Release/obj.target/secp256k1/secp256k1.o] Error 1
make: Leaving directory `/home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1/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:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-83-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 /home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

any idea?

SilentCicero commented 6 years ago

This library is depreciated, you can use it to get a jist of account creation but I recommend using ethjs or ethereumjs for account generation and tx signing.

Sent from my iPhone

On Nov 25, 2017, at 9:14 AM, xsz notifications@github.com wrote:

Installing etherumjs-accounts give me such issue log shown as below

secp256k1@0.0.15 install /home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1 node-gyp rebuild

make: Entering directory /home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1/build' CXX(target) Release/obj.target/secp256k1/secp256k1.o cc1plus: warning: command line option ‘-std=c11’ is valid for C/ObjC but not for C++ [enabled by default] In file included from ../../nan/nan.h:111:0, from ../secp256k1.cc:1: ../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Int32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’: ../../nan/nan_new.h:34:64: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:9614): Use maybe version [-Wdeprecated-declarations] To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); } ^ ../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Uint32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’: ../../nan/nan_new.h:39:65: warning: ‘v8::Local<v8::Uint32> v8::Value::ToUint32() const’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:9608): Use maybe version [-Wdeprecated-declarations] To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); } ^ In file included from ../../nan/nan_new.h:191:0, from ../../nan/nan.h:111, from ../secp256k1.cc:1: ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’: ../../nan/nan_implementation_12_inl.h:49:38: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:4749): Pass an isolate [-Wdeprecated-declarations] return v8::BooleanObject::New(value).As<v8::BooleanObject>(); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>)’: ../../nan/nan_implementation_12_inl.h:166:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’: ../../nan/nan_implementation_12_inl.h:173:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(const uint8_t*, int)’: ../../nan/nan_implementation_12_inl.h:206:42: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:2624): Use maybe version [-Wdeprecated-declarations] v8::String::kNormalString, length); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(v8::String::ExternalStringResource*)’: ../../nan/nan_implementation_12_inl.h:217:66: warning: ‘static v8::Local<v8::String> v8::String::NewExternal(v8::Isolate*, v8::String::ExternalStringResource*)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:2663): Use maybe version [-Wdeprecated-declarations] return v8::String::NewExternal(v8::Isolate::GetCurrent(), value); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>)’: ../../nan/nan_implementation_12_inl.h:237:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1359): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src); ^ ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’: ../../nan/nan_implementation_12_inl.h:244:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1359): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src); ^ In file included from ../secp256k1.cc:1:0: ../../nan/nan.h: At global scope: ../../nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’ NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) { ^ ../../nan/nan.h:319:17: error: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) { ^ ../../nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’ NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) { ^ ../../nan/nan.h:334:27: error: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) { ^ ../../nan/nan.h: In function ‘bool NanIdleNotification(int)’: ../../nan/nan.h:374:71: warning: ‘bool v8::Isolate::IdleNotification(int)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:7334): use IdleNotificationDeadline() [-Wdeprecated-declarations] return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms); ^ ../../nan/nan.h: At global scope: ../../nan/nan.h:560:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void v8::Isolate::GCEpilogueCallback callback ^ ../../nan/nan.h:560:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’ v8::Isolate::GCEpilogueCallback callback ^ ../../nan/nan.h:561:18: error: expected primary-expression before ‘gc_type_filter’ , v8::GCType gc_type_filter = v8::kGCTypeAll) { ^ ../../nan/nan.h:566:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void v8::Isolate::GCEpilogueCallback callback) { ^ ../../nan/nan.h:566:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’ v8::Isolate::GCEpilogueCallback callback) { ^ ../../nan/nan.h:571:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void v8::Isolate::GCPrologueCallback callback ^ ../../nan/nan.h:571:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’ v8::Isolate::GCPrologueCallback callback ^ ../../nan/nan.h:572:18: error: expected primary-expression before ‘gc_type_filter’ , v8::GCType gc_type_filter = v8::kGCTypeAll) { ^ ../../nan/nan.h:577:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void v8::Isolate::GCPrologueCallback callback) { ^ ../../nan/nan.h:577:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’ v8::Isolate::GCPrologueCallback callback) { ^ ../../nan/nan.h:659:11: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a type const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) { ^ ../../nan/nan.h:659:15: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive] const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) { ^ ../../nan/nan.h:659:31: error: expected ‘,’ or ‘...’ before ‘<’ token const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) { ^ ../../nan/nan.h: In function ‘void _NanWeakCallbackDispatcher(int)’: ../../nan/nan.h:660:42: error: ‘data’ was not declared in this scope _NanWeakCallbackInfo<T, P> *info = data.GetParameter(); ^ ../../nan/nan.h: At global scope: ../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’: ../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: ../../nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ In file included from ../../nan/nan.h:25:0, from ../secp256k1.cc:1: /root/.node-gyp/8.6.0/include/node/node_buffer.h:67:40: error: initializing argument 2 of ‘v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t)’ [-fpermissive] NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, ^ In file included from ../secp256k1.cc:1:0: ../../nan/nan.h:768:67: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char*)data), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: ../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: ../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>, const v8::ScriptOrigin&)’: ../../nan/nan.h:806:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>)’: ../../nan/nan.h:813:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /root/.node-gyp/8.6.0/include/node/v8.h:1378): Use maybe version [-Wdeprecated-declarations] return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: ../../nan/nan.h:769:3: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [Release/obj.target/secp256k1/secp256k1.o] Error 1 make: Leaving directory/home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1/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:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 4.4.0-83-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 /home/sizhexi/parking/eth/ngx-admin-master/node_modules/ethereumjs-accounts/node_modules/secp256k1 gyp ERR! node -v v8.6.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok any idea?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

helxsz commented 6 years ago

thanks.