TooTallNate / node-ogg

Node.js native binding to libogg
MIT License
65 stars 36 forks source link

Error installing on Raspberry Pi (256mb) #8

Closed nfriedly closed 9 years ago

nfriedly commented 9 years ago

Hey, I just tried to install the update for use with node-opus, but I'm having an issue:

pi@raspberrypi ~/nodeplayer $ node -v
v0.12.2
pi@raspberrypi ~/nodeplayer $ npm -v
2.7.4
pi@raspberrypi ~/nodeplayer $ npm install ogg@1.2.0
|
> ogg@1.2.0 install /home/pi/nodeplayer/node_modules/ogg
> node-gyp rebuild

make: Entering directory '/home/pi/nodeplayer/node_modules/ogg/build'
  CC(target) Release/obj.target/libogg/deps/libogg/src/framing.o
In file included from ../deps/libogg/include/ogg/ogg.h:25:0,
                 from ../deps/libogg/src/framing.c:25:
../deps/libogg/include/ogg/os_types.h:143:32: fatal error: ogg/config_types.h: No such file or directory
compilation terminated.
deps/libogg/libogg.target.mk:89: recipe for target 'Release/obj.target/libogg/deps/libogg/src/framing.o' failed
make: *** [Release/obj.target/libogg/deps/libogg/src/framing.o] Error 1
make: Leaving directory '/home/pi/nodeplayer/node_modules/ogg/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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.18.12+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/nodeplayer/node_modules/ogg
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Linux 3.18.12+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ogg@1.2.0"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! ogg@1.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ogg@1.2.0 install script 'node-gyp rebuild'.
...

Any ideas?

nfriedly commented 9 years ago

Oh, actually, I think I know what it is - there's no arm config - https://github.com/TooTallNate/node-ogg/tree/master/deps/libogg/config/linux I'm about out of time for tonight, but I'll see if I can figure one out tomorrow.

TooTallNate commented 9 years ago

Ya, PR welcome. See https://github.com/TooTallNate/node-ogg/blob/master/deps/libogg/config/README

nfriedly commented 9 years ago

Hey, I found a few minutes, and that was pretty easy. It now installs.. although I still can't get it to play audio (but I'm not sure this one is node-ogg's fault):

ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
[../deps/mpg123/src/output/alsa.c:165] error: cannot open device default
node: pcm_params.c:2286: snd_pcm_hw_refine: Assertion `pcm && params' failed.
Aborted

Any ideas what to look at there?

(update: actually, I have an idea, testing...)

update 2: nevermind: that was because I had set USB audio as the default device so that I could use a microphone, but then I unplugged the mic. Audio plays! (Although it's still scratchy on the Pi. But everything sounds perfect on my macbook at least.)