tblobaum / rconsole

"syslog.h" bindings for node.js with a revised console module
MIT License
54 stars 10 forks source link

node-gyp error on OSX 10.10.2, node v0.12.0, npm 2.5.1 #9

Closed cayblood closed 8 years ago

cayblood commented 9 years ago

I'm getting the following error trying to npm install rconsole on OSX 10.10.2 (with homebrew npm):

npm install rconsole
\
> rconsole@0.2.0 install /Users/carl/Source/work/twt/beehive/node_modules/rconsole
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/syslog/src/syslog.o
../src/syslog.cc:35:41: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> open(const v8::Arguments& args) {
                                        ^~~~~~~~~~~~~
                                        v8::internal::Arguments
/Users/carl/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/syslog.cc:36:7: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  args[0]->ToString()->WriteAscii((char*) &title);
  ~~~~^~
../src/syslog.cc:37:22: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  int facility = args[1]->ToInteger()->Int32Value();
                 ~~~~^~
../src/syslog.cc:38:22: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  int log_upto = args[2]->ToInteger()->Int32Value();
                 ~~~~^~
../src/syslog.cc:42:18: error: no member named 'New' in 'v8::String'
  return String::New("true");
         ~~~~~~~~^
../src/syslog.cc:45:41: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> exit(const v8::Arguments& args) {
                                        ^~~~~~~~~~~~~
                                        v8::internal::Arguments
/Users/carl/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/syslog.cc:48:18: error: no member named 'New' in 'v8::String'
  return String::New("true");
         ~~~~~~~~^
../src/syslog.cc:51:40: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> log(const v8::Arguments& args) {
                                       ^~~~~~~~~~~~~
                                       v8::internal::Arguments
/Users/carl/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/syslog.cc:52:22: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  int severity = args[0]->ToInteger()->Int32Value();
                 ~~~~^~
../src/syslog.cc:53:37: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  v8::String::Utf8Value message(args[1]->ToString());
                                ~~~~^~
../src/syslog.cc:56:18: error: no member named 'New' in 'v8::String'
  return String::New("true");
         ~~~~~~~~^
../src/syslog.cc:60:3: error: no matching function for call to 'NODE_SET_METHOD'
  NODE_SET_METHOD(target, "open", open);
  ^~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
                        ^~~~~~~~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handle<v8::Object>] not viable: no
      known conversion from 'v8::Handle<v8::Value> (const v8::internal::Arguments &)' to 'v8::FunctionCallback' (aka 'void
      (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd argument
inline void NODE_SET_METHOD(const TypeName& recv,
            ^
../src/syslog.cc:61:3: error: no matching function for call to 'NODE_SET_METHOD'
  NODE_SET_METHOD(target, "exit", exit);
  ^~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
                        ^~~~~~~~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handle<v8::Object>] not viable: no
      overload of 'exit' matching 'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd
      argument
inline void NODE_SET_METHOD(const TypeName& recv,
            ^
../src/syslog.cc:62:3: error: no matching function for call to 'NODE_SET_METHOD'
  NODE_SET_METHOD(target, "log", log);
  ^~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
                        ^~~~~~~~~~~~~~~~~~~~~
/Users/carl/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handle<v8::Object>] not viable: no
      known conversion from 'v8::Handle<v8::Value> (const v8::internal::Arguments &)' to 'v8::FunctionCallback' (aka 'void
      (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd argument
inline void NODE_SET_METHOD(const TypeName& recv,
            ^
14 errors generated.
make: *** [Release/obj.target/syslog/src/syslog.o] Error 1
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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/carl/Source/work/twt/beehive/node_modules/rconsole
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "rconsole"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! rconsole@0.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rconsole@0.2.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the rconsole 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 rconsole
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/carl/Source/work/twt/beehive/npm-debug.log
coffeeowl commented 9 years ago

it is not only on OSX, it doesn't compile on Linux too, therefore it breaks everywhere on node v0.12.0

tcoulter commented 9 years ago

Anyone ever resolve this?

dreampulse commented 9 years ago

It's still broken..

appsmatics commented 9 years ago

The commit in master (https://github.com/tblobaum/rconsole/commit/06d9ec171239842448801ecbc1f2910e379e3aa5) resolves it, but npmjs registry still has the 0.2.0 without this change.

If you are using node 0.12.2 and npm 2.7.4 Workaround: in package.json use the master from github "rconsole": "https://github.com/tblobaum/rconsole.git" instead of "rconsole": "0.2.0"

rowanmanning commented 9 years ago

Is there any plan to release a new version with Node.js 0.12 support? I've published under a scoped repo for now if anyone needs 0.12 in the meantime: https://www.npmjs.com/package/@rowanmanning/rconsole

enblde commented 9 years ago

Is there any chance for this to be fixed in npm?

doingweb commented 9 years ago

:+1: @tblobaum please do publish this to npm when you get the chance! :)

tblobaum commented 8 years ago

should be fixed