node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Ubuntu 12: binding.gyp not found when running node-gyp configure

Open jcollum opened this issue 13 years ago • 58 comments

13:59 vmplanet@ubuntu /usr/lib/node_modules/node-gyp $ sudo node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn python
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/vmplanet/.node-gyp/0.10.2/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/vmplanet/.node-gyp/0.10.2',
gyp info spawn args   '-Dmodule_root_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /usr/lib/node_modules/node-gyp) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Linux 3.2.0-39-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /usr/lib/node_modules/node-gyp
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok

14:00 vmplanet@ubuntu /usr/lib/node_modules/node-gyp $ which python
/usr/bin/python

Ubuntu 12

jcollum avatar Apr 03 '13 21:04 jcollum

I am getting a similar issue updating/adding modules on centos6 x86.64 python specified at 2.7 in bash and also in the command:

08:20 # npm install -g runas --python=/usr/bin/python2.7

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

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/5.4.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/runas/.node-gyp"
make: Entering directory `/usr/local/lib/node_modules/runas/build'
  CXX(target) Release/obj.target/runas/src/main.o
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:45,
                 from ../src/main.cc:1:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:336: error: expected unqualified-id before ‘using’
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:353: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:360: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:364: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:430: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: At global scope:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:469: error: expected unqualified-id before ‘using’
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:794: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:819: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:831: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: At global scope:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:856: error: expected unqualified-id before ‘using’
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:1093: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:1099: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:3204: error: ‘nullptr’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:7154: error: ‘nullptr’ was not declared in this scope
In file included from ../node_modules/nan/nan.h:194,
                 from ../src/main.cc:1:
../node_modules/nan/nan_maybe_43_inl.h: At global scope:
../node_modules/nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:19: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:24: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:31: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:36: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:41: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:46: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:51: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:59: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:64: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:69: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:76: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:83: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:91: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:98: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:108: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:114: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:118: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:125: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:130: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:135: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:139: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:145: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:150: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:156: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:162: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:168: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:174: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:180: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:186: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:194: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:201: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:205: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:209: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:213: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:217: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:223: error: expected initializer before ‘<’ token
In file included from ../node_modules/nan/nan.h:199,
                 from ../src/main.cc:1:
../node_modules/nan/nan_converters.h:14: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_converters.h:14: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:16: error: ISO C++ forbids declaration of ‘Maybe’ with no type
../node_modules/nan/nan_converters.h:16: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:26: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:27: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:28: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:29: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:30: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:31: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:32: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:42: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:43: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:44: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:45: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:46: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_converters.h:59,
                 from ../node_modules/nan/nan.h:199,
                 from ../src/main.cc:1:
../node_modules/nan/nan_converters_43_inl.h:18: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Boolean>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:19: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Number>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:20: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::String>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:21: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Object>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:22: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Integer>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:23: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Uint32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:24: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Int32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:34: error: ‘return_t’ in class ‘Nan::imp::ToFactory<bool>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:35: error: ‘return_t’ in class ‘Nan::imp::ToFactory<double>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:36: error: ‘return_t’ in class ‘Nan::imp::ToFactory<long int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:37: error: ‘return_t’ in class ‘Nan::imp::ToFactory<unsigned int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:38: error: ‘return_t’ in class ‘Nan::imp::ToFactory<int>’ does not name a type
In file included from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]’:
../node_modules/nan/nan_new.h:21: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]’:
../node_modules/nan/nan_new.h:28: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]’:
../node_modules/nan/nan_new.h:35: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: At global scope:
../node_modules/nan/nan_new.h:43: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_new.h:43: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_new.h:75: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:141: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:147: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:148: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:160: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:161: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:162: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:163: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:165: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:166: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:182: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:183: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_new.h:189,
                 from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_implementation_12_inl.h:56: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Date>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan_implementation_12_inl.h:90: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)’:
../node_modules/nan/nan_implementation_12_inl.h:118: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: At global scope:
../node_modules/nan/nan_implementation_12_inl.h:197: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:216: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Script>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:222: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Script>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:254: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:262: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:268: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:275: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:281: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:286: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:347: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:354: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
In file included from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_new.h:293: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:299: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:305: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:311: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:317: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:323: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:329: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:335: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Error(const char*)’:
../node_modules/nan/nan.h:659: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowError(const char*)’:
../node_modules/nan/nan.h:659: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::RangeError(const char*)’:
../node_modules/nan/nan.h:660: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowRangeError(const char*)’:
../node_modules/nan/nan.h:660: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::ReferenceError(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowReferenceError(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::SyntaxError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowSyntaxError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::TypeError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowTypeError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:671: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:693: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:709: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:722: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:739: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:745: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:753: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:760: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:766: error: expected initializer before ‘<’ token
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h: In member function ‘void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)’:
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:3019: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:1402: error:   in call to ‘Set’
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1524: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../node_modules/nan/nan.h:1542: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘virtual void Nan::AsyncWorker::HandleErrorCallback()’:
../node_modules/nan/nan.h:1576: error: no matching function for call to ‘New(const char*)’
../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(const T&, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1865: error: there are no arguments to ‘GetFunction’ that depend on a template parameter, so a declaration of ‘GetFunction’ must be available
../node_modules/nan/nan.h:1865: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../node_modules/nan/nan.h:1866: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1878: error: ‘GetFunction’ was not declared in this scope
../node_modules/nan/nan.h:1879: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../node_modules/nan/nan.h:1904: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:1947: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:1995: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2065: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2120: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2142: error: ‘NewInstance’ was not declared in this scope
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h: In function ‘void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:2169: error: no matching function for call to ‘New(const char*&)’
../node_modules/nan/nan.h:2170: error: ‘GetFunction’ was not declared in this scope
/usr/local/lib/node_modules/runas/.node-gyp/5.4.1/include/node/v8.h:3019: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:2170: error:   in call to ‘Set’
../node_modules/nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2177: error: no matching function for call to ‘To(v8::Local<v8::Value>&)’
../node_modules/nan/nan.h: In member function ‘void Nan::Tap::ok(bool, const char*)’:
../node_modules/nan/nan.h:2190: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘void Nan::Tap::pass(const char*)’:
../node_modules/nan/nan.h:2196: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:2220: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan.h:2220: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan.h:2223: error: expected ‘;’ before ‘}’ token
../node_modules/nan/nan.h:2225: error: ‘MaybeLocal’ was not declared in this scope
../node_modules/nan/nan.h:2225: error: template argument 1 is invalid
../node_modules/nan/nan.h:2225: error: expected unqualified-id before ‘>’ token
../node_modules/nan/nan.h:2234: error: expected constructor, destructor, or type conversion before ‘<’ token
../src/main.cc: In function ‘bool<unnamed>::GetProperty(v8::Local<v8::Object>, const char*, v8::Local<v8::Value>*)’:
../src/main.cc:10: error: ‘Get’ is not a member of ‘Nan’
../src/main.cc:10: error: no matching function for call to ‘New(const char*&)’
../src/main.cc: In function ‘void<unnamed>::Runas(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/main.cc:55: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:56: error: no matching function for call to ‘New(const char [9])’
../src/main.cc:58: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:59: error: no matching function for call to ‘New(const char [7])’
../src/main.cc:60: error: no matching function for call to ‘New(std::string&)’
../src/main.cc:61: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:62: error: no matching function for call to ‘New(const char [7])’
../src/main.cc:63: error: no matching function for call to ‘New(std::string&)’
../src/main.cc: At global scope:
../src/main.cc:70: error: variable or field ‘Init’ declared void
../src/main.cc:70: error: ‘Handle’ was not declared in this scope
../src/main.cc:70: error: expected primary-expression before ‘>’ token
../src/main.cc:70: error: ‘exports’ was not declared in this scope
../src/main.cc:76: error: ‘Init’ was not declared in this scope
../src/main.cc:76: error: too many initializers for ‘node::node_module’
make: *** [Release/obj.target/runas/src/main.o] Error 1
make: Leaving directory `/usr/local/lib/node_modules/runas/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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
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/runas
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "runas" "--python=/usr/bin/python2.7"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
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 runas 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 their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

