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

Install issues on Ubuntu 14.04 #19

Closed
howardroark opened this issue Jun 14, 2015 · 13 comments
Closed

Install issues on Ubuntu 14.04 #19

howardroark opened this issue Jun 14, 2015 · 13 comments

Comments

@howardroark
Copy link

Hey,

I'm not sure if I have something wrong going on but I can't seem to get this installed. I was hoping that you could have a look and see if anything jumps out at you. Node is v0.12.4 and NPM is 2.10.1.

Thanks and great work!

vagrant@vagrant-ubuntu-trusty-64 ~/vendor/wetty — u:1 j:0vboxguest             248441  2 vboxsf
 git:master (14:49:37 06.14)
#5 ❯❯❯ npm install

> [email protected] install /home/vagrant/vendor/wetty/node_modules/waitpid
> node-gyp rebuild

make: Entering directory `/home/vagrant/vendor/wetty/node_modules/waitpid/build'
  CXX(target) Release/obj.target/waitpid/src/waitpid.o
../src/waitpid.cc:11:36: error: ‘Arguments’ does not name a type
 static Handle<Value> Waitpid(const Arguments& args) {
                                    ^
../src/waitpid.cc:11:47: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 static Handle<Value> Waitpid(const Arguments& args) {
                                               ^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> Waitpid(const int&)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/waitpid.cc:12:15: error: within this context
   HandleScope scope;
               ^
../src/waitpid.cc:15:13: error: invalid types ‘const int[int]’ for array subscript
   if (args[0]->IsInt32()) {
             ^
../src/waitpid.cc:16:19: error: invalid types ‘const int[int]’ for array subscript
     child = args[0]->Int32Value();
                   ^
../src/waitpid.cc:22:40: error: no matching function for call to ‘v8::Object::New()’
     Local<Object> result = Object::New();
                                        ^
../src/waitpid.cc:22:40: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2388:24: note: static v8::Local<v8::Object> v8::Object::New(v8::Isolate*)
   static Local<Object> New(Isolate* isolate);
                        ^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2388:24: note:   candidate expects 1 argument, 0 provided
../src/waitpid.cc:25:19: error: ‘New’ is not a member of ‘v8::String’
       result->Set(String::New("exitCode"), Integer::New(WEXITSTATUS(status)));
                   ^
../src/waitpid.cc:25:76: error: no matching function for call to ‘v8::Integer::New(int)’
       result->Set(String::New("exitCode"), Integer::New(WEXITSTATUS(status)));
                                                                            ^
../src/waitpid.cc:25:76: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note:   candidate expects 2 arguments, 1 provided
../src/waitpid.cc:26:19: error: ‘New’ is not a member of ‘v8::String’
       result->Set(String::New("signalCode"), Null());
                   ^
../src/waitpid.cc:26:51: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’
       result->Set(String::New("signalCode"), Null());
                                                   ^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:306:28: note: declared here
   friend Handle<Primitive> Null(Isolate* isolate);
                            ^
../src/waitpid.cc:27:20: error: ‘class v8::HandleScope’ has no member named ‘Close’
       return scope.Close(result);
                    ^
../src/waitpid.cc:30:19: error: ‘New’ is not a member of ‘v8::String’
       result->Set(String::New("exitCode"), Null());
                   ^
../src/waitpid.cc:30:49: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’
       result->Set(String::New("exitCode"), Null());
                                                 ^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:306:28: note: declared here
   friend Handle<Primitive> Null(Isolate* isolate);
                            ^
../src/waitpid.cc:31:19: error: ‘New’ is not a member of ‘v8::String’
       result->Set(String::New("signalCode"), Integer::New(WTERMSIG(status)));
                   ^
../src/waitpid.cc:31:75: error: no matching function for call to ‘v8::Integer::New(int)’
       result->Set(String::New("signalCode"), Integer::New(WTERMSIG(status)));
                                                                           ^
../src/waitpid.cc:31:75: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note:   candidate expects 2 arguments, 1 provided
../src/waitpid.cc:32:20: error: ‘class v8::HandleScope’ has no member named ‘Close’
       return scope.Close(result);
                    ^
../src/waitpid.cc:34:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
     return scope.Close(Undefined());
                  ^
../src/waitpid.cc:34:34: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Undefined(v8::Isolate*)’
     return scope.Close(Undefined());
                                  ^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:305:28: note: declared here
   friend Handle<Primitive> Undefined(Isolate* isolate);
                            ^
../src/waitpid.cc:37:44: error: ‘New’ is not a member of ‘v8::String’
     return ThrowException(Exception::Error(String::New("Not an integer.")));
                                            ^
../src/waitpid.cc:37:75: error: ‘ThrowException’ was not declared in this scope
     return ThrowException(Exception::Error(String::New("Not an integer.")));
                                                                           ^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘void init(v8::Handle<v8::Object>)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/waitpid.cc:43:15: error: within this context
   HandleScope scope;
               ^
../src/waitpid.cc:44:45: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [8], v8::Handle<v8::Value> (&)(const int&))’
   NODE_SET_METHOD(target, "waitpid", Waitpid);
                                             ^
../src/waitpid.cc:44:45: note: candidate is:
In file included from ../src/waitpid.cc:2:0:
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note:   template argument deduction/substitution failed:
../src/waitpid.cc:44:45: note:   cannot convert ‘Waitpid’ (type ‘v8::Handle<v8::Value>(const int&)’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
   NODE_SET_METHOD(target, "waitpid", Waitpid);
                                             ^
make: *** [Release/obj.target/waitpid/src/waitpid.o] Error 1
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/waitpid/build'
 build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/vendor/wetty/node_modules/waitpid
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm WARN deprecated [email protected]: use serve-favicon module

> [email protected] install /home/vagrant/vendor/wetty/node_modules/pty.js
> node-gyp rebuild

make: Entering directory `/home/vagrant/vendor/wetty/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:82:20: error: ‘Arguments’ does not name a type
 PtyGetStatus(const Arguments&);
                    ^
