Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp install failed #50

Open
naueramant opened this issue Jul 27, 2016 · 3 comments
Open

gyp install failed #50

naueramant opened this issue Jul 27, 2016 · 3 comments

Comments

@naueramant
Copy link

My npm install fails with the following error

nauer ~ $ sudo npm install -g nwm
/usr/local/bin/nwm -> /usr/local/lib/node_modules/nwm/bin/nwm

> [email protected] install /usr/local/lib/node_modules/nwm
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.2.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/nwm/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/nwm/build'
  CC(target) Release/obj.target/listc/src/nwm/list.o
  AR(target) Release/obj.target/listc.a
  COPY Release/listc.a
  CC(target) Release/obj.target/nwmc/src/nwm/nwm.o
../src/nwm/nwm.c: In function ‘nwm_scan_monitors’:
../src/nwm/nwm.c:492:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(nwm.total_monitors <= nn) {
                         ^~
../src/nwm/nwm.c:504:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if(i >= nwm.total_monitors) {
            ^~
../src/nwm/nwm.c:515:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i = nn; i < nwm.total_monitors; i++) {
                   ^
../src/nwm/nwm.c: In function ‘event_clientmessage’:
../src/nwm/nwm.c:599:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(cme->message_type == NetWMState && cme->data.l[1] == NetWMFullscreen) {
                                                        ^~
../src/nwm/nwm.c: In function ‘event_keypress’:
../src/nwm/nwm.c:711:3: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
   keysym = XKeycodeToKeysym(nwm.dpy, (KeyCode)ev->keycode, 0);
   ^~~~~~
In file included from ../src/nwm/nwm.c:14:0:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 extern KeySym XKeycodeToKeysym(
               ^~~~~~~~~~~~~~~~
  AR(target) Release/obj.target/nwmc.a
  COPY Release/nwmc.a
  CXX(target) Release/obj.target/nwm/src/nwm/nwm_node.o
In file included from ../node_modules/nan/nan.h:182:0,
                 from ../src/nwm/nwm_node.cc:1:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array>, uint32_t)’:
../node_modules/nan/nan_maybe_43_inl.h:221:58: warning: ‘v8::MaybeLocal<v8::Object> v8::Array::CloneElementAt(v8::Local<v8::Context>, uint32_t)’ is deprecated: Cloning is not supported. [-Wdeprecated-declarations]
   return array->CloneElementAt(GetCurrentContext(), index);
                                                          ^
In file included from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:24,
                 from ../src/nwm/nwm_node.cc:1:
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:3012:36: note: declared here
                 MaybeLocal<Object> CloneElementAt(Local<Context> context,
                                    ^
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:188,
                 from ../src/nwm/nwm_node.cc:1:
../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:40:38: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated: Pass an isolate [-Wdeprecated-declarations]
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                      ^
In file included from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:24,
                 from ../src/nwm/nwm_node.cc:1:
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:3976:56: note: declared here
   V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
                                                        ^
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nwm/nwm_node.cc:1:0:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:590:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:590:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^~
../node_modules/nan/nan.h:591:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../node_modules/nan/nan.h:596:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:596:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^~
../node_modules/nan/nan.h:601:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:601:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^~
../node_modules/nan/nan.h:602:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../node_modules/nan/nan.h:607:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:607:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^~
../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:1933:16: warning: ‘bool v8::Object::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     , attribute);
                ^
In file included from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:24,
                 from ../src/nwm/nwm_node.cc:1:
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8.h:2736:22: note: declared here
                 bool SetAccessor(Local<Name> name,
                      ^
/usr/local/lib/node_modules/nwm/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
nwm.target.mk:97: recipe for target 'Release/obj.target/nwm/src/nwm/nwm_node.o' failed
make: *** [Release/obj.target/nwm/src/nwm/nwm_node.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/nwm/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: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:204:12)
gyp ERR! System Linux 4.5.4-1-ARCH
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 /usr/local/lib/node_modules/nwm
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 4.5.4-1-ARCH
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "nwm"
npm ERR! node v6.2.2
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
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 nwm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nwm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nwm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/nauer/npm-debug.log

Platform: Arch Linux

@mixu
Copy link
Owner

mixu commented Jul 27, 2016

I haven't tested nwm on node 6 yet. You might try cloning the repo directly, upgrading nan to a more recent version (npm install --save nan@latest) and then doing npm install -g in the repo. If that doesn't work, a few small src/nwm/nwm.cc edits might be needed to get it work with the latest nan. Happy to accept a PR if that works, otherwise I'll look into it when I have chance... which is probably a bit later.

@mikield
Copy link

mikield commented Oct 27, 2016

@mixu, updating nan to latest version helped.

@lucasdu4rte
Copy link

i'm have a same problem, but "nan" not helped me.

Yarn version:
1.5.1

Node version:
8.9.4

Platform:
linux x64

 gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  make: Entering directory '/home/lucas/apps/hermes/node_modules/contextify/build'
    CXX(target) Release/obj.target/contextify/src/contextify.o
  ../src/contextify.cc: In static member function ‘static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)’:
  ../src/contextify.cc:131:68: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           Local<Object> wrapper = Nan::New(constructor)->NewInstance();
                                                                      ^
  In file included from /home/lucas/.node-gyp/8.9.4/include/node/v8.h:26:0,
                   from /home/lucas/.node-gyp/8.9.4/include/node/node.h:63,
                   from ../src/contextify.cc:1:
  /home/lucas/.node-gyp/8.9.4/include/node/v8.h:3836:52: note: declared here
     V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                      ^
  /home/lucas/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
     declarator __attribute__((deprecated(message)))
     ^~~~~~~~~~
  ../src/contextify.cc:150:16: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessCheckCallbacks’; did you mean ‘SetAccessCheckCallback’?
           otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
                  ^~~~~~~~~~~~~~~~~~~~~~~
  ../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyGetter(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&)’:
  ../src/contextify.cc:182:80: warning: ‘v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           Local<Value> rv = Nan::New(ctx->sandbox)->GetRealNamedProperty(property);
                                                                                  ^
  In file included from /home/lucas/.node-gyp/8.9.4/include/node/v8.h:26:0,
                   from /home/lucas/.node-gyp/8.9.4/include/node/node.h:63,
                   from ../src/contextify.cc:1:
  /home/lucas/.node-gyp/8.9.4/include/node/v8.h:3389:30: note: declared here
                   Local<Value> GetRealNamedProperty(Local<String> key));
                                ^
  /home/lucas/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
     declarator __attribute__((deprecated(message)))
     ^~~~~~~~~~
  ../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyQuery(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&)’:
  ../src/contextify.cc:209:67: warning: ‘v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           if (!Nan::New(ctx->sandbox)->GetRealNamedProperty(property).IsEmpty() ||
                                                                     ^
  In file included from /home/lucas/.node-gyp/8.9.4/include/node/v8.h:26:0,
                   from /home/lucas/.node-gyp/8.9.4/include/node/node.h:63,
                   from ../src/contextify.cc:1:
  /home/lucas/.node-gyp/8.9.4/include/node/v8.h:3389:30: note: declared here
                   Local<Value> GetRealNamedProperty(Local<String> key));
                                ^
  /home/lucas/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
     declarator __attribute__((deprecated(message)))
     ^~~~~~~~~~
  ../src/contextify.cc:210:71: warning: ‘v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
               !Nan::New(ctx->proxyGlobal)->GetRealNamedProperty(property).IsEmpty()) {
                                                                         ^
  In file included from /home/lucas/.node-gyp/8.9.4/include/node/v8.h:26:0,
                   from /home/lucas/.node-gyp/8.9.4/include/node/node.h:63,
                   from ../src/contextify.cc:1:
  /home/lucas/.node-gyp/8.9.4/include/node/v8.h:3389:30: note: declared here
                   Local<Value> GetRealNamedProperty(Local<String> key));
                                ^
  /home/lucas/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
     declarator __attribute__((deprecated(message)))
     ^~~~~~~~~~
  contextify.target.mk:95: recipe for target 'Release/obj.target/contextify/src/contextify.o' failed
  make: Leaving directory '/home/lucas/apps/hermes/node_modules/contextify/build'
  make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
  gyp ERR! build error 
  gyp ERR! stack Error: `make` failed with exit code: 2
  gyp ERR! stack     at ChildProcess.onExit (/home/lucas/.nvm/versions/node/v8.9.4/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 4.14.0-deepin2-amd64
  gyp ERR! command "/home/lucas/.nvm/versions/node/v8.9.4/bin/node" "/home/lucas/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /home/lucas/apps/hermes/node_modules/contextify
  gyp ERR! node -v v8.9.4
  gyp ERR! node-gyp -v v3.6.2
  gyp ERR! not ok
      at ProcessTermError.MessageError (/usr/share/yarn/lib/cli.js:186:110)
      at new ProcessTermError (/usr/share/yarn/lib/cli.js:226:113)
      at ChildProcess.<anonymous> (/usr/share/yarn/lib/cli.js:30281:17)
      at emitTwo (events.js:126:13)
      at ChildProcess.emit (events.js:214:7)
      at maybeClose (internal/child_process.js:925:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants