AudioNet / node-core-audio

Bindings for PortAudio giving JavaScript access to sound card samples (mostly unmaintained)
MIT License
330 stars 68 forks source link

Installation fails #40

Closed seymar closed 9 years ago

seymar commented 9 years ago

I can't seem to get node-core-audio installed, this are the errors I get:

npm install node-core-audio
|
> node-core-audio@0.4.1 install /node/node_modules/node-core-audio
> node-gyp rebuild

  CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.o
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:32:50: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> NewInstance(const v8::Arguments& args);
                                                               ^~~~~~~~~~~~~
                                                               v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:43: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                                        ^~~~~~~~~~~~~
                                                        v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:47:48: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> isActive( const v8::Arguments& args );
                                                             ^~~~~~~~~~~~~
                                                             v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:49:53: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> getDeviceName( const v8::Arguments& args );
                                                                  ^~~~~~~~~~~~~
                                                                  v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:51:53: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> getNumDevices( const v8::Arguments& args );
                                                                  ^~~~~~~~~~~~~
                                                                  v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:56:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> write( const v8::Arguments& args );                //!< Write samples to the current audio device
                                                          ^~~~~~~~~~~~~
                                                          v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:57:44: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> read( const v8::Arguments& args );                 //!< Read samples from the current audio device
                                                         ^~~~~~~~~~~~~
                                                         v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:58:53: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> isBufferEmpty( const v8::Arguments& args );        //!< Returns whether the data buffer is empty
                                                                  ^~~~~~~~~~~~~
                                                                  v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:60:50: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> setOptions( const v8::Arguments& args );   //!< Set options, restarts audio stream
                                                               ^~~~~~~~~~~~~
                                                               v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../NodeCoreAudio/AudioEngine.cpp:9:
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:61:50: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
                static v8::Handle<v8::Value> getOptions( const v8::Arguments& args );   //!< Gets options
                                                               ^~~~~~~~~~~~~
                                                               v8::internal::Arguments
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../NodeCoreAudio/AudioEngine.cpp:30:2: warning: field 'm_pLocker' will be initialized after field 'm_bOutputIsEmpty' [-Wreorder]
        m_pLocker(new Locker(Isolate::GetCurrent())),
        ^
../NodeCoreAudio/AudioEngine.cpp:59:31: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'int'
        m_hInputBuffer = Array::New( m_uInputChannels );
                                     ^~~~~~~~~~~~~~~~
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:2417:36: note: passing argument to parameter 'isolate' here
  static Local<Array> New(Isolate* isolate, int length = 0);
                                   ^
../NodeCoreAudio/AudioEngine.cpp:61:45: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'int'
                m_hInputBuffer->Set( iChannel, Array::New(m_uSamplesPerBuffer) );
                                                          ^~~~~~~~~~~~~~~~~~~
/Users/seymar/.node-gyp/0.12.0/deps/v8/include/v8.h:2417:36: note: passing argument to parameter 'isolate' here
  static Local<Array> New(Isolate* isolate, int length = 0);
                                   ^
../NodeCoreAudio/AudioEngine.cpp:68:40: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
                ThrowException( Exception::TypeError(String::New("Error: No default input device")) );
                                                     ^~~~~~~~~~~
                                                     New
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:32: note: 'New' declared here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                             ^
../NodeCoreAudio/AudioEngine.cpp:68:52: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [31]'
                ThrowException( Exception::TypeError(String::New("Error: No default input device")) );
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:58: note: passing argument to parameter 'args' here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                                                       ^
../NodeCoreAudio/AudioEngine.cpp:73:40: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
                ThrowException( Exception::TypeError(String::New("Error: No default output device")) );
                                                     ^~~~~~~~~~~
                                                     New
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:32: note: 'New' declared here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                             ^
../NodeCoreAudio/AudioEngine.cpp:73:52: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [32]'
                ThrowException( Exception::TypeError(String::New("Error: No default output device")) );
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:58: note: passing argument to parameter 'args' here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                                                       ^
../NodeCoreAudio/AudioEngine.cpp:77:40: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
                ThrowException( Exception::TypeError(String::New("Failed to initialize audio engine")) );
                                                     ^~~~~~~~~~~
                                                     New
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:32: note: 'New' declared here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                             ^
../NodeCoreAudio/AudioEngine.cpp:77:52: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [34]'
                ThrowException( Exception::TypeError(String::New("Failed to initialize audio engine")) );
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:58: note: passing argument to parameter 'args' here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                                                       ^
../NodeCoreAudio/AudioEngine.cpp:102:40: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
                ThrowException( Exception::TypeError(String::New("Failed to open audio stream")) );
                                                     ^~~~~~~~~~~
                                                     New
/node/node_modules/node-core-audio/NodeCoreAudio/AudioEngine.h:44:32: note: 'New' declared here
                static v8::Handle<v8::Value> New( const v8::Arguments& args );  //!< Create a v8 object
                                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.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:269: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 /node/node_modules/node-core-audio
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "node-core-audio"
npm ERR! node v0.12.0
npm ERR! npm  v2.7.3
npm ERR! code ELIFECYCLE

