As you can see compiler can't find type AccessorInfo
. That's because there is no more such class in v8 API. node-webkit v0.9.2 is based on node 0.11.x branch, so some native addons might not compile or work correctly because of v8 API changes. You need to use node-webkit 0.8.x branch is these cases.
Can't rebuild node-opencv with nw-gyp
-
23-07-2023 - |
Vra
I'm trying to rebuild node-opencv
for use with node-webkit
. To do this you need to use nw-gyp but I'm running into some errors. Could you give me any insight into why this might be?
[~/nw_cv/node_modules/opencv] nw-gyp rebuild --target=0.9.2
gyp info it worked if it ends with ok
gyp info using nw-gyp@0.12.2
gyp info using node@0.10.26 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/nw-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 '/Users/moog/nw_cv/node_modules/opencv/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/moog/.nw-gyp/0.9.2/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/moog/.nw-gyp/0.9.2',
gyp info spawn args '-Dmodule_root_dir=/Users/moog/nw_cv/node_modules/opencv',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/opencv/src/init.o
In file included from ../src/init.cc:2:
../src/Point.h:13:59: error: unknown type name 'AccessorInfo'
static Handle<Value> GetX(Local<String> prop, const AccessorInfo &info);
^
../src/Point.h:14:59: error: unknown type name 'AccessorInfo'
static Handle<Value> GetY(Local<String> prop, const AccessorInfo &info);
^
../src/Point.h:15:84: error: unknown type name 'AccessorInfo'
static void RaiseImmutable(Local<String> property, Local<Value> value, const AccessorInfo& info);
^
3 errors generated.
make: *** [Release/obj.target/opencv/src/init.o] Error 1
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/nw-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:797:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild" "--target=0.9.2"
gyp ERR! cwd /Users/moog/nw_cv/node_modules/opencv
gyp ERR! node -v v0.10.26
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok
Thanks!
Oplossing
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow