peterbraden / node-opencv

OpenCV Bindings for node.js
MIT License
4.38k stars 857 forks source link

npm install node-opencv got Build error #594

Closed alvinhui closed 6 years ago

alvinhui commented 6 years ago
error: no member named 'createEigenFaceRecognizer' in
      namespace 'cv::face'; did you mean 'EigenFaceRecognizer'?

Environmental:

System Version: macOS 10.13 (17A405)
Kernel Version: Darwin 17.0.0
NPM Version: 5.5.1
NodeJs Version: v9.0.0

Logs:

xuwentaodeMacBook-Pro:test xuwentao$ pkg-config opencv --libs
-L/usr/local/Cellar/opencv/3.3.1_1/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_photo -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dpm -lopencv_face -lopencv_fuzzy -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core
xuwentaodeMacBook-Pro:test xuwentao$ npm install
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

up to date in 0.321s
xuwentaodeMacBook-Pro:test xuwentao$ npm install opencv --save

> opencv@6.0.0 install /Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v59-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for opencv@6.0.0 and node@9.0.0 (node-v59 ABI, unknown) (falling back to source compile with node-gyp) 
  CXX(target) Release/obj.target/opencv/src/init.o
  CXX(target) Release/obj.target/opencv/src/Matrix.o
../src/Matrix.cc:335:59: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  v8::Local<v8::Object> actualBuffer = bufferConstructor->NewInstance(3, constructorArgs);
                                                          ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3843:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:500:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:522:55: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
        Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                      ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:672:62: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  v8::Local < v8::Object > actualBuffer = bufferConstructor->NewInstance(3,
                                                             ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3843:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:708:61: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
    v8::Local<v8::Object> actualBuffer = bufferConstructor->NewInstance(3, construc...
                                                            ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3843:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1022:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> im_h = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1037:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> im_h = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1052:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> im_h = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1191:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1205:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1222:27: warning: 'ToInt32' is deprecated [-Wdeprecated-declarations]
  int flipCode = info[0]->ToInt32()->Value();
                          ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:2341:10: note: 'ToInt32' has been
      explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<Int32> ToInt32() const);
         ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1224:79: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> img_to_return = Nan::New(Matrix::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1241:79: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> img_to_return = Nan::New(Matrix::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1466:81: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> conts_to_return= Nan::New(Contour::constructor)->GetFunction()->NewIn...
                                                                                ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1662:26: warning: 'ToNumber' is deprecated [-Wdeprecated-declarations]
  float angle = info[0]->ToNumber()->Value();
                         ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:2333:10: note: 'ToNumber' has been
      explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<Number> ToNumber() const);
         ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1712:26: warning: 'ToNumber' is deprecated [-Wdeprecated-declarations]
  float angle = info[0]->ToNumber()->Value();
                         ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:2333:10: note: 'ToNumber' has been
      explicitly marked deprecated here
  inline V8_DEPRECATED("Use maybe version", Local<Number> ToNumber() const);
         ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1718:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1882:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1901:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1916:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> mean = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:1918:72: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> stddev = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                       ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:2079:55: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
        Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                      ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:2259:69: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> out = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:2293:69: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> out = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:2451:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> xfrm = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/Matrix.cc:2609:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
      Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                    ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
26 warnings generated.
  CXX(target) Release/obj.target/opencv/src/OpenCV.o
../src/OpenCV.cc:24:70: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> im_h = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                     ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  CXX(target) Release/obj.target/opencv/src/CascadeClassifierWrap.o
  CXX(target) Release/obj.target/opencv/src/Contours.o
  CXX(target) Release/obj.target/opencv/src/Point.o
  CXX(target) Release/obj.target/opencv/src/VideoCaptureWrap.o
../src/VideoCaptureWrap.cc:190:79: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
    Local<Object> im_to_return= Nan::New(Matrix::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/VideoCaptureWrap.cc:229:77: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> im_to_return= Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                            ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
2 warnings generated.
  CXX(target) Release/obj.target/opencv/src/CamShift.o
  CXX(target) Release/obj.target/opencv/src/HighGUI.o
  CXX(target) Release/obj.target/opencv/src/FaceRecognizer.o
../src/FaceRecognizer.cc:11:19: error: no member named 'createEigenFaceRecognizer' in
      namespace 'cv::face'; did you mean 'EigenFaceRecognizer'?
  using cv::face::createEigenFaceRecognizer;
        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
                  EigenFaceRecognizer
/usr/local/Cellar/opencv/3.3.1_1/include/opencv2/face/facerec.hpp:54:20: note: 
      'EigenFaceRecognizer' declared here
class CV_EXPORTS_W EigenFaceRecognizer : public BasicFaceRecognizer
                   ^
../src/FaceRecognizer.cc:12:19: error: no member named 'createFisherFaceRecognizer' in
      namespace 'cv::face'; did you mean 'FisherFaceRecognizer'?
  using cv::face::createFisherFaceRecognizer;
        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
                  FisherFaceRecognizer
/usr/local/Cellar/opencv/3.3.1_1/include/opencv2/face/facerec.hpp:89:20: note: 
      'FisherFaceRecognizer' declared here
class CV_EXPORTS_W FisherFaceRecognizer : public BasicFaceRecognizer
                   ^
../src/FaceRecognizer.cc:13:19: error: no member named 'createLBPHFaceRecognizer' in
      namespace 'cv::face'; did you mean 'LBPHFaceRecognizer'?
  using cv::face::createLBPHFaceRecognizer;
        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
                  LBPHFaceRecognizer
/usr/local/Cellar/opencv/3.3.1_1/include/opencv2/face/facerec.hpp:126:20: note: 
      'LBPHFaceRecognizer' declared here
class CV_EXPORTS_W LBPHFaceRecognizer : public FaceRecognizer
                   ^
../src/FaceRecognizer.cc:71:39: error: no member named 'createLBPHFaceRecognizer' in
      namespace 'cv'
  cv::Ptr<cv::FaceRecognizer> f = cv::createLBPHFaceRecognizer(1, 8, 8, 8, 80.0);
                                  ~~~~^
../src/FaceRecognizer.cc:93:79: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> n = Nan::New(FaceRecognizerWrap::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/FaceRecognizer.cc:94:39: error: no member named 'createLBPHFaceRecognizer' in
      namespace 'cv'
  cv::Ptr<cv::FaceRecognizer> f = cv::createLBPHFaceRecognizer(radius,
                                  ~~~~^
../src/FaceRecognizer.cc:111:79: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> n = Nan::New(FaceRecognizerWrap::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/FaceRecognizer.cc:112:39: error: no member named 'createEigenFaceRecognizer' in
      namespace 'cv'
  cv::Ptr<cv::FaceRecognizer> f = cv::createEigenFaceRecognizer(components,
                                  ~~~~^
../src/FaceRecognizer.cc:129:79: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> n = Nan::New(FaceRecognizerWrap::constructor)->GetFunction()->NewIn...
                                                                              ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/FaceRecognizer.cc:131:39: error: no member named 'createFisherFaceRecognizer' in
      namespace 'cv'
  cv::Ptr<cv::FaceRecognizer> f = cv::createFisherFaceRecognizer(components,
                                  ~~~~^
../src/FaceRecognizer.cc:391:14: error: no matching member function for call to 'load'
  self->rec->load(filename);
  ~~~~~~~~~~~^~~~
/usr/local/Cellar/opencv/3.3.1_1/include/opencv2/core.hpp:3134:44: note: candidate template
      ignored: couldn't infer template argument '_Tp'
    template<typename _Tp> static Ptr<_Tp> load(const String& filename, const Strin...
                                           ^
../src/FaceRecognizer.cc:423:68: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> im = Nan::New(Matrix::constructor)->GetFunction()->NewInstance();
                                                                   ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8.h:3848:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  ^
/Users/xuwentao/.node-gyp/9.0.0/include/node/v8config.h:321:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
4 warnings and 8 errors generated.
make: *** [Release/obj.target/opencv/src/FaceRecognizer.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:135:13)
gyp ERR! stack     at ChildProcess.emit (events.js:224:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.0.0
gyp ERR! command "/usr/local/Cellar/node/7.7.4/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64"
gyp ERR! cwd /Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv
gyp ERR! node -v v9.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:135:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:224:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Darwin 17.0.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/7.7.4/bin/node" "/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv
node-pre-gyp ERR! node -v v9.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/xuwentao/Documents/www/gitlab/test/test/node_modules/opencv/build/opencv/v6.0.0/Release/node-v59-darwin-x64' (1)
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv@6.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the opencv@6.0.0 install 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/xuwentao/.npm/_logs/2017-11-23T13_11_03_206Z-debug.log
xuwentaodeMacBook-Pro:test xuwentao$ 
btsimonh commented 6 years ago

please try again with npm install peterbraden/node-opencv recent updates to master should have resolved this. (https://github.com/peterbraden/node-opencv/pull/589) (also compare my (windows) log https://gist.github.com/btsimonh/b27b21e6a5d02c2a9f92ec76d60eb793)

alvinhui commented 6 years ago

@btsimonh it works,,thanks!

btsimonh commented 6 years ago

all good; so closing :).