Closed joshbirk closed 8 years ago
Looks like it might be a node 0.12 issue https://github.com/apiaryio/protagonist/issues/43
This might help too. I will try looking into this, but my C++ is pretty rusty. https://strongloop.com/strongblog/node-js-v0-12-c-apis-breaking/
So I can confirm this works fine if you downgrade to 0.10
Fixed
I started fresh on a Pi running Raspian with a new git pull / build of both sphinxbase and pocketsphinx. I made sure to export PKG_CONFIG_PATH before building. What works fine in OSX is hitting this error when I node-gyp rebuild:
gyp info it worked if it ends with ok gyp info using node-gyp@2.0.1 gyp info using node@0.12.0 | linux | arm gyp info spawn python2 gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py', 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 '/home/joshua.birk/sphinx/node-pocketsphinx/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 '/home/joshua.birk/.node-gyp/0.12.0/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/joshua.birk/.node-gyp/0.12.0', gyp info spawn args '-Dmodule_root_dir=/home/joshua.birk/sphinx/node-pocketsphinx', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp infomake: Entering directory '/home/joshua.birk/sphinx/node-pocketsphinx/build' CXX(target) Release/obj.target/PocketSphinx/src/Factory.o spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] In file included from ../src/Factory.cpp:2:0: ../src/Recognizer.h:12:1: error: expected class-name before ‘{’ token ../src/Recognizer.h:20:41: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:20:56: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:22:43: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:22:58: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:23:42: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:23:57: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:24:45: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:24:60: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:26:43: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:26:58: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:27:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:27:62: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:29:56: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:29:71: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:30:55: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:30:70: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:31:54: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:31:69: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:32:52: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:32:67: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:34:85: error: ‘AccessorInfo’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:34:103: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive] ../src/Recognizer.h:35:90: error: ‘AccessorInfo’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:35:108: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive] ../src/Recognizer.h:37:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type ../src/Recognizer.h:37:62: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] ../src/Recognizer.h:40:26: error: ‘uv_work_t’ has not been declared ../src/Recognizer.h:41:25: error: ‘uv_work_t’ has not been declared PocketSphinx.target.mk:88: recipe for target 'Release/obj.target/PocketSphinx/src/Factory.o' failed make: *\ [Release/obj.target/PocketSphinx/src/Factory.o] Error 1 make: Leaving directory '/home/joshua.birk/sphinx/node-pocketsphinx/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/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:1067:12) gyp ERR! System Linux 3.18.7-v7+ gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd /home/joshua.birk/sphinx/node-pocketsphinx gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v2.0.1 gyp ERR! not ok