cmusphinx / node-pocketsphinx

Pocketsphinx bindings for Node.JS
Other
242 stars 47 forks source link

Raspberry Pi : unrecognized option -javascript #23

Closed burf2000 closed 8 years ago

burf2000 commented 8 years ago

I am trying to get the node version working on a Raspberry Pi, I have pocketSpinx installed etc (followed https://wolfpaulus.com/journal/embedded/raspberrypi2-sr/).

When I try to do npm install I get

pocketsphinx@5.0.5 install /home/pi/node-pocketsphinx-master

node-gyp rebuild

make: Entering directory '/home/pi/node-pocketsphinx-master/build' ACTION Checking for sphinxbase and pocketsphinx version 5prealpha with pkg-config . ACTION Creating sphinxbase wrapper sb.cpp swig error : Unrecognized option -javascript swig error : Unrecognized option -node Use 'swig -help' for available options. SphinxBase.target.mk:26: recipe for target 'sb.cpp' failed make: *\ [sb.cpp] Error 1 make: Leaving directory '/home/pi/node-pocketsphinx-master/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: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 Linux 4.1.18-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node-pocketsphinx-master gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok

npm ERR! Linux 4.1.18-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! pocketsphinx@5.0.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pocketsphinx@5.0.5 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the pocketsphinx 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 pocketsphinx npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/pi/node-pocketsphinx-master/npm-debug.log pi@raspberrypi:~/node-pocketsphinx-master $

nshmyrev commented 8 years ago

You need to use swig at least 3.0.7

nshmyrev commented 8 years ago

I changed build from node-gyp to cmake-js, now better dependency checks and more straightforward compilation process. Check it out