TooTallNate / node-speaker

Output PCM audio data to the speakers
651 stars 146 forks source link

npm install speaker fails on 0.12 #46

Closed WeeJeWel closed 9 years ago

WeeJeWel commented 9 years ago
$ npm install speaker
npm WARN package.json node-jsrender@1.0.3 No repository field.
\
> speaker@0.2.2 install /Users/emile/Bitbucket/homey-client/node_modules/speaker
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
Using overrides found in /Users/emile/.gyp/include.gypi
  CC(target) Release/obj.target/output/deps/mpg123/src/output/coreaudio.o
  LIBTOOL-STATIC Release/liboutput.a
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:131:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_FLOAT_32);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:132:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_FLOAT_64);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:133:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_SIGNED_8);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:134:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_UNSIGNED_8);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:135:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_SIGNED_16);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:136:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_UNSIGNED_16);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:137:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_SIGNED_24);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:138:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_UNSIGNED_24);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:139:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_SIGNED_32);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/binding.cc:140:3: error: no matching member function for call to 'Set'
  CONST_INT(MPG123_ENC_UNSIGNED_32);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:128:11: note: expanded from macro 'CONST_INT'
  target->Set(NanNew<v8::String>(#value), NanNew<v8::Integer>(value), \
  ~~~~~~~~^~~
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(Handle<Value> key, Handle<Value> value);
       ^
/Users/emile/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
  bool Set(uint32_t index, Handle<Value> value);
       ^
10 errors generated.
make: *** [Release/obj.target/binding/src/binding.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 12.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/emile/Bitbucket/homey-client/node_modules/speaker
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Darwin 12.2.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "speaker"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/emile/Bitbucket/homey-client/npm-debug.log
richsad commented 9 years ago

Hi, I'm not a contributor to this module but I do use it myself. I am not surprised the problems you report. The V8 engine changed and there were many changes to the v8.h and related headers. So all of my C++ addon code broke with the update to node v0.12.0 (and also io.js 1.0.* too). I have not yet tried to correct. In my own addon code it looks like at least a full day's work. Just letting you know this isn't a surprise and will probably happen with any code that has embedded C/C++ addons.

Looking at the messages here it looks like a single C++ macro and a single method are responsible for all the errors. Probably a 10 minute fix once you understand the V8.h changes.

dyxushuai commented 9 years ago

thx

TooTallNate commented 9 years ago

Can you try v0.2.5 of node-speaker?

figmentfel commented 9 years ago

i had the exact same errors at build time. I tried v0.2.5 as suggested by @TooTallNate and it works perfectly !