nodejs 编译multi-hashing失败,看上去是nan的问题

mia0x75 发布于 01/13 12:01
阅读 232
收藏 0

make: Entering directory `/opt/pool/node_modules/multi-hashing/build'
  CXX(target) Release/obj.target/multihashing/multihashing.o
In file included from ../node_modules/nan/nan.h:111:0,
                 from ../multihashing.cc:5:
../node_modules/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>]’:
../node_modules/nan/nan_new.h:34:64: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /root/.node-gyp/8.9.4/include/node/v8.h:9743): Use maybe version [-Wdeprecated-declarations]
 To<v8::Int32>(v8::Handle<v8::Integer> i)   { return i->ToInt32(); }
                                                                ^
../node_modules/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>]’:
../node_modules/nan/nan_new.h:39:65: warning: ‘v8::Local<v8::Uint32> v8::Value::ToUint32() const’ is deprecated (declared at /root/.node-gyp/8.9.4/include/node/v8.h:9737): Use maybe version [-Wdeprecated-declarations]
 To<v8::Uint32>(v8::Handle<v8::Integer> i)  { return i->ToUint32(); }
                                                                 ^
In file included from ../node_modules/nan/nan_new.h:191:0,
                 from ../node_modules/nan/nan.h:111,
                 from ../multihashing.cc:5:
../node_modules/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)’:
../node_modules/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.9.4/include/node/v8.h:4793): Pass an isolate [-Wdeprecated-declarations]
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                      ^
../node_modules/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>)’:
../node_modules/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.9.4/include/node/v8.h:1422): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
                                                                     ^
../node_modules/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&)’:
../node_modules/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.9.4/include/node/v8.h:1422): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
                                                                     ^
../node_modules/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)’:
../node_modules/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.9.4/include/node/v8.h:2668): Use maybe version [-Wdeprecated-declarations]
         v8::String::kNormalString, length);
                                          ^
../node_modules/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*)’:
../node_modules/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.9.4/include/node/v8.h:2707): Use maybe version [-Wdeprecated-declarations]
   return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
                                                                  ^
../node_modules/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>)’:
../node_modules/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.9.4/include/node/v8.h:1403): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
                                                                            ^
../node_modules/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&)’:
../node_modules/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.9.4/include/node/v8.h:1403): Use maybe version [-Wdeprecated-declarations]
   return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
                                                                            ^
In file included from ../multihashing.cc:5:0:
../node_modules/nan/nan.h: At global scope:
../node_modules/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) {
                           ^
../node_modules/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) {
                 ^
../node_modules/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) {
                           ^
../node_modules/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) {
                           ^
../node_modules/nan/nan.h: In function ‘bool NanIdleNotification(int)’:
../node_modules/nan/nan.h:374:71: warning: ‘bool v8::Isolate::IdleNotification(int)’ is deprecated (declared at /root/.node-gyp/8.9.4/include/node/v8.h:7428): use IdleNotificationDeadline() [-Wdeprecated-declarations]
     return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
                                                                       ^
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:560:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../node_modules/nan/nan.h:560:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../node_modules/nan/nan.h:561:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:566:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../node_modules/nan/nan.h:566:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../node_modules/nan/nan.h:571:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../node_modules/nan/nan.h:571:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../node_modules/nan/nan.h:572:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:577:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../node_modules/nan/nan.h:577:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
../node_modules/nan/nan.h:659:11: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a type
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
           ^
../node_modules/nan/nan.h:659:15: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
               ^
../node_modules/nan/nan.h:659:31: error: expected ‘,’ or ‘...’ before ‘<’ token
     const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
                               ^
../node_modules/nan/nan.h: In function ‘void _NanWeakCallbackDispatcher(int)’:
../node_modules/nan/nan.h:660:42: error: ‘data’ was not declared in this scope
       _NanWeakCallbackInfo<T, P> *info = data.GetParameter();
                                          ^
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/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 ../multihashing.cc:2:0:
/root/.node-gyp/8.9.4/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 ../multihashing.cc:5:0:
../node_modules/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);
                                                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/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);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../node_modules/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.9.4/include/node/v8.h:1422): Use maybe version [-Wdeprecated-declarations]
     return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                                                                          ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>)’:
../node_modules/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.9.4/include/node/v8.h:1422): Use maybe version [-Wdeprecated-declarations]
     return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                                                                          ^
../multihashing.cc: In function ‘void boolberry(const v8::FunctionCallbackInfo<v8::Value>&)’:
../multihashing.cc:489:83: error: base operand of ‘->’ has non-pointer type ‘v8::MaybeLocal<v8::Uint32>’
             height = args[2]->ToUint32(Isolate::GetCurrent()->GetCurrentContext())->Uint32Value();
                                                                                   ^
In file included from ../multihashing.cc:5:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:769:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
make: *** [Release/obj.target/multihashing/multihashing.o] Error 1
make: Leaving directory `/opt/pool/node_modules/multi-hashing/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 emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-693.11.6.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/pool/node_modules/multi-hashing
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! multi-hashing@0.0.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the multi-hashing@0.0.9 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-01-13T03_54_16_850Z-debug.log

 

加载中
返回顶部
顶部