Closed andor83 closed 10 years ago
I don't have time to look into this right now, but does anything in this thread help?
I had looked that post over, but this is a different error. I have the latest G++ compiler and it doesn't seem to be a build error, just a "No such file or directory" error.
I had the same problem last Friday. The issue is due to the library files that have been moved around in 149413abdb0f2d2a3984bcbd1dd2652815a02220. I have been working on a PR to resolve this, but haven't finished it yet. I may be able to put something together tomorrow.
My main issue is either that I'd like the portaudio development files to be available under Linux so they can be linked using -lportaudio. Or if someone can point me to a resource on how to create the x64 version of the libportaudio.a file (which if I understood correctly is a container of linked libraries) I can do that as well. Any feedback on this would be appreciated.
I think I committed a fix, but I don't have a linux machine to test on. Could someone try it out? I've already updated the package to 0.3.9
Thanks for the quick update. That does indeed solve the issue where it cannot find that specific file.
On an x64 platform however that will still not make the library work unfortunately. Trying to run simpletest.js
results in
$ node simpletest.js
{ inputChannels: 1, outputChannels: 2 }
About to create the audio engine
node: symbol lookup error: /media/Data/Projects/node-core-audio/build/Release/NodeCoreAudio.node: undefined symbol: Pa_Initialize
This appears to be due to the fact that the library isn't actually linked against portaudio
$ ldd build/Release/NodeCoreAudio.node
linux-vdso.so.1 => (0x00007fffe4bfe000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd4e8c98000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd4e8a82000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd4e86b9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd4e83b5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd4e91cb000)
When I update binding.gyp
to use the development files for portaudio which have been installed on my system (e.g. linking using -lportaudio), the library builds properly.
$ ldd build/Release/NodeCoreAudio.node
linux-vdso.so.1 => (0x00007fffdddb6000)
libportaudio.so.2 => /usr/lib/x86_64-linux-gnu/libportaudio.so.2 (0x00007f029514c000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0294e48000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0294c31000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0294869000)
libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007f0294579000)
libjack.so.0 => /usr/lib/x86_64-linux-gnu/libjack.so.0 (0x00007f029435b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0294153000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0293e4f000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0293c31000)
/lib64/ld-linux-x86-64.so.2 (0x00007f02955aa000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0293a2d000)
So I the nicest solution is probably to rename the win32 and win64 folders to x86 and x64 respectively and to try to get an x64 linux library in there as well. I'm assuming that 64bit Macs would have a similar issue. As I mentioned if you happen to have any resources on how to build that .a I'd be happy to do it, because I'm not quite sure where to look for that.
You should be able to just download the library from their site, and then follow these directions http://portaudio.com/docs/v19-doxydocs/compile_linux.html
Thanks for the quick responseon this everyone. I'll try the above method when i get home this afternoon
I haven't had much luck trying to build the library by hand yet (I can get portaudio to build, but I get the same results as above). I'll probably be able to have a better look at it tomorrow though. I'll keep you posted.
Trying to bring this projcet up to date and close out some issues. @bauglir please open a new issue if you're still having problems :)
I'm trying to install node-core-audio using npm and I'm having a bit of trouble. I should have all the right dependencies installed. Here is the npm output:
npm ERR! not a package /home/andy/tmp/npm-12367-SExsQMFz/1383953451675-0.7504708610940725/tmp.tgz npm http GET https://registry.npmjs.org/node-core-audio npm http 304 https://registry.npmjs.org/node-core-audio npm http GET https://registry.npmjs.org/audio-streamer npm http GET https://registry.npmjs.org/portfinder/0.2.1 npm http GET https://registry.npmjs.org/fft npm http 304 https://registry.npmjs.org/audio-streamer npm http 304 https://registry.npmjs.org/fft npm http 304 https://registry.npmjs.org/portfinder/0.2.1 npm http GET https://registry.npmjs.org/binaryjs npm http GET https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/binaryjs npm http 304 https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/streamws npm http GET https://registry.npmjs.org/binarypack npm http GET https://registry.npmjs.org/streamers npm http 304 https://registry.npmjs.org/streamws npm http 304 https://registry.npmjs.org/streamers npm http 304 https://registry.npmjs.org/binarypack npm http GET https://registry.npmjs.org/underscore/1.2.3 npm http GET https://registry.npmjs.org/buffercursor npm http GET https://registry.npmjs.org/vows/0.6.1 npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/underscore/1.2.3 npm http 304 https://registry.npmjs.org/vows/0.6.1 npm http 304 https://registry.npmjs.org/buffercursor npm http 304 https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/eyes npm http 304 https://registry.npmjs.org/commander
[ws v0.1.1] Attempting to compile blazing fast native extensions. npm http 304 https://registry.npmjs.org/eyes [ws v0.1.1] Native extension compilation successful!
make: Entering directory
/home/andy/Documents/Node/core_audio_test/node_modules/node-core-audio/build' CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/AudioEngine.o CXX(target) Release/obj.target/NodeCoreAudio/NodeCoreAudio/NodeCoreAudio.o SOLINK_MODULE(target) Release/obj.target/NodeCoreAudio.node g++: error: /home/andy/Documents/Node/core_audio_test/node_modules/node-core-audio/gyp/lib/libportaudio.a: No such file or directory make: *** [Release/obj.target/NodeCoreAudio.node] Error 1 make: Leaving directory
/home/andy/Documents/Node/core_audio_test/node_modules/node-core-audio/build' 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.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Linux 3.8.0-33-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/andy/Documents/Node/core_audio_test/node_modules/node-core-audio gyp ERR! node -v v0.10.20 gyp ERR! node-gyp -v v0.10.10 gyp ERR! not ok npm ERR! weird error 1 npm ERR! not ok code 0I think libportaudio.a is just not in the right location in the gyp/lib folder? Look like it's located in the win32 folder instead. I'd move it, but I'm not quite sure how to install from just the git package.
Thanks!!