electron / rebuild

Package to rebuild native Node.js modules against the currently installed Electron version
MIT License
1.02k stars 175 forks source link

Error rebuilding uws #141

Closed nolram88 closed 7 years ago

nolram88 commented 7 years ago

I'm probably doing this wrong. macos : 10.10.5 electron : 1.4.13 electron-rebuild : 1.5.6

I tried rebuilding the uws module for my project and I got tons of errors. I was able to successfully run node-gyp on uws prior to attempting an electron-rebuild

> electron-rebuild  -w uws

✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:337:54: error: too many arguments to function call, expected at most 2, have 4
    return v8::Signature::New(nan_isolate, receiver, argc, argv);
           ~~~~~~~~~~~~~~~~~~                        ^~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:4843:3: note: 'New' declared here
  static Local<Signature> New(
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:392:32: warning: 'CompileUnbound' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1299:45: note: 'CompileUnbound' has been explicitly marked deprecated here
                       Local<UnboundScript> CompileUnbound(
                                            ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:400:32: warning: 'CompileUnbound' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1299:45: note: 'CompileUnbound' has been explicitly marked deprecated here
                       Local<UnboundScript> CompileUnbound(
                                            ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:405:24: warning: 'NewExternal' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewExternal(nan_isolate, resource);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2352:38: note: 'NewExternal' has been explicitly marked deprecated here
                       Local<String> NewExternal(
                                     ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:409:19: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
      v8::String::ExternalAsciiStringResource *resource) {
      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ExternalStringResource
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2221:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:408:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../../nan/nan.h:403:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../../nan/nan.h:410:24: warning: 'NewExternal' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewExternal(nan_isolate, resource);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2352:38: note: 'NewExternal' has been explicitly marked deprecated here
                       Local<String> NewExternal(
                                     ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:415:31: warning: 'New' is deprecated [-Wdeprecated-declarations]
    return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                              ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:4030:56: note: 'New' has been explicitly marked deprecated here
  V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
                                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:427:3: error: redefinition of 'NanNew'
  NanNew<v8::StringObject, v8::Handle<v8::String> >(
  ^
../../nan/nan.h:420:3: note: previous definition is here
  NanNew<v8::StringObject, v8::Local<v8::String> >(
  ^
../../nan/nan.h:444:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:438:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:456:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:450:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:463:59: warning: 'ToUint32' is deprecated [-Wdeprecated-declarations]
    return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32();
                                                          ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8328:22: note: 'ToUint32' has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
                     ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:468:59: warning: 'ToUint32' is deprecated [-Wdeprecated-declarations]
    return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32();
                                                          ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8328:22: note: 'ToUint32' has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
                     ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:473:46: warning: 'ToInt32' is deprecated [-Wdeprecated-declarations]
    return v8::Int32::New(nan_isolate, val)->ToInt32();
                                             ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8334:21: note: 'ToInt32' has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
                    ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:478:46: warning: 'ToInt32' is deprecated [-Wdeprecated-declarations]
    return v8::Int32::New(nan_isolate, val)->ToInt32();
                                             ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8334:21: note: 'ToInt32' has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
                    ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:518:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:529:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:538:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(nan_isolate, arg);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:544:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(nan_isolate, arg);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:586:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:592:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:597:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:603:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:631:17: error: no template named 'WeakCallbackData' in namespace 'v8'; did you mean 'WeakCallbackInfo'?
      const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> >& data);
            ~~~~^~~~~~~~~~~~~~~~
                WeakCallbackInfo
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:6799:16: note: 'WeakCallbackInfo' declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:631:17: error: too many template arguments for class template 'WeakCallbackInfo'
      const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> >& data);
                ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:6799:16: note: template is declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:767:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:777:12: error: no matching function for call to 'New'
    return node::Buffer::New(nan_isolate, data, size);
           ^~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:56:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:44:40: note: candidate function not viable: no known conversion from 'const char *' to 'v8::Local<v8::String>' for 2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:41:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:49:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:781:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(nan_isolate, size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:218:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:218:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:222:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:788:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(nan_isolate, data, size);
           ~~~~~~~~~~~~~~^
../../nan/nan.h:814:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1319:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:821:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1319:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1728:12: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
  if (str->IsExternalAscii()) {
           ^~~~~~~~~~~~~~~
           IsExternal
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2183:8: note: 'IsExternal' declared here
  bool IsExternal() const;
       ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1729:23: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
    const v8::String::ExternalAsciiStringResource* ext;
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ExternalStringResource
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2221:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1730:16: error: no member named 'GetExternalAsciiStringResource' in 'v8::String'
    ext = str->GetExternalAsciiStringResource();
          ~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (userfolder/dev/meleelight/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "userfolder/dev/meleelight/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.13" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd userfolder/dev/meleelight/node_modules/peer/node_modules/ws
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 

Failed with exit code: 1

Error:   CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:337:54: error: too many arguments to function call, expected at most 2, have 4
    return v8::Signature::New(nan_isolate, receiver, argc, argv);
           ~~~~~~~~~~~~~~~~~~                        ^~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:4843:3: note: 'New' declared here
  static Local<Signature> New(
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:392:32: warning: 'CompileUnbound' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1299:45: note: 'CompileUnbound' has been explicitly marked deprecated here
                       Local<UnboundScript> CompileUnbound(
                                            ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:400:32: warning: 'CompileUnbound' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1299:45: note: 'CompileUnbound' has been explicitly marked deprecated here
                       Local<UnboundScript> CompileUnbound(
                                            ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:405:24: warning: 'NewExternal' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewExternal(nan_isolate, resource);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2352:38: note: 'NewExternal' has been explicitly marked deprecated here
                       Local<String> NewExternal(
                                     ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:409:19: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
      v8::String::ExternalAsciiStringResource *resource) {
      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ExternalStringResource
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2221:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:408:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../../nan/nan.h:403:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../../nan/nan.h:410:24: warning: 'NewExternal' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewExternal(nan_isolate, resource);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2352:38: note: 'NewExternal' has been explicitly marked deprecated here
                       Local<String> NewExternal(
                                     ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:415:31: warning: 'New' is deprecated [-Wdeprecated-declarations]
    return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                              ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:4030:56: note: 'New' has been explicitly marked deprecated here
  V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
                                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:427:3: error: redefinition of 'NanNew'
  NanNew<v8::StringObject, v8::Handle<v8::String> >(
  ^
../../nan/nan.h:420:3: note: previous definition is here
  NanNew<v8::StringObject, v8::Local<v8::String> >(
  ^
../../nan/nan.h:444:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:438:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:456:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:450:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../../nan/nan.h:463:59: warning: 'ToUint32' is deprecated [-Wdeprecated-declarations]
    return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32();
                                                          ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8328:22: note: 'ToUint32' has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
                     ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:468:59: warning: 'ToUint32' is deprecated [-Wdeprecated-declarations]
    return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32();
                                                          ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8328:22: note: 'ToUint32' has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
                     ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:473:46: warning: 'ToInt32' is deprecated [-Wdeprecated-declarations]
    return v8::Int32::New(nan_isolate, val)->ToInt32();
                                             ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8334:21: note: 'ToInt32' has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
                    ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:478:46: warning: 'ToInt32' is deprecated [-Wdeprecated-declarations]
    return v8::Int32::New(nan_isolate, val)->ToInt32();
                                             ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:8334:21: note: 'ToInt32' has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
                    ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:518:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:529:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:538:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(nan_isolate, arg);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:544:24: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
    return v8::String::NewFromOneByte(nan_isolate, arg);
                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2314:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
      Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:586:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:592:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:597:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:603:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:631:17: error: no template named 'WeakCallbackData' in namespace 'v8'; did you mean 'WeakCallbackInfo'?
      const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> >& data);
            ~~~~^~~~~~~~~~~~~~~~
                WeakCallbackInfo
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:6799:16: note: 'WeakCallbackInfo' declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:631:17: error: too many template arguments for class template 'WeakCallbackInfo'
      const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> >& data);
                ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:6799:16: note: template is declared here
  friend class WeakCallbackInfo;
               ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:767:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:777:12: error: no matching function for call to 'New'
    return node::Buffer::New(nan_isolate, data, size);
           ^~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:56:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:44:40: note: candidate function not viable: no known conversion from 'const char *' to 'v8::Local<v8::String>' for 2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:41:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/src/node_buffer.h:49:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:781:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(nan_isolate, size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:218:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:218:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:222:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:788:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(nan_isolate, data, size);
           ~~~~~~~~~~~~~~^
../../nan/nan.h:814:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1319:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:821:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(nan_isolate, &source);
                               ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:1319:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8config.h:336:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1728:12: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
  if (str->IsExternalAscii()) {
           ^~~~~~~~~~~~~~~
           IsExternal
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2183:8: note: 'IsExternal' declared here
  bool IsExternal() const;
       ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1729:23: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
    const v8::String::ExternalAsciiStringResource* ext;
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ExternalStringResource
userfolder/.electron-gyp/.node-gyp/iojs-1.4.13/deps/v8/include/v8.h:2221:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bufferutil.cc:15:
../../nan/nan.h:1730:16: error: no member named 'GetExternalAsciiStringResource' in 'v8::String'
    ext = str->GetExternalAsciiStringResource();
          ~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (userfolder/dev/meleelight/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "userfolder/dev/meleelight/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.13" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd userfolder/dev/meleelight/node_modules/peer/node_modules/ws
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 

Failed with exit code: 1
    at SafeSubscriber.obs.subscribe.e [as _error] (userfolder/dev/meleelight/node_modules/spawn-rx/lib/index.js:311:43)
    at SafeSubscriber.__tryOrUnsub (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:223:16)
    at SafeSubscriber.error (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:184:26)
    at Subscriber._error (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:128:26)
    at Subscriber.error (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:102:18)
    at MapSubscriber.Subscriber._error (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:128:26)
    at MapSubscriber.Subscriber.error (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:102:18)
    at SafeSubscriber.pipesClosed.subscribe [as _next] (userfolder/dev/meleelight/node_modules/spawn-rx/lib/index.js:284:42)
    at SafeSubscriber.__tryOrUnsub (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:223:16)
    at SafeSubscriber.next (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:172:22)
    at Subscriber._next (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:125:26)
    at Subscriber.next (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:89:18)
    at ReduceSubscriber._complete (userfolder/dev/meleelight/node_modules/rxjs/operator/reduce.js:116:30)
    at ReduceSubscriber.Subscriber.complete (userfolder/dev/meleelight/node_modules/rxjs/Subscriber.js:114:18)
    at MergeAllSubscriber.notifyComplete (userfolder/dev/meleelight/node_modules/rxjs/operator/mergeAll.js:105:30)
    at InnerSubscriber._complete (userfolder/dev/meleelight/node_modules/rxjs/InnerSubscriber.js:30:21)

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "rebuild"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! meleelight@0.0.1 rebuild: `electron-rebuild  -w uws`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the meleelight@0.0.1 rebuild script 'electron-rebuild  -w uws'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meleelight package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-rebuild  -w uws
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meleelight
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meleelight
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     userfolder/dev/meleelight/npm-debug.log
Marlons-MBP:meleelight marlonmckinnie$ 
nolram88 commented 7 years ago

looks like I solved it. I had to manually build the project with another compiler as the error suggested.

sakirtemel commented 7 years ago

@nolram88 could you please let me know how you've solved it? I'm having the same issue

anaisbetts commented 7 years ago

uws is using an outdated version of nan, they need to fix their shit

nolram88 commented 7 years ago

paulcbetts is right.

If you really want to try something. Run a node-gyp on uws with the 7.4 node runtime and rename the binary to match the electron abi. I haven't tried it. Its a shot in the dark. But thats the closest you'll get without contributing to uws.

sibelius commented 1 year ago

how to solve this?