Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on OSX. #4

Closed
notthetup opened this issue Jan 8, 2013 · 9 comments
Closed

Build error on OSX. #4

notthetup opened this issue Jan 8, 2013 · 9 comments

Comments

@notthetup
Copy link

Hello,

I tried to install using npm

npm install node-core-audio

It failed in the node-gyp rebuild stage with this error

In file included from ../NodeCoreAudio/NodeCoreAudio.cpp:4:
In file included from /Users/chinmay/Documents/Sonoport/js/triggerjs/node_modules/node-core-audio/NodeCoreAudio/stdafx.h:8:
/Users/chinmay/Documents/Sonoport/js/triggerjs/node_modules/node-core-audio/NodeCoreAudio/targetver.h:8:10: fatal error: 'SDKDDKVer.h' file not found
#include <SDKDDKVer.h>
         ^
1 error generated.
make: *** [Release/obj.target/NodeCoreAudio/NodeCoreAudio/NodeCoreAudio.o] Error 1

I am wondering why an OSX build is looking for SDKDDKVer.h file. Also I saw it trying to copy portaudio_x86.dll earlier. Some part of the windows code left over?

@notthetup
Copy link
Author

Seems like npm is pulling the windows branch?

@notthetup
Copy link
Author

OK. Figured it out. npm doesn't have 0.2.0. I'll try with git. :)

@ZECTBynmo
Copy link
Member

Ah, this is my mistake. I'm busy moving things to libuv so they can be cross platform, but I haven't pushed up to master yet or updated npm. Try the "mutex" branch. That's the bleeding edge so to speak.

@notthetup
Copy link
Author

No prob. I am on the mutex branch. Got node-gyp to build. There were a couple of compile errors and warnings in AudioEngine.cpp but simple to fix.

I am trying the simpletest.js and it errors out..

/Users/chinmay/Documents/Sonoport/js/triggerjs/node-core-audio/node-core-audio.js:79
    var numChannels = this.audioEngine.getNumInputChannels();
                                       ^
TypeError: Object #<AudioEngine> has no method 'getNumInputChannels'
    at AudioEngine.getProcessAudio (/Users/chinmay/Documents/Sonoport/js/triggerjs/node-core-audio/node-core-audio.js:79:37)
    at Timer.<anonymous> (/Users/chinmay/Documents/Sonoport/js/triggerjs/node-core-audio/node-core-audio.js:63:43)
    at Timer.exports.setInterval.timer.ontimeout (timers.js:234:14)

Looking through the debugger, if I break just before node-core-audio.js:80 in AudioEngine.prototype.getProcessAudio and this.audioEngine is empty..

> this
{ audioEngine: {},
  processBuffer: [ [], [], [], [], [], [] ],
  didProcessAudio: false,
  tempBuffer: [],
  outputBuffer: [],
  uiUpdateCallbacks: [],
  processingCallbacks: [] }
> self
{ audioEngine: {},
  processBuffer: [ [], [], [], [], [], [] ],
  didProcessAudio: false,
  tempBuffer: [],
  outputBuffer: [],
  uiUpdateCallbacks: [],
  processingCallbacks: [] }

I am looking at the native code. But I though I'd just let you know as well.

Apologies the many updates, and the noobish qns. I am pretty new to JS, so just figuring my way out.

@gbox3d
Copy link

gbox3d commented Feb 6, 2013

i use mutex brach but meet error in macOSX

lee-ui-MacBook-Pro:node-core-audio-mutex gbox3d$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.2
gyp info using node@0.8.16 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/gbox3d/Downloads/node-core-audio-mutex/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/gbox3d/.node-gyp/0.8.16/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/gbox3d/.node-gyp/0.8.16',
gyp info spawn args '-Dmodule_root_dir=/Users/gbox3d/Downloads/node-core-audio-mutex',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.o
../NodeCoreAudio/AudioEngine.cpp:94:9: error: no matching function for call to
'uv_thread_create'
uv_thread_create(&ptStreamThread, NULL,...
^~~~~~~~~~~~~~~~
/Users/gbox3d/.node-gyp/0.8.16/deps/uv/include/uv.h:1717:15: note: candidate
function not viable: no known conversion from 'void (void *)' to 'void *'
for 3rd argument
UV_EXTERN int uv_thread_create(uv_thread_t *tid,
^
1 error 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/node-gyp/lib/build.js:255:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.2.1
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/gbox3d/Downloads/node-core-audio-mutex
gyp ERR! node -v v0.8.16
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok

@andor83
Copy link

andor83 commented Mar 28, 2013

Also having trouble building Mutex branch on osx 10.8.3. notthetup, what changes did you make to get this to compile? I'd love to use this as it looks like this is the only package supporting audio input devices. Here's the console log:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.9.2
gyp info using node@0.10.1 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/andy/node/audiotest/node_modules/node-core-audio/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/andy/.node-gyp/0.10.1/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/andy/.node-gyp/0.10.1',
gyp info spawn args '-Dmodule_root_dir=/Users/andy/node/audiotest/node_modules/node-core-audio',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.o
../NodeCoreAudio/AudioEngine.cpp:94:9: error: no matching function for call to 'uv_thread_create'
uv_thread_create(&ptStreamThread, NULL, Audio::AudioEngine::streamThread);
^~~~~~~~~~~~~~~~
/Users/andy/.node-gyp/0.10.1/deps/uv/include/uv.h:1900:15: note: candidate function not viable: no known conversion
from 'void (void *)' to 'void *' for 3rd argument
UV_EXTERN int uv_thread_create(uv_thread_t *tid,
^
1 error 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/node-gyp/lib/build.js:256:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:754:12)
gyp ERR! System Darwin 12.3.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/andy/node/audiotest/node_modules/node-core-audio
gyp ERR! node -v v0.10.1
gyp ERR! node-gyp -v v0.9.2
gyp ERR! not ok

@ZECTBynmo
Copy link
Member

I'm sorry guys! I've been super busy over the last couple months, and I'm in the process of moving right now, so I haven't been able to get things working on the mutex branch. I'm really glad to see some excitement about this project, so it's floating back towards the top of my priority list. You can expect to see this working for unix systems (hopefully) in the next few weeks.

@ZECTBynmo ZECTBynmo reopened this Mar 29, 2013
@ZECTBynmo
Copy link
Member

Oops didn't mean to close...

@ZECTBynmo
Copy link
Member

Try things now on master, I've done a bunch of work and things should be more functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants