justadudewhohacks / justadudewhohacks/opencv4nodejs

Install ERR! In file included from opencv2/ml.hpp

Open
#649 4 comments 9 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

# Error Log
```shell
info the following opencv4nodejs environment variables are set in the package.json:
info autoBuildBuildCuda: 0
info disableAutoBuild: 1
info autoBuildWithoutContrib: 1
info opencvIncludeDir: /home/baymin/daily-work/opencv-4.1.0/build/include/
info opencvLibDir: /home/baymin/daily-work/opencv-4.1.0/build/lib/
info opencvBinDir: /home/baymin/daily-work/opencv-4.1.0/build/bin/
info install using lib dir: /home/baymin/daily-work/opencv-4.1.0/build/lib
info install found the following libs:
info install core : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_core.so.4.1.0
info install highgui : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_highgui.so.4.1.0
info install imgcodecs : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_imgcodecs.so.4.1.0
info install imgproc : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_imgproc.so.4.1.0
info install features2d : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_features2d.so.4.1.0
info install calib3d : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_calib3d.so.4.1.0
info install photo : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_photo.so.4.1.0
info install objdetect : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_objdetect.so.4.1.0
info install ml : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_ml.so.4.1.0
info install video : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_video.so.4.1.0
info install videoio : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_videoio.so.4.1.0
info install dnn : /home/baymin/daily-work/opencv-4.1.0/build/lib/libopencv_dnn.so.4.1.0

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_DNN

info install setting the following includes:
info includes /home/baymin/daily-work/opencv-4.1.0/build/include

info install setting the following libs:
info libs -L/home/baymin/daily-work/opencv-4.1.0/build/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_dnn
info libs -Wl,-rpath,/home/baymin/daily-work/opencv-4.1.0/build/lib
info install spawning node gyp process: node-gyp rebuild --jobs max

.............

make: leaving“/home/baymin/daily-work/Power-Ai/node_modules/opencv4nodejs/build”
ERR! In file included from /usr/local/include/opencv2/ml.hpp:1975:0,
from ../cc/machinelearning/machinelearning.h:3,
from ../cc/opencv4nodejs.cc:25:
/usr/local/include/opencv2/ml/ml.inl.hpp: In function ‘int cv::ml::simulatedAnnealingSolver(SimulatedAnnealingSolverSystem&, double, double, double, size_t, double*, cv::RNG&)’:
/usr/local/include/opencv2/ml/ml.inl.hpp:55:0: note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
return exchange;
```

# Manual Build - Environment Information

*OpenCV version* (example 3.4.1): opencv-4.1.0

*With OpenCV-contrib?* (extra modules): no

*OS*: Ubuntu 18.04

Contributor guide

Open the contributing guide

Research direction

Start with the node-gyp rebuild command and inspect cc/opencv4nodejs.cc, cc/machinelearning/machinelearning.h, and the configured OpenCV include and library paths. Reproduce the install on Ubuntu 18.04 with OpenCV 4.1.0, then determine why /usr/local/include/opencv2/ml.hpp is selected and confirm that the package builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, nodejs
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.