[bnoordhuis - edited formatting]

lynsei avatar Feb 09 '16 15:02 lynsei

any ideas on how I can mitigate that? I've tried modifying some of your node code but it's not working out cause I don't know enough c++. reinstalled gcc-c++, tried a bunch of other stuff and still no luck

lynsei avatar Feb 09 '16 15:02 lynsei

08:27 # node-gyp configure --python=/usr/bin/python2.7
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2.7
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/bin/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/5.4.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/5.4.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/bin',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /usr/bin) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "configure" "--python=/usr/bin/python2.7"
gyp ERR! cwd /usr/bin
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok 
?-1 /usr/bin 
08:27 #

[bnoordhuis - edited formatting]

lynsei avatar Feb 09 '16 15:02 lynsei

The first error:

../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler

Means you need to upgrade your C++ compiler to at least g++ 4.8 or clang++ 3.4. The second one:

gyp: binding.gyp not found (cwd: /usr/bin) while trying to load binding.gyp

Is because you're running node-gyp from inside /usr/bin:

gyp ERR! cwd /usr/bin

bnoordhuis avatar Feb 09 '16 15:02 bnoordhuis

I was able to fix some of the errors by doing this:

find ~/. -name "building.gyp"
~/build 
08:30 # cp ../tmp/npm-22074-Oh7plVqy/1450624912909-0.6952921932097524/package/binding.gyp .   // where I found it