../src/unix/pty.cc:82:29: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
 PtyGetStatus(const Arguments&);
                             ^
../src/unix/pty.cc:376:20: error: ‘Arguments’ does not name a type
 PtyGetStatus(const Arguments& args) {
                    ^
../src/unix/pty.cc:376:31: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 PtyGetStatus(const Arguments& args) {
                               ^
In file included from /home/vagrant/.node-gyp/0.12.4/src/node.h:61:0,
                 from ../node_modules/nan/nan.h:157,
                 from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> PtyGetStatus(const int&)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/unix/pty.cc:377:15: error: within this context
   HandleScope scope;
               ^
../src/unix/pty.cc:379:12: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
   if (args.Length() != 1
            ^
../src/unix/pty.cc:380:17: error: invalid types ‘const int[int]’ for array subscript
       || !args[0]->IsNumber()) {
                 ^
../src/unix/pty.cc:382:7: error: ‘New’ is not a member of ‘v8::String’
       String::New("Usage: pty.status(pid)")));
       ^
../src/unix/pty.cc:382:45: error: ‘ThrowException’ was not declared in this scope
       String::New("Usage: pty.status(pid)")));
                                             ^
../src/unix/pty.cc:385:19: error: invalid types ‘const int[int]’ for array subscript
   int pid = args[0]->IntegerValue();
                   ^
../src/unix/pty.cc:387:53: error: no matching function for call to ‘v8::Number::New(std::map<int, int>::mapped_type&)’
   Local<Number> statusCode = Number::New(pidMap[pid]);
                                                     ^
../src/unix/pty.cc:387:53: note: candidate is:
In file included from /home/vagrant/.node-gyp/0.12.4/src/node.h:61:0,
                 from ../node_modules/nan/nan.h:157,
                 from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:1999:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
   static Local<Number> New(Isolate* isolate, double value);
                        ^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:1999:24: note:   candidate expects 2 arguments, 1 provided
../src/unix/pty.cc:388:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
   return scope.Close(statusCode);
                ^
