OpenCV 3.0 compatability
Created by: jhochenbaum
This error is mostly related to the flandmarks package but I there are some minor incompatibilities with the most recent stable build of opencv, OpenCV 3.0. In fact these issues have existed on the git tip for some time, though the release finally moved to the stable version so it's probably time to address them. I think this is mostly do to the fact that OpenCV has moved from the old c/cv syntax to c++/cv2 (a transition that started a long time ago), and that they are no longer going to support cv.
In any case, when building bob.ip.flandmark "cvaux.h" thrown an error -- I managed to get around this by commenting out the #include of cvaux.h in bob/ip/flandmark/flandmark_detector.h -- which seemed to do the trick, though I haven't been able to fully test yet as I'm working through other issues with the new bob 2.0 packaging scheme.
See below
In file included from /usr/local/include/opencv/cvaux.h:56:0, from bob/ip/flandmark/flandmark_detector.h:16, from bob/ip/flandmark/flandmark_detector.cpp:17: /usr/local/include/opencv2/legacy.hpp:1749:53: error: ‘cv::EM’ has not been declared CvEMParams( int nclusters, int cov_mat_type=cv::EM::COV_MAT_DIAGONAL, ^ /usr/local/include/opencv2/legacy.hpp:1750:36: error: ‘cv::EM’ has not been declared int start_step=cv::EM::START_AUTO_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1766:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:1769:34: error: ‘cv::EM’ has not been declared enum { COV_MAT_SPHERICAL=cv::EM::COV_MAT_SPHERICAL, ^ /usr/local/include/opencv2/legacy.hpp:1770:34: error: ‘cv::EM’ has not been declared COV_MAT_DIAGONAL =cv::EM::COV_MAT_DIAGONAL, ^ /usr/local/include/opencv2/legacy.hpp:1771:34: error: ‘cv::EM’ has not been declared COV_MAT_GENERIC =cv::EM::COV_MAT_GENERIC }; ^ /usr/local/include/opencv2/legacy.hpp:1774:29: error: ‘cv::EM’ has not been declared enum { START_E_STEP=cv::EM::START_E_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1775:29: error: ‘cv::EM’ has not been declared START_M_STEP=cv::EM::START_M_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1776:32: error: ‘cv::EM’ has not been declared START_AUTO_STEP=cv::EM::START_AUTO_STEP }; ^ /usr/local/include/opencv2/legacy.hpp:1824:5: error: ‘EM’ in namespace ‘cv’ does not name a type cv::EM emObj; ^ /usr/local/include/opencv2/legacy.hpp: In member function ‘double CvEM::getLikelihood() const’: /usr/local/include/opencv2/legacy.hpp:1806:58: error: ‘emObj’ was not declared in this scope CV_WRAP inline double getLikelihood() const { return emObj.isTrained() ? logLikelihood : DBL_MAX; } ^ /usr/local/include/opencv2/legacy.hpp: At global scope: /usr/local/include/opencv2/legacy.hpp:2621:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:2666:17: error: ‘GenericDescriptorMatcher’ was not declared in this scope virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2666:41: error: template argument 1 is invalid virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2694:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:2735:17: error: ‘GenericDescriptorMatcher’ was not declared in this scope virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2735:41: error: template argument 1 is invalid virtual Ptr clone( bool emptyTrainData=false ) const; ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 In file included from /usr/local/include/opencv/cvaux.h:56:0, from bob/ip/flandmark/flandmark_detector.h:16, from bob/ip/flandmark/flandmark.cpp:20: /usr/local/include/opencv2/legacy.hpp:1749:53: error: ‘cv::EM’ has not been declared CvEMParams( int nclusters, int cov_mat_type=cv::EM::COV_MAT_DIAGONAL, ^ /usr/local/include/opencv2/legacy.hpp:1750:36: error: ‘cv::EM’ has not been declared int start_step=cv::EM::START_AUTO_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1766:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:1769:34: error: ‘cv::EM’ has not been declared enum { COV_MAT_SPHERICAL=cv::EM::COV_MAT_SPHERICAL, ^ /usr/local/include/opencv2/legacy.hpp:1770:34: error: ‘cv::EM’ has not been declared COV_MAT_DIAGONAL =cv::EM::COV_MAT_DIAGONAL, ^ /usr/local/include/opencv2/legacy.hpp:1771:34: error: ‘cv::EM’ has not been declared COV_MAT_GENERIC =cv::EM::COV_MAT_GENERIC }; ^ /usr/local/include/opencv2/legacy.hpp:1774:29: error: ‘cv::EM’ has not been declared enum { START_E_STEP=cv::EM::START_E_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1775:29: error: ‘cv::EM’ has not been declared START_M_STEP=cv::EM::START_M_STEP, ^ /usr/local/include/opencv2/legacy.hpp:1776:32: error: ‘cv::EM’ has not been declared START_AUTO_STEP=cv::EM::START_AUTO_STEP }; ^ /usr/local/include/opencv2/legacy.hpp:1824:5: error: ‘EM’ in namespace ‘cv’ does not name a type cv::EM emObj; ^ /usr/local/include/opencv2/legacy.hpp: In member function ‘double CvEM::getLikelihood() const’: /usr/local/include/opencv2/legacy.hpp:1806:58: error: ‘emObj’ was not declared in this scope CV_WRAP inline double getLikelihood() const { return emObj.isTrained() ? logLikelihood : DBL_MAX; } ^ /usr/local/include/opencv2/legacy.hpp: At global scope: /usr/local/include/opencv2/legacy.hpp:2621:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:2666:17: error: ‘GenericDescriptorMatcher’ was not declared in this scope virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2666:41: error: template argument 1 is invalid virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2694:1: error: expected class-name before ‘{’ token { ^ /usr/local/include/opencv2/legacy.hpp:2735:17: error: ‘GenericDescriptorMatcher’ was not declared in this scope virtual Ptr clone( bool emptyTrainData=false ) const; ^ /usr/local/include/opencv2/legacy.hpp:2735:41: error: template argument 1 is invalid virtual Ptr clone( bool emptyTrainData=false ) const; ^ While: Installing. Processing develop directory '/home/jordan/bob.ip.flandmark/.'.
An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "/home/jordan/bob.ip.flandmark/eggs/zc.buildout-2.2.1-py3.4.egg/zc/buildout/buildout.py", line 1942, in main getattr(buildout, command)(args) File "/home/jordan/bob.ip.flandmark/eggs/zc.buildout-2.2.1-py3.4.egg/zc/buildout/buildout.py", line 484, in install installed_develop_eggs = self._develop() File "/home/jordan/bob.ip.flandmark/eggs/zc.buildout-2.2.1-py3.4.egg/zc/buildout/buildout.py", line 726, in _develop zc.buildout.easy_install.develop(setup, dest) File "/home/jordan/bob.ip.flandmark/eggs/bob.buildout-0.4.8-py3.4.egg/bob/buildout/extension.py", line 242, in develop zc.buildout.easy_install.call_subprocess(args) File "/home/jordan/bob.ip.flandmark/eggs/zc.buildout-2.2.1-py3.4.egg/zc/buildout/easy_install.py", line 154, in call_subprocess % repr(args)[1:-1]) Exception: Failed to run command: '/usr/bin/python3', '/tmp/tmp124cbdgu', '-v', 'develop', '-mxN', '-d', '/home/jordan/bob.ip.flandmark/develop-eggs/tmp_9c84ih6build'