Open mrluc opened 11 years ago
Is this related to this pull request (for installation under linux)?
I'm sorry I don't have an up-to-date linux system available here, but try editing binding.gyp and remove the lines where rtti is disabled: 'cflags_cc!': ['-fno-rtti'], 'cflags_cc+': ['-frtti']
See if that helps ?
i am experiencing the same issue on osx 10.8.2 with brew installed opencv 2.4.4. removing those two lines from the binding.gyp does not appear to work. here is my npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using npm@1.1.48
3 info using node@v0.8.5
4 verbose node symlink /usr/local/bin/node
5 verbose config file /Users/jnagro/.npmrc
6 verbose config file /usr/local/etc/npmrc
7 verbose config file /usr/local/lib/node_modules/npm/npmrc
8 verbose read json /Users/jnagro/Documents/src/gh/codeboost-opencv-node/package.json
9 verbose readDependencies using package.json deps
10 verbose install where, deps [ '/Users/jnagro/Documents/src/gh/codeboost-opencv-node',
10 verbose install [ 'coffee-script', 'underscore', 'keypress' ] ]
11 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/package.json
12 info preinstall opencv-node@0.2.6
13 verbose read json /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/coffee-script/package.json
14 verbose read json /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/keypress/package.json
15 verbose read json /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/underscore/package.json
16 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/package.json
17 verbose readDependencies using package.json deps
18 verbose read json /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/.bin/package.json
19 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/coffee-script/package.json
20 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/keypress/package.json
21 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/node_modules/underscore/package.json
22 verbose already installed skipping coffee-script@>=1.3.3 /Users/jnagro/Documents/src/gh/codeboost-opencv-node
23 verbose already installed skipping underscore@>=1.3.3 /Users/jnagro/Documents/src/gh/codeboost-opencv-node
24 verbose already installed skipping keypress@* /Users/jnagro/Documents/src/gh/codeboost-opencv-node
25 silly resolved []
26 info build /Users/jnagro/Documents/src/gh/codeboost-opencv-node
27 verbose from cache /Users/jnagro/Documents/src/gh/codeboost-opencv-node/package.json
28 verbose linkStuff [ false, false, false, '/Users/jnagro/Documents/src/gh' ]
29 info linkStuff opencv-node@0.2.6
30 verbose linkBins opencv-node@0.2.6
31 verbose linkMans opencv-node@0.2.6
32 verbose rebuildBundles opencv-node@0.2.6
33 verbose rebuildBundles [ '.bin', 'coffee-script', 'keypress', 'underscore' ]
34 info install opencv-node@0.2.6
35 verbose unsafe-perm in lifecycle true
36 silly exec sh "-c" "node-gyp configure build"
37 silly sh,-c,node-gyp configure build,/Users/jnagro/Documents/src/gh/codeboost-opencv-node spawning
38 info opencv-node@0.2.6 Failed to exec install script
39 error opencv-node@0.2.6 install: `node-gyp configure build`
39 error `sh "-c" "node-gyp configure build"` failed with 1
40 error Failed at the opencv-node@0.2.6 install script.
40 error This is most likely a problem with the opencv-node package,
40 error not with npm itself.
40 error Tell the author that this fails on your system:
40 error node-gyp configure build
40 error You can get their info via:
40 error npm owner ls opencv-node
40 error There is likely additional logging output above.
41 error System Darwin 12.2.1
42 error command "node" "/usr/local/bin/npm" "install"
43 error cwd /Users/jnagro/Documents/src/gh/codeboost-opencv-node
44 error node -v v0.8.5
45 error npm -v 1.1.48
46 error code ELIFECYCLE
47 verbose exit [ 1, true ]
console output of npm install
➜ codeboost-opencv-node git:(master) ✗ npm install
> opencv-node@0.2.6 install /Users/jnagro/Documents/src/gh/codeboost-opencv-node
> node-gyp configure build
CXX(target) Release/obj.target/addon/src/addon.o
In file included from ../src/addon.cpp:3:
../src/bea.h:639:8: warning: unused variable 'nField' [-Wunused-variable]
int nField = o->InternalFieldCount();
^
../src/bea.h:640:9: warning: unused variable 'isExt' [-Wunused-variable]
bool isExt = v->IsExternal();
^
../src/bea.h:645:10: warning: unused variable 'p' [-Wunused-variable]
void* p = o->GetPointerFromInternalField(1);
^
In file included from ../src/addon.cpp:4:
In file included from ../src/opencvjs.h:5:
In file included from /usr/local/include/opencv/cv.hpp:50:
In file included from /usr/local/include/opencv/cv.h:69:
In file included from /usr/local/include/opencv2/flann/flann.hpp:50:
In file included from /usr/local/include/opencv2/flann/flann_base.hpp:41:
In file included from /usr/local/include/opencv2/flann/params.h:33:
/usr/local/include/opencv2/flann/any.h:60:51: error: cannot use typeid with -fno-rtti
virtual const std::type_info& type() { return typeid(T); }
^
/usr/local/include/opencv2/flann/any.h:248:31: error: cannot use typeid with -fno-rtti
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
^
/usr/local/include/opencv2/flann/any.h:257:31: error: cannot use typeid with -fno-rtti
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
^
/usr/local/include/opencv2/flann/any.h:266:34: error: cannot use typeid with -fno-rtti
return policy->type() == typeid(anyimpl::empty_any);
^
/usr/local/include/opencv2/flann/any.h:286:34: error: cannot use typeid with -fno-rtti
return policy->type() == typeid(T);
^
In file included from ../src/addon.cpp:4:
In file included from ../src/opencvjs.h:8:
../src/customTypes.h:160:27: warning: no newline at end of file [-Wnewline-eof]
#endif //__CUSTOMTYPES_H__
^
In file included from ../src/addon.cpp:4:
../src/opencvjs.h:617:28: warning: no newline at end of file [-Wnewline-eof]
#endif //#ifndef OPENCVJS_H
^
5 warnings and 5 errors generated.
make: *** [Release/obj.target/addon/src/addon.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/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 12.2.1
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/jnagro/Documents/src/gh/codeboost-opencv-node
gyp ERR! node -v v0.8.5
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
npm ERR! opencv-node@0.2.6 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 1
npm ERR!
npm ERR! Failed at the opencv-node@0.2.6 install script.
npm ERR! This is most likely a problem with the opencv-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls opencv-node
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jnagro/Documents/src/gh/codeboost-opencv-node
npm ERR! node -v v0.8.5
npm ERR! npm -v 1.1.48
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jnagro/Documents/src/gh/codeboost-opencv-node/npm-debug.log
npm ERR! not ok code 0
node 0.8.14 npm 1.1.65 osx 10.7.4
Running
npm install opencv-node
fails as follows.