Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile in Node.js v8 fails. #542

Closed
mikeal opened this issue Sep 7, 2017 · 10 comments
Closed

Compile in Node.js v8 fails. #542

mikeal opened this issue Sep 7, 2017 · 10 comments

Comments

@mikeal
Copy link

mikeal commented Sep 7, 2017

Looks like this isn't compatible with new V8 because of some recent deprecations.

Here's the full log.

[REMOVED, see below]

@mikeal
Copy link
Author

mikeal commented Sep 7, 2017

I cloned the repo and upgraded nan. Now I'm getting a much smaller error :)

 % npm run build                                                                                              

> [email protected] build /Users/mikeal/git/node-opencv
> node-gyp build

  CXX(target) Release/obj.target/opencv/src/Matrix.o
../src/Matrix.cc:1687:7: error: no member named 'calcOpticalFlowPyrLK' in namespace 'cv'
  cv::calcOpticalFlowPyrLK(old_gray, new_gray, old_points, new_points, status, err, winSize, maxLevel, criteria, flags, minEigThreshold);
  ~~~~^
1 error generated.
make: *** [Release/obj.target/opencv/src/Matrix.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:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /Users/mikeal/git/node-opencv
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mikeal/.npm/_logs/2017-09-07T00_16_41_045Z-debug.log

@mikeal
Copy link
Author

mikeal commented Sep 7, 2017

OpenCV Version is 3.3.0

@justadudewhohacks
Copy link

OpenCV 3.3 is quite new, probably not supported yet.

@fakob
Copy link
Contributor

fakob commented Sep 9, 2017

I am getting the same error but I have OpenCV Version 3.2.0 installed.

@rjschie
Copy link

rjschie commented Sep 11, 2017

I was getting this error as well, and used OpenCV 2.4.x from Homebrew: brew tap homebrew/science then brew install opencv@2. This installs OpenCV 2.4.x, however it still won't create the proper symlinks, so then you'll need to run brew link --force opencv@2 to do that, or manually add to the opencv@2 libs to your PATH and PKG_CONFIG_PATH in your profile.

Now I have the following versions and it's working fine:
Node 8.4
OpenCV 2.4.13.2

@peterbraden
Copy link
Owner

It's not a fix but the calcOpticalFlowPyrLK error is because opencv was compiled without a link to -lopencv_video

I guess we should have a compile macro to check for features like this.

shamrin added a commit to shamrin/node-opencv that referenced this issue Oct 3, 2017
@shamrin
Copy link
Contributor

shamrin commented Oct 3, 2017

@rjschie your suggestion has also worked for me on node v6.11.3 (latest LTS for 6.x release)

@mikestopcontinues
Copy link

@rjschie works here too with node 9.2.0 and OSX 10.13.1 with brew link --force --overwrite opencv@2.

@peterbraden
Copy link
Owner

Now works in node 12 after #667.

@marcoippolito
Copy link

@peterbraden Is the problem I described here: #669
somewhat related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants