opencv4nodejs: [Autobuild] Installation error on ubuntu18.04

npm install --save opencv4nodejs

Error Message

info libs -Wl,-rpath,/home/ubu/node_modules/opencv-build/opencv/build/lib
info install spawning node gyp process: node-gyp rebuild --jobs max
make: Entering directory '/home/ubu/node_modules/opencv4nodejs/build'
  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/Mat.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/Point.o
In file included from /home/ubu/node_modules/opencv-build/opencv/build/include/opencv2/ml.hpp:1967:0,
                 from ../cc/machinelearning/machinelearning.h:3,
                 from ../cc/opencv4nodejs.cc:25:
/home/ubu/node_modules/opencv-build/opencv/build/include/opencv2/ml/ml.inl.hpp: In function ‘int cv::ml::simulatedAnnealingSolver(SimulatedAnnealingSolverSystem&, double, double, double, size_t, double*, cv::RNG&)’:
/home/ubu/node_modules/opencv-build/opencv/build/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;
 
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/Vec.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/Size.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/Rect.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/RotatedRect.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/core/TermCriteria.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/imgproc/imgproc.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/imgproc/imgprocConstants.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/imgproc/MatImgproc.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/imgproc/Contour.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/imgproc/Moments.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/calib3d/calib3d.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/calib3d/calib3dConstants.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/calib3d/MatCalib3d.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/io/io.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/io/ioConstants.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/io/VideoCapture.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/io/VideoWriter.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/photo/photo.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/photo/photoConstants.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/photo/MatPhoto.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/video/video.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/video/BackgroundSubtractor.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/video/BackgroundSubtractorMOG2.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/video/BackgroundSubtractorKNN.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/ximgproc/ximgproc.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/ximgproc/MatXimgproc.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/ximgproc/SuperpixelSEEDS.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/ximgproc/SuperpixelSLIC.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/ximgproc/SuperpixelLSC.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/objdetect/objdetect.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/objdetect/CascadeClassifier.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/objdetect/HOGDescriptor.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/objdetect/DetectionROI.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/machinelearning.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/machinelearningConstants.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/ParamGrid.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/StatModel.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/SVM.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/machinelearning/TrainData.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/dnn/dnn.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/dnn/Net.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/face.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FaceRecognizer.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/EigenFaceRecognizer.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FisherFaceRecognizer.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/LBPHFaceRecognizer.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/Facemark.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FacemarkAAM.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FacemarkAAMData.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FacemarkAAMParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FacemarkLBF.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/face/FacemarkLBFParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/text/text.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/text/OCRHMMClassifier.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/text/OCRHMMDecoder.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/tracking.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Tracker.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/MultiTracker.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerBoosting.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerBoostingParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerKCF.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerKCFParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerMIL.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerMILParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerMedianFlow.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerTLD.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerGOTURN.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerCSRT.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerCSRTParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/tracking/Trackers/TrackerMOSSE.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/features2d.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/KeyPoint.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/KeyPointMatch.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/DescriptorMatch.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/BFMatcher.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/FeatureDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/descriptorMatching.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/descriptorMatchingKnn.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/AGASTDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/AKAZEDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/BRISKDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/FASTDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/GFTTDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/KAZEDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/MSERDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/ORBDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/SimpleBlobDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/features2d/detectors/SimpleBlobDetectorParams.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/xfeatures2d/xfeatures2d.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/xfeatures2d/SIFTDetector.o
  CXX(target) Release/obj.target/opencv4nodejs/cc/xfeatures2d/SURFDetector.o
  SOLINK_MODULE(target) Release/obj.target/opencv4nodejs.node
  COPY Release/opencv4nodejs.node
make: Leaving directory '/home/ubu/node_modules/opencv4nodejs/build'
ERR! In file included from /home/ubu/node_modules/opencv-build/opencv/build/include/opencv2/ml.hpp:1967:0,
                 from ../cc/machinelearning/machinelearning.h:3,
                 from ../cc/opencv4nodejs.cc:25:
/home/ubu/node_modules/opencv-build/opencv/build/include/opencv2/ml/ml.inl.hpp: In function ‘int cv::ml::simulatedAnnealingSolver(SimulatedAnnealingSolverSystem&, double, double, double, size_t, double*, cv::RNG&)’:
/home/ubu/node_modules/opencv-build/opencv/build/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;
 
 
npm WARN saveError ENOENT: no such file or directory, open '/home/ubu/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/ubu/package.json'
npm WARN ubu No description
npm WARN ubu No repository field.
npm WARN ubu No README data
npm WARN ubu No license field.

+ opencv4nodejs@5.3.0
updated 1 package and audited 227 packages in 160.367s
found 0 vulnerabilities

Auto Build - Full Error Log

opencv4nodejs-installation-log.txt

ubuntu 18.04, node 10.16.3 (npm 6.9.0)

Manual Build - Environment Information

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Same error here, any advise?

@justadudewhohacks
I guess it’s not related to package.json, since I had tried with the repository (refer to comment: install with git), which including a package.json in root dir.

Here are trials:

  • I’ve run npm init -y before npm install, it’s not working, raising the same error.
  • I’ve created an empty package.json, run npm install --save opencv4nodejs, not works.
  • I’ve tried to switch python via update-alternatives between python2 and python3, not works.