which output this:

? ~/build 
08:30 # node-gyp configure --python=/usr/bin/python2.7 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2.7
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/build/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/5.4.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/5.4.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/build',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok 
? ~/build 
08:30 # node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/root/build/build'
  SOLINK_MODULE(target) Release/obj.target/.node
  COPY Release/.node
make: Leaving directory `/root/build/build'
gyp info ok 
? ~/build

but now it's giving different error when I'm installing runas cause I guess it requires 3.1.1 node-gyp

I will upgrade g++ 4.8 or clang++ 3.4. right now and see if that helps Do I need the dev toolkit too?

[bnoordhuis - edited formatting]

lynsei avatar Feb 09 '16 15:02 lynsei

new error:

08:45 # npm install -g runas

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

make: Entering directory `/usr/local/lib/node_modules/runas/build'
  CXX(target) Release/obj.target/runas/src/main.o
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /root/.node-gyp/5.4.1/include/node/node.h:42,
                 from ../node_modules/nan/nan.h:45,
                 from ../src/main.cc:1:
/root/.node-gyp/5.4.1/include/node/v8.h:336: error: expected unqualified-id before ‘using’
/root/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/root/.node-gyp/5.4.1/include/node/v8.h:353: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/root/.node-gyp/5.4.1/include/node/v8.h:360: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/root/.node-gyp/5.4.1/include/node/v8.h:364: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/root/.node-gyp/5.4.1/include/node/v8.h:430: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: At global scope:
/root/.node-gyp/5.4.1/include/node/v8.h:469: error: expected unqualified-id before ‘using’
/root/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/root/.node-gyp/5.4.1/include/node/v8.h:794: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/root/.node-gyp/5.4.1/include/node/v8.h:819: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/root/.node-gyp/5.4.1/include/node/v8.h:831: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: At global scope:
/root/.node-gyp/5.4.1/include/node/v8.h:856: error: expected unqualified-id before ‘using’
/root/.node-gyp/5.4.1/include/node/v8.h:1093: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h:1099: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/root/.node-gyp/5.4.1/include/node/v8.h:3204: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/root/.node-gyp/5.4.1/include/node/v8.h:7154: error: ‘nullptr’ was not declared in this scope
In file included from ../node_modules/nan/nan.h:194,
                 from ../src/main.cc:1:
../node_modules/nan/nan_maybe_43_inl.h: At global scope:
../node_modules/nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:19: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:24: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:31: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:36: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:41: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:46: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:51: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:59: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:64: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:69: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:76: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:83: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:91: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:98: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:108: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:114: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:118: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:125: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:130: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:135: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:139: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:145: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:150: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:156: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:162: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:168: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:174: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:180: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:186: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:194: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:201: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:205: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:209: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:213: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:217: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:223: error: expected initializer before ‘<’ token
In file included from ../node_modules/nan/nan.h:199,
                 from ../src/main.cc:1:
../node_modules/nan/nan_converters.h:14: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_converters.h:14: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:16: error: ISO C++ forbids declaration of ‘Maybe’ with no type
../node_modules/nan/nan_converters.h:16: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:26: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:27: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:28: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:29: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:30: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:31: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:32: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:42: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:43: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:44: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:45: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:46: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_converters.h:59,
                 from ../node_modules/nan/nan.h:199,
                 from ../src/main.cc:1:
