phonezawphyo / monkey-opencv

Provides method to search subimage inside an image using opencv cv::matchTemplate and cv::minMaxLoc.
9 stars 4 forks source link

Failing to build on Ubuntu 16.04 #2

Open johndierks opened 7 years ago

johndierks commented 7 years ago

Hi, it's me again.

Trying to build this on Ubuntu 16.04 without luck. Any thoughts?

Any idea what might be going on here?



> monkey-opencv@1.0.1 install /home/ubuntu/jdtest/test/node_modules/monkey-opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-fast-template-matcher.s3-us-west-2.amazonaws.com/monkey_opencv/v1.0.1/Release/node-v48-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for monkey-opencv@1.0.1 and node@6.10.0 (node-v48 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build'
  CXX(target) Release/obj.target/monkey_opencv/src/addon.o
In file included from ../src/addon.cc:5:0:
../src/matrix.h:5:27: fatal error: ../inc/Matrix.h: No such file or directory
compilation terminated.
monkey_opencv.target.mk:101: recipe for target 'Release/obj.target/monkey_opencv/src/addon.o' failed
make: *** [Release/obj.target/monkey_opencv/src/addon.o] Error 1
make: Leaving directory '/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64/monkey_opencv.node" "--module_name=monkey_opencv" "--module_path=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64"
gyp ERR! cwd /home/ubuntu/jdtest/test/node_modules/monkey-opencv
gyp ERR! node -v v6.10.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64/monkey_opencv.node --module_name=monkey_opencv --module_path=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ubuntu/jdtest/test/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-62-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/ubuntu/jdtest/test/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ubuntu/jdtest/test/node_modules/monkey-opencv
node-pre-gyp ERR! node -v v6.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64/monkey_opencv.node --module_name=monkey_opencv --module_path=/home/ubuntu/jdtest/test/node_modules/monkey-opencv/build/monkey_opencv/v1.0.1/Release/node-v48-linux-x64' (1)
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "monkey-opencv"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! monkey-opencv@1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the monkey-opencv@1.0.1 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the monkey-opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs monkey-opencv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls monkey-opencv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/jdtest/test/npm-debug.log```
johndierks commented 7 years ago

I believe this is an issue with how the find-opencv.js script works on ubuntu.

Installing opencv using apt-get worked, but did not populate pkg-config in such a way that it could find the correct binaries.

I got it working appropriately, but I believe this is an issue.

Thanks for your work on this project.

catz85 commented 7 years ago

Can you tell how you get working it? I Have same issue on ubuntu 14.04.

johndierks commented 7 years ago

I never got it solved directly but it was quick to refactor my code to work with the opencv package directly.