redis / hiredis-node

Node wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
305 stars 84 forks source link

npm install hiredis fails on OS X 10.9.2 #57

Closed marksamman closed 10 years ago

marksamman commented 10 years ago

Output:

Marks-MacBook-Air:~ mark$ npm install -g hiredis
npm http GET https://registry.npmjs.org/hiredis
npm http 304 https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> hiredis@0.1.16 install /usr/local/lib/node_modules/hiredis
> node-gyp rebuild

  CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
  LIBTOOL-STATIC Release/hiredis.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
In file included from ../src/hiredis.cc:3:
../src/reader.h:11:16: error: expected class name
class Reader : ObjectWrap {
               ^
../src/reader.h:17:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> New(const Arguments& args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/mark/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/hiredis.cc:3:
../src/reader.h:18:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Feed(const Arguments &args);
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/mark/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/hiredis.cc:3:
../src/reader.h:19:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Get(const Arguments &args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/mark/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/hiredis.cc:9:21: error: calling a private constructor of class 'v8::HandleScope'
        HandleScope scope;
                    ^
/Users/mark/.node-gyp/0.11.12/deps/v8/include/v8.h:768:13: note: declared private here
  V8_INLINE HandleScope() {}
            ^
5 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.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/Cellar/node/0.11.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.11.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/hiredis
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! hiredis@0.1.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hiredis@0.1.16 install script.
npm ERR! This is most likely a problem with the hiredis 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 hiredis
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.11.12/bin/node" "/usr/local/bin/npm" "install" "-g" "hiredis"
npm ERR! cwd /Users/mark
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/mark/npm-debug.log
npm ERR! not ok code 0
paddyinpdx commented 10 years ago

+1. Same issue. I've scoured the Web but can't find a solution that works.

paddyinpdx commented 10 years ago

If it helps at all I tried installing on my CentOS 6.5 VM and got similar errors:

> hiredis@0.1.16 install /home/vagrant/.nvm/v0.11.12/lib/node_modules/then-redis/node_modules/hiredis
> node-gyp rebuild

make: Entering directory `/home/vagrant/.nvm/v0.11.12/lib/node_modules/then-redis/node_modules/hiredis/build'
  CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
  AR(target) Release/obj.target/deps/hiredis.a
  COPY Release/hiredis.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
In file included from ../src/hiredis.cc:3:
../src/reader.h:11: error: expected class-name before ‘{’ token
../src/reader.h:17: error: ISO C++ forbids declaration of ‘Arguments’ with no type
../src/reader.h:17: error: expected ‘,’ or ‘...’ before ‘&’ token
../src/reader.h:18: error: ISO C++ forbids declaration of ‘Arguments’ with no type
../src/reader.h:18: error: expected ‘,’ or ‘...’ before ‘&’ token
../src/reader.h:19: error: ISO C++ forbids declaration of ‘Arguments’ with no type
../src/reader.h:19: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h: In function ‘void init(v8::Handle<v8::Object>)’:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h:768: error: ‘v8::HandleScope::HandleScope()’ is private
../src/hiredis.cc:9: error: within this context
make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 1
make: Leaving directory `/home/vagrant/.nvm/v0.11.12/lib/node_modules/then-redis/node_modules/hiredis/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/vagrant/.nvm/v0.11.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "node" "/home/vagrant/.nvm/v0.11.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.11.12/lib/node_modules/then-redis/node_modules/hiredis
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! hiredis@0.1.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis@0.1.16 install script.
npm ERR! This is most likely a problem with the hiredis 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 hiredis
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/home/vagrant/.nvm/v0.11.12/bin/node" "/home/vagrant/.nvm/v0.11.12/bin/npm" "install" "-g" "then-redis"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/vagrant/npm-debug.log
npm ERR! not ok code 0
bpierre commented 10 years ago

Same issue here (OS X 10.9.2)

yaymukund commented 10 years ago

I get this too.

OSX 10.8.5 node v0.11.12

AbdelMat-CP commented 10 years ago

Hi, I have this issue on a CentOS 6.5 / node 0.11.12, have you found a solution for it ? thx.

ariunbayar commented 10 years ago

Same error on Ubuntu 12.04 / node 0.11.13

In file included from ../src/hiredis.cc:3:0:
../src/reader.h:11:27: error: expected class-name before ‘{’ token
../src/reader.h:17:36: error: ‘Arguments’ does not name a type
../src/reader.h:17:47: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/reader.h:18:37: error: ‘Arguments’ does not name a type
../src/reader.h:18:48: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/reader.h:19:36: error: ‘Arguments’ does not name a type
../src/reader.h:19:47: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
pietern commented 10 years ago

Apparently there have been tons of portability problems with Node and V8 in the 0.11 line.

In particular, see: https://github.com/rvagg/nan#news--updates

Therefore, by depending on NaN, hiredis-node won't support any version prior to 0.11.13.

I pushed a new version to NPM. Please check if it works with Node >= 0.11.13.

ariunbayar commented 10 years ago

Worked on Ubuntu 12.04 / node 0.11.13. Thank you!

marksamman commented 10 years ago

I have confirmed that it installs fine on OS X 10.9.3 now. Thanks!

mib32 commented 9 years ago

What do you think about this?

MBP-Anton:node.api antonmur$ npm install
npm WARN package.json node.api@0.0.1 No README data
npm WARN package.json coffee-script@1.3.3 bugs['name'] should probably be bugs['url'].
|
> hiredis@0.1.15 install /Users/antonmur/dev/q-music/node.api/node_modules/hiredis
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
  LIBTOOL-STATIC Release/hiredis.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
In file included from ../src/hiredis.cc:3:
../src/reader.h:11:16: error: expected class name
class Reader : ObjectWrap {
               ^
../src/reader.h:17:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> New(const Arguments& args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/antonmur/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/hiredis.cc:3:
../src/reader.h:18:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Feed(const Arguments &args);
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/antonmur/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/hiredis.cc:3:
../src/reader.h:19:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Get(const Arguments &args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/antonmur/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/hiredis.cc:9:21: error: calling a protected constructor of class 'v8::HandleScope'
        HandleScope scope;
                    ^
/Users/antonmur/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
5 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.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/antonmur/dev/q-music/node.api/node_modules/hiredis
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"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/antonmur/dev/q-music/node.api/npm-debug.log
badboy commented 9 years ago

Can you please try again with latest hiredis-node release?

mib32 commented 9 years ago

Hey! I'm sorry, but how can i do it if it is defined in package.json as "hiredis": "0.1.15"

badboy commented 9 years ago

Current version is 0.2.0, it should be fully compatible and thus you can just bump that dependency version and npm install again

mib32 commented 9 years ago

@badboy that was helpful, thanks.