../node_modules/nan/nan_converters_43_inl.h:18: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Boolean>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:19: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Number>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:20: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::String>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:21: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Object>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:22: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Integer>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:23: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Uint32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:24: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Int32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:34: error: ‘return_t’ in class ‘Nan::imp::ToFactory<bool>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:35: error: ‘return_t’ in class ‘Nan::imp::ToFactory<double>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:36: error: ‘return_t’ in class ‘Nan::imp::ToFactory<long int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:37: error: ‘return_t’ in class ‘Nan::imp::ToFactory<unsigned int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:38: error: ‘return_t’ in class ‘Nan::imp::ToFactory<int>’ does not name a type
In file included from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]’:
../node_modules/nan/nan_new.h:21: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]’:
../node_modules/nan/nan_new.h:28: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]’:
../node_modules/nan/nan_new.h:35: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: At global scope:
../node_modules/nan/nan_new.h:43: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_new.h:43: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_new.h:75: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:141: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:147: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:148: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:160: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:161: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:162: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:163: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:165: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:166: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:182: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:183: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_new.h:189,
                 from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_implementation_12_inl.h:56: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Date>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan_implementation_12_inl.h:90: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)’:
../node_modules/nan/nan_implementation_12_inl.h:118: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: At global scope:
../node_modules/nan/nan_implementation_12_inl.h:197: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:216: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Script>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:222: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Script>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:254: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:262: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:268: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:275: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:281: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:286: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:347: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:354: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
In file included from ../node_modules/nan/nan.h:200,
                 from ../src/main.cc:1:
