fardog/node-osx-audio

Problems installing osx-audio

Closed this issue · 1 comments

Hi,

I am a completely noob using npm... I tried to install osx-audio and the process failed as you can see below:

 ✘ muammar@zarathustra ⮀ /tmp ⮀ npm install osx-audio

> osx-audio@0.2.1 install /private/tmp/node_modules/osx-audio
> node-gyp rebuild

  CXX(target) Release/obj.target/audio/src/bindings.o
../src/bindings.cc:113:42: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> New(const v8::Arguments& args)
                                                       ^~~~~~~~~~~~~
                                                       v8::internal::Arguments
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/bindings.cc:129:48: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> OpenInput(const v8::Arguments& args)
                                                             ^~~~~~~~~~~~~
                                                             v8::internal::Arguments
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/bindings.cc:139:49: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> CloseInput(const v8::Arguments& args)
                                                              ^~~~~~~~~~~~~
                                                              v8::internal::Arguments
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/bindings.cc:149:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> IsOpen(const v8::Arguments& args)
                                                          ^~~~~~~~~~~~~
                                                          v8::internal::Arguments
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/bindings.cc:43:20: error: calling a protected constructor of class 'v8::HandleScope'
                        v8::HandleScope scope;
                                        ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/bindings.cc:45:66: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'v8::Handle<v8::Value>
      (const v8::internal::Arguments &)'
                        v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
                                                                                      ^~~
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:4349:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/bindings.cc:47:49: error: 'New' is a private member of 'v8::PersistentBase<v8::FunctionTemplate>'
                        s_ct = v8::Persistent<v8::FunctionTemplate>::New(t);
                                                                     ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:643:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/bindings.cc:47:11: error: too few arguments to function call, expected 2, have 1; did you mean '::AudioInput::New'?
                        s_ct = v8::Persistent<v8::FunctionTemplate>::New(t);
                               ^~
                               ::AudioInput::New
../src/bindings.cc:113:32: note: '::AudioInput::New' declared here
                static v8::Handle<v8::Value> New(const v8::Arguments& args)
                                             ^
../src/bindings.cc:48:8: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; maybe you meant to use '.'?
                        s_ct->InstanceTemplate()->SetInternalFieldCount(1);
                        ~~~~^~
                            .
../src/bindings.cc:48:10: error: no member named 'InstanceTemplate' in 'v8::Persistent<v8::FunctionTemplate,
      v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
                        s_ct->InstanceTemplate()->SetInternalFieldCount(1);
                        ~~~~  ^
../src/bindings.cc:50:8: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; maybe you meant to use '.'?
                        s_ct->SetClassName(v8::String::NewSymbol("AudioInput"));
                        ~~~~^~
                            .
../src/bindings.cc:50:10: error: no member named 'SetClassName' in 'v8::Persistent<v8::FunctionTemplate,
      v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
                        s_ct->SetClassName(v8::String::NewSymbol("AudioInput"));
                        ~~~~  ^
../src/bindings.cc:50:35: error: no member named 'NewSymbol' in 'v8::String'
                        s_ct->SetClassName(v8::String::NewSymbol("AudioInput"));
                                           ~~~~~~~~~~~~^
../src/bindings.cc:52:30: error: no viable conversion from 'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate>'
                        NODE_SET_PROTOTYPE_METHOD(s_ct, "openInput", OpenInput);
                                                  ^~~~
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'const v8::Local<v8::FunctionTemplate> &' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate> &&' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'Persistent'
  V8_INLINE Local(Local<S> that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against
      'v8::Persistent<v8::FunctionTemplate>'
  V8_INLINE Local(S* that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/node.h:252:71: note: passing argument to parameter 'recv' here
inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
                                                                      ^
../src/bindings.cc:53:30: error: no viable conversion from 'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate>'
                        NODE_SET_PROTOTYPE_METHOD(s_ct, "closeInput", CloseInput);
                                                  ^~~~
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'const v8::Local<v8::FunctionTemplate> &' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate> &&' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'Persistent'
  V8_INLINE Local(Local<S> that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against
      'v8::Persistent<v8::FunctionTemplate>'
  V8_INLINE Local(S* that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/node.h:252:71: note: passing argument to parameter 'recv' here
inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
                                                                      ^
../src/bindings.cc:54:30: error: no viable conversion from 'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate>'
                        NODE_SET_PROTOTYPE_METHOD(s_ct, "isOpen", IsOpen);
                                                  ^~~~
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'const v8::Local<v8::FunctionTemplate> &' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from
      'v8::Persistent<v8::FunctionTemplate>' to 'v8::Local<v8::FunctionTemplate> &&' for 1st argument
class Local {
      ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'Persistent'
  V8_INLINE Local(Local<S> that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against
      'v8::Persistent<v8::FunctionTemplate>'
  V8_INLINE Local(S* that)
            ^
/Users/muammar/.node-gyp/5.8.0/include/node/node.h:252:71: note: passing argument to parameter 'recv' here
inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
                                                                      ^
../src/bindings.cc:57:10: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; maybe you meant to use '.'?
                                        s_ct->GetFunction());
                                        ~~~~^~
                                            .
../src/bindings.cc:57:12: error: no member named 'GetFunction' in 'v8::Persistent<v8::FunctionTemplate,
      v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
                                        s_ct->GetFunction());
                                        ~~~~  ^
../src/bindings.cc:56:28: error: no member named 'NewSymbol' in 'v8::String'
                        target->Set(v8::String::NewSymbol("input"),
                                    ~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/audio/src/bindings.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:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/node_modules/osx-audio
gyp ERR! node -v v5.8.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/bin/npm" "install" "osx-audio"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE

npm ERR! osx-audio@0.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osx-audio@0.2.1 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 osx-audio 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 osx-audio
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osx-audio
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/npm-debug.log

I followed the recommendation and I checked that npm and node were updated. Is it a local problem with my environment or something else?.

Thanks.

@muammar Hey there! Sorry, osx-audio only supports the (now ancient) 0.10.x series of Node.js; you look to be installing it on 5.x. Unfortunately, it won't support the new version until someone is able to port the native bindings to the newest node; something I can't take on as I don't own a Mac any longer.

If you want to use osx-audio, please install the 0.10.x version of node from https://nodejs.org/download/release/v0.10.43/

Closing this issue, you can follow #7 for details.