biometrics / openbr

Open Source Biometrics, Face Recognition
www.openbiometrics.org
Other
2.85k stars 773 forks source link

When I do make -j4 ,some Error -----Ubutu -14.04 #482

Closed anthonyyuan closed 7 years ago

anthonyyuan commented 8 years ago

[ 7%] [ 7%] [ 8%] Building CXX object openbr/CMakeFiles/openbr.dir/openbr_plugin.cpp.o Building CXX object openbr/CMakeFiles/openbr.dir/openbr.cpp.o [ 8%] Building CXX object openbr/CMakeFiles/openbr.dir/universal_template.cpp.o Building CXX object openbr/CMakeFiles/openbr.dir/core/plot.cpp.o In file included from /home/anthony/app/openbr/openbr/openbr_plugin.cpp:42:0: /home/anthony/app/openbr/openbr/core/opencvutils.h:55:27: error: ‘CvStatModel’ does not name a type void storeModel(const CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:20: error: variable or field ‘loadModel’ declared void void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:20: error: ‘CvStatModel’ was not declared in this scope /home/anthony/app/openbr/openbr/core/opencvutils.h:57:33: error: ‘model’ was not declared in this scope void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:52: error: expected primary-expression before ‘&’ token void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:53: error: ‘stream’ was not declared in this scope void loadModel(CvStatModel &model, QDataStream &stream); ^ [ 8%] Building CXX object openbr/CMakeFiles/openbr.dir/core/qtutils.cpp.o make[2]: * [openbr/CMakeFiles/openbr.dir/openbr_plugin.cpp.o] Error 1 make[2]: * Waiting for unfinished jobs.... In file included from /home/anthony/app/openbr/openbr/core/qtutils.cpp:34:0: /home/anthony/app/openbr/openbr/core/opencvutils.h:55:27: error: ‘CvStatModel’ does not name a type void storeModel(const CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:20: error: variable or field ‘loadModel’ declared void void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:20: error: ‘CvStatModel’ was not declared in this scope /home/anthony/app/openbr/openbr/core/opencvutils.h:57:33: error: ‘model’ was not declared in this scope void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:52: error: expected primary-expression before ‘&’ token void loadModel(CvStatModel &model, QDataStream &stream); ^ /home/anthony/app/openbr/openbr/core/opencvutils.h:57:53: error: ‘stream’ was not declared in this scope void loadModel(CvStatModel &model, QDataStream &stream); ^ make[2]: * [openbr/CMakeFiles/openbr.dir/core/qtutils.cpp.o] Error 1 make[1]: * [openbr/CMakeFiles/openbr.dir/all] Error 2 make: *\ [all] Error 2 anthony@anthony-Inspiron-7420:~/app/openbr/build$

lewma commented 8 years ago

Did you make sure you installed all required packages first ? I did a build a couple of days back on my raspian system and it all seemed to build fine.

DepthDeluxe commented 8 years ago

This looks very similar to the Issue #459. It probably has something to do with the version of OpenCV you are linking against. What version are you using?

OmarMAmin commented 7 years ago

I'm having the same problem, i'm linking against opencv 3.1.0, has anyone knew what's the solution?

I think that the Cvstatemodel is deprecated in opencv 3.1.0 but what else do we need to modify

DepthDeluxe commented 7 years ago

@OmarMAmin, OpenCV 3 isn't currently compatible with OpenBR. To compile with OpenBR you must build against OpenCV 2.4.13.

Classes like CvStatModel aren't even available in 3.1.0 and that's why the build is failing. I'm working on making it compatible

sklum commented 7 years ago

Closing this as we don't support linking against OpenCV 3.* yet.