justadudewhohacks / justadudewhohacks/opencv4nodejs
M1 macos big sur 11.4 error install
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
node --version v14.17.3
npm --version 6.14.13
brew --version 3.2.2
```
1. brew install opencv@4
2. brew link --force opencv@4
3. export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
4. npm install opencv4nodejs
```
Terminal output after excute step 4
# Error Message
opencv-build@0.1.9 install /Users/timowan/node_modules/opencv-build
node ./install.js
info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set
info install skipping auto build...
opencv4nodejs@5.6.0 install /Users/timowan/node_modules/opencv4nodejs
node ./install/install.js
info install using lib dir: /opt/homebrew/Cellar/opencv/4.5.3/lib
info install found the following libs:
info install core : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_core.4.5.3.dylib
info install highgui : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_highgui.4.5.3.dylib
info install imgcodecs : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_imgcodecs.4.5.3.dylib
info install imgproc : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_imgproc.4.5.3.dylib
info install features2d : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_features2d.4.5.3.dylib
info install calib3d : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_calib3d.4.5.3.dylib
info install photo : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_photo.4.5.3.dylib
info install objdetect : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_objdetect.4.5.3.dylib
info install ml : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_ml.4.5.3.dylib
info install video : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_video.4.5.3.dylib
info install videoio : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_videoio.4.5.3.dylib
info install videostab : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_videostab.4.5.3.dylib
info install dnn : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_dnn.4.5.3.dylib
info install face : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_face.4.5.3.dylib
info install text : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_text.4.5.3.dylib
info install tracking : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_tracking.4.5.3.dylib
info install xfeatures2d : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_xfeatures2d.4.5.3.dylib
info install ximgproc : /opt/homebrew/Cellar/opencv/4.5.3/lib/libopencv_ximgproc.4.5.3.dylib
info install OPENCV_INCLUDE_DIR is not set, looking for default include dir
info install setting the following defines:
info defines OPENCV4NODEJS_FOUND_LIBRARY_CORE
info defines OPENCV4NODEJS_FOUND_LIBRARY_HIGHGUI
info defines OPENCV4NODEJS_FOUND_LIBRARY_IMGCODECS
info defines OPENCV4NODEJS_FOUND_LIBRARY_IMGPROC
info defines OPENCV4NODEJS_FOUND_LIBRARY_FEATURES2D
info defines OPENCV4NODEJS_FOUND_LIBRARY_CALIB3D
info defines OPENCV4NODEJS_FOUND_LIBRARY_PHOTO
info defines OPENCV4NODEJS_FOUND_LIBRARY_OBJDETECT
info defines OPENCV4NODEJS_FOUND_LIBRARY_ML
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEO
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOIO
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOSTAB
info defines OPENCV4NODEJS_FOUND_LIBRARY_DNN
info defines OPENCV4NODEJS_FOUND_LIBRARY_FACE
info defines OPENCV4NODEJS_FOUND_LIBRARY_TEXT
info defines OPENCV4NODEJS_FOUND_LIBRARY_TRACKING
info defines OPENCV4NODEJS_FOUND_LIBRARY_XFEATURES2D
info defines OPENCV4NODEJS_FOUND_LIBRARY_XIMGPROC
info install setting the following includes:
info includes /usr/local/include
info includes /usr/local/include/opencv4
info install setting the following libs:
info libs -L/opt/homebrew/Cellar/opencv/4.5.3/lib
info libs -lopencv_core
info libs -lopencv_highgui
info libs -lopencv_imgcodecs
info libs -lopencv_imgproc
info libs -lopencv_features2d
info libs -lopencv_calib3d
info libs -lopencv_photo
info libs -lopencv_objdetect
info libs -lopencv_ml
info libs -lopencv_video
info libs -lopencv_videoio
info libs -lopencv_videostab
info libs -lopencv_dnn
info libs -lopencv_face
info libs -lopencv_text
info libs -lopencv_tracking
info libs -lopencv_xfeatures2d
info libs -lopencv_ximgproc
info libs -Wl,-rpath,/opt/homebrew/Cellar/opencv/4.5.3/lib
info install spawning node gyp process: node-gyp rebuild --jobs max
CXX(target) Release/obj.target/opencv4nodejs/cc/opencv4nodejs.o
CXX(target) Release/obj.target/opencv4nodejs/cc/CustomMatAllocator.o
CXX(target) Release/obj.target/opencv4nodejs/cc/ExternalMemTracking.o
CXX(target) Release/obj.target/opencv4nodejs/cc/core/core.o
CXX(target) Release/obj.target/opencv4nodejs/cc/core/coreConstants.o
CXX(target) Release/obj.target/opencv4nodejs/cc/core/HistAxes.o
CXX(target) Release/obj.target/opencv4nodejs/cc/core/Mat.o
CXX(target) Release/obj.target/opencv4nodejs/cc/core/Point.o
In file included from ../cc/opencv4nodejs.cc:2:
In file included from ../cc/ExternalMemTracking.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/Point.cc:1:
In file included from ../cc/core/Point.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
In file included from ../cc/core/coreConstants.cc:1:
In file included from ../cc/core/coreConstants.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/HistAxes.cc:5:
In file included from ../cc/core/HistAxes.h:4:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/Point.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/coreConstants.o] Error 1
In file included from ../cc/core/core.cc:1:
In file included from ../cc/core/core.h:1:
In file included from ../cc/core/Mat.h:1:
In file included from ../cc/core/coreUtils.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
make: *** [Release/obj.target/opencv4nodejs/cc/core/HistAxes.o] Error 1
In file included from ../cc/ExternalMemTracking.cc:1:
In file included from ../cc/ExternalMemTracking.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/Mat.cc:1:
In file included from ../cc/opencv_modules.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/CustomMatAllocator.cc:1:
In file included from ../cc/CustomMatAllocator.h:8:
../cc/core/Size.h:1:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/ExternalMemTracking.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/CustomMatAllocator.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/core.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/Mat.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/opencv4nodejs.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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:375:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--jobs" "max"
gyp ERR! cwd /Users/timowan/node_modules/opencv4nodejs
gyp ERR! node -v v14.17.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
ERR! Error: Command failed: node-gyp rebuild --jobs max
In file included from ../cc/opencv4nodejs.cc:2:
In file included from ../cc/ExternalMemTracking.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/Point.cc:1:
In file included from ../cc/core/Point.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
In file included from ../cc/core/coreConstants.cc:1:
In file included from ../cc/core/coreConstants.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/HistAxes.cc:5:
In file included from ../cc/core/HistAxes.h:4:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/Point.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/coreConstants.o] Error 1
In file included from ../cc/core/core.cc:1:
In file included from ../cc/core/core.h:1:
In file included from ../cc/core/Mat.h:1:
In file included from ../cc/core/coreUtils.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
make: *** [Release/obj.target/opencv4nodejs/cc/core/HistAxes.o] Error 1
In file included from ../cc/ExternalMemTracking.cc:1:
In file included from ../cc/ExternalMemTracking.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/core/Mat.cc:1:
In file included from ../cc/opencv_modules.h:1:
../cc/macros.h:2:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
In file included from ../cc/CustomMatAllocator.cc:1:
In file included from ../cc/CustomMatAllocator.h:8:
../cc/core/Size.h:1:10: fatal error: 'opencv2/core.hpp' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/ExternalMemTracking.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/CustomMatAllocator.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/core.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/core/Mat.o] Error 1
1 error generated.
make: *** [Release/obj.target/opencv4nodejs/cc/opencv4nodejs.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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:375:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--jobs" "max"
gyp ERR! cwd /Users/timowan/node_modules/opencv4nodejs
gyp ERR! node -v v14.17.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN timowan No description
npm WARN timowan No repository field.
npm WARN timowan No license field.
+ opencv4nodejs@5.6.0
updated 1 package and audited 30 packages in 7.341s
found 0 vulnerabilities
Contributor guide
Assessment
This issue has not been assessed yet.