Uso Yosemite 10.10, y necesito construir e instalar la biblioteca de OpenCV usando cmake-gui. Pude configurar y generar los binarios fácilmente. Pero cuando trato de 'hacer' la biblioteca usando la terminal sudo make -j4
en la carpeta de binarios, obtengo el siguiente error -
Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o
In file included from /usr/include/os/object.h:27:0,
from /usr/include/dispatch/dispatch.h:48,
from /Users/imecindia/Desktop/Downloaded Libraries/opencv-3.0.0-beta/modules/core/src/parallel.cpp:106:
/usr/include/os/base.h:113:20: error: missing binary operator before token "("
#if __has_extension(attribute_overloadable)
^
/usr/include/os/base.h:119:54: error: missing binary operator before token "("
#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
^
[ 45%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/pca.cpp.o
In file included from /usr/include/dispatch/dispatch.h:51:0,
from /Users/imecindia/Desktop/Downloaded Libraries/opencv-3.0.0-beta/modules/core/src/parallel.cpp:106:
/usr/include/dispatch/object.h:325:20: error: missing binary operator before token "("
#if __has_extension(c_generic_selections)
^
/usr/include/dispatch/object.h:363:20: error: missing binary operator before token "("
#if __has_extension(c_generic_selections)
^
/usr/include/dispatch/object.h:391:20: error: missing binary operator before token "("
#if __has_extension(c_generic_selections)
^
/usr/include/dispatch/object.h:423:20: error: missing binary operator before token "("
#if __has_extension(c_generic_selections)
^
/usr/include/dispatch/object.h:143:15: error: expected unqualified-id before '^' token
typedef void (^dispatch_block_t)(void);
^
/usr/include/dispatch/object.h:143:15: error: expected ')' before '^' token
/usr/include/dispatch/object.h:362:3: error: 'dispatch_block_t' has not been declared
dispatch_block_t notification_block);
^
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
Lo tengo en varios lugares de este archivo en particular,
También especifiqué el compilador para usar gcc/g++/gfortran que venía con MacPorts. Es obligatorio que use el compilador de MacPorts por cierto.
¿Alguien puede decirme qué puedo hacer?