../src/unix/pty.cc: In function ‘void init(v8::Handle<v8::Object>)’:
../src/unix/pty.cc:616:49: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [7], v8::Handle<v8::Value> (&)(const int&))’
   NODE_SET_METHOD(target, "status", PtyGetStatus);
                                                 ^
../src/unix/pty.cc:616:49: note: candidate is:
In file included from ../node_modules/nan/nan.h:157:0,
                 from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note:   template argument deduction/substitution failed:
../src/unix/pty.cc:616:49: note:   cannot convert ‘PtyGetStatus’ (type ‘v8::Handle<v8::Value>(const int&)’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
   NODE_SET_METHOD(target, "status", PtyGetStatus);
                                                 ^
../src/unix/pty.cc: In function ‘void PtyFork(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/unix/pty.cc:228:34: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
       if (strlen(cwd)) chdir(cwd);
                                  ^
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/pty.js/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/vendor/wetty/node_modules/pty.js
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
\
> [email protected] install /home/vagrant/vendor/wetty/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/vagrant/vendor/wetty/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/websocket/build'
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.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! This is most likely a problem with the waitpid 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 waitpid
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/vendor/wetty/npm-debug.log
@krishnasrinivas
Copy link
Collaborator

Can you do:
cd /home/vagrant
npm install pty.js

can you see if it installs pty.js in /home/vagrant/node_modules/pty.js?

@howardroark
Copy link
Author

Yup. That seemed to work out.

vagrant@vagrant-ubuntu-trusty-64 ~ — u:1 j:0 (17:48:45 06.14)
#158 ❯❯❯ npm install pty.js
\
> [email protected] install /home/vagrant/node_modules/pty.js
> node-gyp rebuild

make: Entering directory `/home/vagrant/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc: In function ‘void PtyFork(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/unix/pty.cc:185:34: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
       if (strlen(cwd)) chdir(cwd);
                                  ^
  SOLINK_MODULE(target) Release/obj.target/pty.node
  SOLINK_MODULE(target) Release/obj.target/pty.node: Finished
  COPY Release/pty.node
make: Leaving directory `/home/vagrant/node_modules/pty.js/build'
[email protected] node_modules/pty.js
├── [email protected]
└── [email protected]
vagrant@vagrant-ubuntu-trusty-64 ~ — u:1 j:0 (17:49:04 06.14)
#159 ❯❯❯ tree node_modules/
node_modules/
└── pty.js
    ├── binding.gyp
    ├── build
    │   ├── binding.Makefile
    │   ├── config.gypi
    │   ├── Makefile
    │   ├── pty.target.mk
    │   └── Release
    │       ├── linker.lock
    │       ├── obj.target
    │       │   ├── pty
    │       │   │   └── src
    │       │   │       └── unix
    │       │   │           └── pty.o
    │       │   └── pty.node
    │       └── pty.node
    ├── deps
    │   └── winpty
    │       ├── agent
    │       │   ├── AgentAssert.cc
    │       │   ├── AgentAssert.h
    │       │   ├── Agent.cc
    │       │   ├── Agent.h
    │       │   ├── ConsoleInput.cc
    │       │   ├── ConsoleInput.h
    │       │   ├── Coord.cc
    │       │   ├── Coord.h
    │       │   ├── DsrSender.h
    │       │   ├── EventLoop.cc
    │       │   ├── EventLoop.h
    │       │   ├── main.cc
    │       │   ├── Makefile
    │       │   ├── NamedPipe.cc
    │       │   ├── NamedPipe.h
    │       │   ├── SmallRect.cc
    │       │   ├── SmallRect.h
    │       │   ├── Terminal.cc
    │       │   ├── Terminal.h
    │       │   ├── Win32Console.cc
    │       │   └── Win32Console.h
    │       ├── config.mk
    │       ├── configure
    │       ├── include
    │       │   └── winpty.h
    │       ├── libwinpty
    │       │   ├── Makefile
    │       │   └── winpty.cc
    │       ├── LICENSE
    │       ├── Makefile
    │       ├── misc
    │       │   ├── build_win32.sh
    │       │   ├── DebugClient.py
    │       │   ├── DebugServer.py
    │       │   ├── FormatChar.h
    │       │   ├── SelectAllTest.cc
    │       │   ├── ShowArgv.cc
    │       │   ├── ShowConsoleInput.cc
    │       │   ├── Spew.py
    │       │   ├── UnixEcho.cc
    │       │   ├── VkEscapeTest.cc
    │       │   ├── Win32Echo1.cc
    │       │   ├── Win32Echo2.cc
    │       │   ├── Win32Test1.cc
    │       │   ├── Win32Test2.cc
    │       │   ├── Win32Test3.cc
    │       │   └── Win32Write1.cc
    │       ├── Notes.txt
    │       ├── README.rst
    │       ├── shared
    │       │   ├── AgentMsg.h
    │       │   ├── Buffer.h
    │       │   ├── c99_snprintf.h
    │       │   ├── DebugClient.cc
    │       │   └── DebugClient.h
    │       ├── unix-adapter
    │       │   ├── main.cc
    │       │   ├── Makefile
    │       │   └── Shared.cc
    │       └── winpty.gyp
    ├── index.js
    ├── lib
    │   ├── pty.js
    │   └── pty_win.js
    ├── LICENSE
    ├── Makefile
    ├── node_modules
    │   ├── extend
    │   │   ├── index.js
    │   │   ├── package.json
    │   │   └── README.md
    │   └── nan
    │       ├── appveyor.yml
    │       ├── CHANGELOG.md
    │       ├── include_dirs.js
    │       ├── LICENSE.md
    │       ├── nan.h
    │       ├── nan_implementation_12_inl.h
    │       ├── nan_implementation_pre_12_inl.h
    │       ├── nan_new.h
    │       ├── nan_string_bytes.h
    │       └── package.json
    ├── package.json
    ├── README.md
    ├── src
    │   ├── unix
    │   │   └── pty.cc
    │   └── win
    │       └── pty.cc
    └── wscript

@krishnasrinivas
Copy link
Collaborator

weird, can you check if any of the suggestions here nodejs/node-gyp#363 fixes this?

@howardroark
Copy link
Author

Tried just about everything mentioned...

  • Tried building node on a fresh system
  • Tried downgrading Python 2.6 and then building node
  • Tried installing NVM/node on a fresh system

Same things happens each time. You can see the system I'm using by downloading this gist.

https://gist.github.com/howardroark/25550e799297fafb3b94

It just downloads the official vagrant image from ubuntu and installs nvm on it. The error is produceable there. No pressure at all if you don't have the time.

@krishnasrinivas
Copy link
Collaborator

For some reason things fail with node 0.12 I was able to get it working with 0.10.31 here
http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz
Can you check with this version? (Also do a 'npm install -g node-gyp' )

@howardroark
Copy link
Author

I was able to get it installed that way :) Though I had to install each dependency on it's own after the install before I could run app.js.

@howardroark
Copy link
Author

So yeah... only works with node 0.10.x. I tried io.js 1 & 2 as well. Very odd. You know though... I wonder if Ubuntu precise is the better release to work with anyway. Considering it is likely to be getting more bug fixes due to it's wider adoption.

@howardroark
Copy link
Author

Happens on Ubuntu 12.04 as well. Must be something to do with Node+Python+Ubuntu

@krishnasrinivas
Copy link
Collaborator

2c65241 will fix this issue but the side effect is it will cause #4 (because of chjj/pty.js#58) but I think it's better to live with a few zombie processes than fail on node 0.12

@krishnasrinivas
Copy link
Collaborator

@howardroark latest code should work fine regardless of the ubuntu/node version, can you verify and close this issue? (you will need to git clone this repo and not do 'npm install wetty' from the NPM repo)

@howardroark
Copy link
Author

Yup, that worked! You can push the update to NPM 👍

Also... Is there any way to avoid needing to verify the host and enter a password?

@krishnasrinivas
Copy link
Collaborator

you can setup passwordless ssh using pub/pvt keys. (as wetty uses ssh to connect)

@howardroark
Copy link
Author

@krishnasrinivas thanks... Is this data supplied at the point where app.js is initiated?

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

2 participants