TooTallNate / node-speaker

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

get ERR when install with npm_config_arch=ia32 #32

Closed needood closed 10 years ago

needood commented 10 years ago
export npm_config_arch=ia32
export npm_config_target=0.11.10
nvm use 0.11.10
npm install speaker

error log:

/home/hata/.node-gyp/0.11.10/deps/v8/include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
   typedef internal::Internals I;
                               ^
  SOLINK_MODULE(target) Release/obj.target/binding.node
/usr/bin/ld: cannot find -lasound
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/binding.node] Error 1
make: Leaving directory `/home/hata/node_modules/speaker/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/hata/.nvm/v0.11.10/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:104:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:862:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/home/hata/.nvm/v0.11.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/hata/node_modules/speaker
gyp ERR! node -v v0.11.10
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! speaker@0.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the speaker@0.1.0 install script.
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! System Linux 3.13.0-24-generic
npm ERR! command "/home/hata/.nvm/v0.11.10/bin/node" "/home/hata/.nvm/v0.11.10/bin/npm" "install" "speaker"
npm ERR! cwd /home/hata
npm ERR! node -v v0.11.10
npm ERR! npm -v 1.3.22
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/hata/npm-debug.log
npm ERR! not ok code 0
TooTallNate commented 10 years ago

You probably don't have a 32-bit version of -lsound lib installed.

footniko commented 10 years ago

Did you solve this problem? I also have the same issue. I have installed libasound2-dev but it not helps(

footniko commented 10 years ago

I solve my problem by putting libasound files from my target arm device to my native PC to /usr/lib folders and adding flag: export LDFLAGS="-L/usr/lib". Thanks, TooTallNate for the great module!