npm ERR! node-core-audio@0.4.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-core-audio@0.4.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-core-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 their info via:
npm ERR!     npm owner ls node-core-audio
npm ERR! There is likely additional logging output above.
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "node-core-audio"
npm ERR! node v0.12.0
npm ERR! npm  v2.7.3

npm ERR! Uncaught, unspecified "error" event.
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /node/npm-debug.log
odensc commented 9 years ago

Having the same problem, it probably needs to be ported to NAN.

odensc commented 9 years ago

It seems to build fine in 0.10, but it still needs to be updated for io.js/0.12.

ghost commented 9 years ago

Also unable to install, getting the same error on v0.12.1.

guicontat commented 9 years ago

got the same !!!!!

ZECTBynmo commented 9 years ago

Please try to install the package again, I've updated the version in npm

guicontat commented 9 years ago

I have succeeded to install the package. I just got those warnings :

npm WARN package.json bookedup@0.0.1-23 No repository field. npm WARN package.json bookedup@0.0.1-23 No license field. /

node-core-audio@0.5.0 install /var/www/bookedup/node_modules/node-core-audio node-gyp rebuild

make: entrant dans le répertoire « /var/www/bookedup/node_modules/node-core-audio/build » CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.o In file included from ../NodeCoreAudio/AudioEngine.cpp:9:0: ../NodeCoreAudio/AudioEngine.h: In constructor ‘Audio::AudioEngine::AudioEngine(v8::Localv8::Object)’: ../NodeCoreAudio/AudioEngine.h:121:11: warning: ‘Audio::AudioEngine::m_pLocker’ will be initialized after [-Wreorder] Locker* m_pLocker; ^ ../NodeCoreAudio/AudioEngine.h:111:5: warning: ‘bool Audio::AudioEngine::m_bOutputIsEmpty’ [-Wreorder] m_bOutputIsEmpty, ^ ../NodeCoreAudio/AudioEngine.cpp:33:1: warning: when initialized here [-Wreorder] Audio::AudioEngine::AudioEngine( Local options ) : ^ ../NodeCoreAudio/AudioEngine.cpp: In member function ‘void Audio::AudioEngine::applyOptions(v8::Localv8::Object)’: ../NodeCoreAudio/AudioEngine.cpp:226:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < oldBufferCount; i++) { ^ ../NodeCoreAudio/AudioEngine.cpp: In member function ‘void Audio::AudioEngine::RunAudioLoop()’: ../NodeCoreAudio/AudioEngine.cpp:401:31: warning: ‘error’ may be used uninitialized in this function [-Wmaybe-uninitialized] m_bInputOverflowed = (error != paNoError); ^ CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/NodeCoreAudio.o SOLINK_MODULE(target) Release/obj.target/NodeCoreAudio.node SOLINK_MODULE(target) Release/obj.target/NodeCoreAudio.node: Finished COPY Release/NodeCoreAudio.node make: quittant le répertoire « /var/www/bookedup/node_modules/node-core-audio/build » node-core-audio@0.5.0 node_modules/node-core-audio ├── portfinder@0.2.1 (mkdirp@0.0.7) └── waveheader@0.0.2 (debug@0.7.4)

meirotstein commented 8 years ago

Having another issue, but similar:

c:\Users\user\workspace\lista\node_modules\node-core-audio>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Copying c:\Users\user\workspace\lista\node_modules\node-core-audio/gyp/lib/win64/portaudio_x64.lib to c:\Users\user\works pace\lista\node_modules\node-core-audio/build/Release/portaudio_x64.lib 1 file(s) copied. Copying c:\Users\user\workspace\lista\node_modules\node-core-audio/gyp/lib/win64/portaudio_x64.dll to c:\Users\user\works pace\lista\node_modules\node-core-audio/build/Release/portaudio_x64.dll 1 file(s) copied. AudioEngine.cpp NodeCoreAudio.cpp C:\Users\user\.node-gyp\5.4.0\include\node\node_internals.h(5): fatal error C1083: Cannot open include file: 'util.h': No such file or directory (compiling source file ..\NodeCoreAudio\AudioEngine.cpp) [c:\Users\user\workspace\lista\node_modules\node-c ore-audio\build\NodeCoreAudio.vcxproj] C:\Users\user\.node-gyp\5.4.0\include\node\node_internals.h(5): fatal error C1083: Cannot open include file: 'util.h': No such file or directory (compiling source file ..\NodeCoreAudio\NodeCoreAudio.cpp) [c:\Users\user\workspace\lista\node_modules\node -core-audio\build\NodeCoreAudio.vcxproj] gyp ERR! build error gyp ERR! stack Error:C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd c:\Users\user\workspace\lista\node_modules\node-core-audio gyp ERR! node -v v5.4.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.3.9600 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-core-audio" "--save" npm ERR! node v5.4.0 npm ERR! npm v3.3.12 npm ERR! code ELIFECYCLE

npm ERR! node-core-audio@0.5.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-core-audio@0.5.0 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 node-core-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 their info via: npm ERR! npm owner ls node-core-audio npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! c:\Users\user\workspace\lista\npm-debug.log`

mohammad1ta commented 4 years ago

Same issue