../node_modules/nan/nan_new.h:293: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:299: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:305: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:311: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:317: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:323: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:329: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:335: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Error(const char*)’:
../node_modules/nan/nan.h:659: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowError(const char*)’:
../node_modules/nan/nan.h:659: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::RangeError(const char*)’:
../node_modules/nan/nan.h:660: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowRangeError(const char*)’:
../node_modules/nan/nan.h:660: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::ReferenceError(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowReferenceError(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::SyntaxError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowSyntaxError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::TypeError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowTypeError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:671: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:693: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:709: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:722: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:739: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:745: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:753: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:760: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:766: error: expected initializer before ‘<’ token
/root/.node-gyp/5.4.1/include/node/v8.h: In member function ‘void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)’:
/root/.node-gyp/5.4.1/include/node/v8.h:3019: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:1402: error:   in call to ‘Set’
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1524: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../node_modules/nan/nan.h:1542: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘virtual void Nan::AsyncWorker::HandleErrorCallback()’:
../node_modules/nan/nan.h:1576: error: no matching function for call to ‘New(const char*)’
../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(const T&, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1865: error: there are no arguments to ‘GetFunction’ that depend on a template parameter, so a declaration of ‘GetFunction’ must be available
../node_modules/nan/nan.h:1865: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../node_modules/nan/nan.h:1866: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1878: error: ‘GetFunction’ was not declared in this scope
../node_modules/nan/nan.h:1879: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../node_modules/nan/nan.h:1904: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:1947: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:1995: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2065: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2120: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2142: error: ‘NewInstance’ was not declared in this scope
In file included from ../src/main.cc:1:
../node_modules/nan/nan.h: In function ‘void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:2169: error: no matching function for call to ‘New(const char*&)’
../node_modules/nan/nan.h:2170: error: ‘GetFunction’ was not declared in this scope
/root/.node-gyp/5.4.1/include/node/v8.h:3019: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:2170: error:   in call to ‘Set’
../node_modules/nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2177: error: no matching function for call to ‘To(v8::Local<v8::Value>&)’
../node_modules/nan/nan.h: In member function ‘void Nan::Tap::ok(bool, const char*)’:
../node_modules/nan/nan.h:2190: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘void Nan::Tap::pass(const char*)’:
../node_modules/nan/nan.h:2196: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:2220: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan.h:2220: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan.h:2223: error: expected ‘;’ before ‘}’ token
../node_modules/nan/nan.h:2225: error: ‘MaybeLocal’ was not declared in this scope
../node_modules/nan/nan.h:2225: error: template argument 1 is invalid
../node_modules/nan/nan.h:2225: error: expected unqualified-id before ‘>’ token
../node_modules/nan/nan.h:2234: error: expected constructor, destructor, or type conversion before ‘<’ token
../src/main.cc: In function ‘bool<unnamed>::GetProperty(v8::Local<v8::Object>, const char*, v8::Local<v8::Value>*)’:
../src/main.cc:10: error: ‘Get’ is not a member of ‘Nan’
../src/main.cc:10: error: no matching function for call to ‘New(const char*&)’
../src/main.cc: In function ‘void<unnamed>::Runas(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/main.cc:55: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:56: error: no matching function for call to ‘New(const char [9])’
../src/main.cc:58: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:59: error: no matching function for call to ‘New(const char [7])’
../src/main.cc:60: error: no matching function for call to ‘New(std::string&)’
../src/main.cc:61: error: ‘Set’ is not a member of ‘Nan’
../src/main.cc:62: error: no matching function for call to ‘New(const char [7])’
../src/main.cc:63: error: no matching function for call to ‘New(std::string&)’
../src/main.cc: At global scope:
../src/main.cc:70: error: variable or field ‘Init’ declared void
../src/main.cc:70: error: ‘Handle’ was not declared in this scope
../src/main.cc:70: error: expected primary-expression before ‘>’ token
../src/main.cc:70: error: ‘exports’ was not declared in this scope
../src/main.cc:76: error: ‘Init’ was not declared in this scope
../src/main.cc:76: error: too many initializers for ‘node::node_module’
make: *** [Release/obj.target/runas/src/main.o] Error 1
make: Leaving directory `/usr/local/lib/node_modules/runas/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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
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/runas
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "runas"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
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 runas 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 their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/npm/node_modules/node-gyp/npm-debug.log
?-1 /usr/local/lib/node_modules/npm/node_modules/node-gyp 
08:45 #

[bnoordhuis - edited formatting]

lynsei avatar Feb 09 '16 15:02 lynsei

it's probably all related to the g++ version cause it isn't python

? /usr/local/lib/node_modules/npm/node_modules/node-gyp 
08:50 # python
Python 2.7.11 (default, Dec  7 2015, 11:22:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

[bnoordhuis - edited formatting]

lynsei avatar Feb 09 '16 15:02 lynsei

@largesoft The errors from https://github.com/nodejs/node-gyp/issues/233#issuecomment-181922075 are due to using an outdated compiler. Try export CC=gcc-4.8 CXX=g++-4.8 before running node-gyp.

bnoordhuis avatar Feb 11 '16 15:02 bnoordhuis

11:21 # export CC=gcc-4.8 CXX=g++-4.8

11:36 # echo $CC; gcc-4.8

11:36 # echo $CXX; g++-4.8

11:37 # npm install -g slap /usr/local/bin/slap -> /usr/local/lib/node_modules/slap/slap.js

[email protected] install /usr/local/lib/node_modules/slap/node_modules/runas node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/5.4.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/slap/node_modules/runas/.node-gyp" make: Entering directory /usr/local/lib/node_modules/slap/node_modules/runas/build' CXX(target) Release/obj.target/runas/src/main.o make: execvp: g++-4.8: Permission denied make: *** [Release/obj.target/runas/src/main.o] Error 127 make: Leaving directory/usr/local/lib/node_modules/slap/node_modules/runas/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:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64 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/slap/node_modules/runas gyp ERR! node -v v5.4.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1 /usr/local/lib +-- (empty)

npm ERR! code 1 ?-1 / 11:38 #

lynsei avatar Feb 11 '16 20:02 lynsei

Here's what I currently have installed

``

python.x86_64                           2.6.6-64.el6              @base                              
python-devel.x86_64                     2.6.6-64.el6              @base                              
python-iniparse.noarch                  0.3.1-2.1.el6             installed                          
python-inotify.noarch                   0.9.1-1.el6               @epel                              
python-libs.x86_64                      2.6.6-64.el6              @base                              
python-pip.noarch                       7.1.0-1.el6               @epel                              
python-pycurl.x86_64                    7.19.0-8.el6              installed                          
python-setuptools.noarch                0.6.10-3.el6              @base                              
python-urlgrabber.noarch                3.9.1-9.el6               @base                              
python27.x86_64                         2.7.11-1.ius.centos6      @ius                               
python27-devel.x86_64                   2.7.11-1.ius.centos6      @ius                               
python27-libs.x86_64                    2.7.11-1.ius.centos6      @ius                               
python27-python.x86_64                  2.7.5-10.el6.centos.alt   @scl                               
python27-python-devel.x86_64            2.7.5-10.el6.centos.alt   @scl                               
python27-python-libs.x86_64             2.7.5-10.el6.centos.alt   @scl                               
python27-runtime.x86_64                 1.1-16.el6.centos.alt     @scl
nodejs.x86_64                           5.5.0-2nodesource.el6     @nodesource                        
nodesource-release.noarch               el6-1                     installed

libgcc.i686                             4.4.7-16.el6              @base                              
libgcc.x86_64                           4.4.7-16.el6              @base
gcc.x86_64                              4.4.7-16.el6              @base                              
gcc-c++.x86_64                          4.4.7-16.el6              @base

devtoolset-2-binutils.x86_64            2.23.52.0.1-10.el6        @DevToolset-2                      
devtoolset-2-gcc.x86_64                 4.8.2-15.el6              @DevToolset-2                      
devtoolset-2-gcc-c++.x86_64             4.8.2-15.el6              @DevToolset-2                      
devtoolset-2-libstdc++-devel.x86_64     4.8.2-15.el6              @DevToolset-2                      
devtoolset-2-runtime.noarch             2.1-4.el6                 @DevToolset-2



Welcome home Dr. Hogan. Thu Feb 11 11:35:54 MST 2016
INSTANCESTATUSES        us-west-1b      i-88e9d3d6
INSTANCESTATE   16      running
INSTANCESTATUS  ok
DETAILS reachability    passed
SYSTEMSTATUS    ok
DETAILS reachability    passed
INSTANCESTATUSES        us-west-1a      i-2d58759f
INSTANCESTATE   16      running
INSTANCESTATUS  ok
DETAILS reachability    passed
SYSTEMSTATUS    ok
DETAILS reachability    passed
                   ..                    [email protected]
                 .PLTJ.                  OS: CentOS 
                <><><><>                 Kernel: x86_64 Linux 2.6.32-504.23.4.el6.x86_64
       KKSSV' 4KKK LJ KKKL.'VSSKK        Uptime: 1d 17h 26m
       KKV' 4KKKKK LJ KKKKAL 'VKK        Packages: 704
       V' ' 'VKKKK LJ KKKKV' ' 'V        Shell: bash 4.1.2
       .4MA.' 'VKK LJ KKV' '.4Mb.        CPU: Intel Xeon CPU E5-2680 v2 @ 2.793GHz
     . KKKKKA.' 'V LJ V' '.4KKKKK .      RAM: 4313MiB / 7337MiB
   .4D KKKKKKKA.'' LJ ''.4KKKKKKK FA.   
  <QDD ++++++++++++  ++++++++++++ GFD>  
   'VD KKKKKKKK'.. LJ ..'KKKKKKKK FV    
     ' VKKKKK'. .4 LJ K. .'KKKKKV '     
        'VK'. .4KK LJ KKA. .'KV'        
       A. . .4KKKK LJ KKKKA. . .4       
       KKA. 'KKKKK LJ KKKKK' .4KK       
       KKSSA. VKKK LJ KKKV .4SSKK       
                <><><><>                 
                 'MKKM'                  
                   ''

@``

 @``

lynsei avatar Feb 11 '16 20:02 lynsei

? /usr/bin 12:57 # npm install -g runas

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

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/5.4.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/runas/.node-gyp" make: Entering directory /usr/local/lib/node_modules/runas/build' CXX(target) Release/obj.target/runas/src/main.o make: execvp: g++-4.8: Permission denied make: *** [Release/obj.target/runas/src/main.o] Error 127 make: Leaving directory/usr/local/lib/node_modules/runas/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:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64 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/runas gyp ERR! node -v v5.4.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Linux 2.6.32-504.23.4.el6.x86_64 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "runas" npm ERR! node v5.4.1 npm ERR! npm v3.3.12 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 runas 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 their info via: npm ERR! npm owner ls runas npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /usr/bin/npm-debug.log ?-1 /usr/bin 13:07 #

lynsei avatar Feb 11 '16 20:02 lynsei

13:23 # npm install -g node-gyp
/usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
/usr/local/lib
+-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  ¦   +-- [email protected] 
  ¦   ¦ +-- [email protected] 
  ¦   ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  ¦   ¦ +-- [email protected] 
  ¦   ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  ¦   ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  ¦     +-- [email protected] 
  ¦     +-- [email protected] 
  ¦       +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ ¦   +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  ¦ +-- [email protected] 
  +-- [email protected] 
  ¦ +-- [email protected] 
  ¦   +-- [email protected] 
  ¦   +-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 

  +-- [email protected] 
    +-- [email protected] 
    ¦ +-- [email protected] 
    +-- [email protected] 

? /usr/local/lib/node_modules 
13:23 #

lynsei avatar Feb 11 '16 20:02 lynsei

? /usr/local/lib/node_modules 
13:23 # npm remove runas
? /usr/local/lib/node_modules 
13:25 # npm install runas

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

make: Entering directory `/usr/local/lib/node_modules/runas/build'
  CXX(target) Release/obj.target/runas/src/main.o
make: g++-4.8: Command not found
make: *** [Release/obj.target/runas/src/main.o] Error 127
make: Leaving directory `/usr/local/lib/node_modules/runas/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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
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/runas
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "runas"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
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 runas 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 their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
?-1 /usr/local/lib/node_modules 
13:25 #

lynsei avatar Feb 11 '16 20:02 lynsei

it's not liking the path you had me set for CXX

lynsei avatar Feb 11 '16 20:02 lynsei

looks like executing:

scl enable devtoolset-2 bash

gives me a shell that sayeth:

?-1 /usr/local/bin 
13:28 # scl enable devtoolset-2 bash
bash-4.1# ll
bash: ll: command not found
bash-4.1# ll
bash: ll: command not found
bash-4.1# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC) 
bash-4.1#


lynsei avatar Feb 11 '16 20:02 lynsei

so perhaps I can build it from here

lynsei avatar Feb 11 '16 20:02 lynsei

it's weird I can get it to install on its own fine. (node-gyp). there were multiple versions in different directories. * the new gcc does solve problems on devtools-2.*

however, I guess there are still other problems: ( binding.gyp?)


bash-4.1# node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/5.4.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/5.4.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /usr/local/lib/node_modules) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok

lynsei avatar Feb 11 '16 20:02 lynsei

well as I've reinstalled practically everything in the universe. this is why we can't have nice things.

> @bash-4.1# npm install -g runas
> 
> > [email protected] install /usr/local/lib/node_modules/runas
> > node-gyp rebuild
> 
> gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/5.4.1"
> gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/runas/.node-gyp"
> make: Entering directory `/usr/local/lib/node_modules/runas/build'
>   CXX(target) Release/obj.target/runas/src/main.o
> make: execvp: g++-4.8: Permission denied
> make: *** [Release/obj.target/runas/src/main.o] Error 127
> make: Leaving directory `/usr/local/lib/node_modules/runas/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:87:13)
> gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
> gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
> gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
> 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/runas
> gyp ERR! node -v v5.4.1
> gyp ERR! node-gyp -v v3.2.1
> gyp ERR! not ok 
> npm ERR! Linux 2.6.32-504.23.4.el6.x86_64
> npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "runas"
> npm ERR! node v5.4.1
> npm ERR! npm  v3.7.1
> 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 runas 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 runas
> npm ERR! Or if that isn't available, you can get their info via:
> npm ERR!     npm owner ls runas
> npm ERR! There is likely additional logging output above.
> 
> npm ERR! Please include the following file with any support request:
> npm ERR!     /usr/local/lib/node_modules/npm/node_modules/npm-debug.log
> bash-4.1# echo $CXX
> g++-4.8
>  

lynsei avatar Feb 11 '16 21:02 lynsei

I'm gonna attempt to install node-devel from yum, but its already giving me an error ,,,, ugh

lynsei avatar Feb 11 '16 22:02 lynsei

gyp: binding.gyp not found (cwd: /usr/local/lib/node_modules) while trying to load binding.gyp

This particular error simply means you're in the wrong directory. You probably need to be in one of its sub-directories.

bnoordhuis avatar Feb 12 '16 01:02 bnoordhuis