Error while building OpenCV from github on Mac OSX Mavericks

asked 2016-10-26 22:39:32 -0600

Hilary gravatar image

updated 2016-10-27 02:42:11 -0600

berak gravatar image

I am a beginner in OpenCV, using OpenCV 3.1.0 (downloaded from with Mac OS X 10.9.5 and Xcode 6.2 I was trying to run a code which needs contrib.hpp, then I found the extra modules from Github.

Since the extra modules couldn't be built on OpenCV 3.1.0, I thought it will be better to have the latest version from Github, then tried to install the OpenCV with following command (it was the same way as how I've installed OpenCV 3.1.0 successfully):

$ cd <opencv_source_directory>

$ mkdir release

$ cd release

$ cmake -G "Unix Makefiles" ..

$ make

$ sudo make install

But there is another problem when I tried make:

image description

(UPDATE text version)

[ 44%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_decoder.cpp.o

[ 44%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/

[ 44%] Linking CXX shared library ../../lib/libopencv_videoio.dylib

ld: framework not found CoreImage

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: * [lib/libopencv_videoio.3.1.0.dylib] Error 1

make[1]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2

make: * [all] Error 2

I thought maybe there was something wrong with cmake, so I tried the following command as well but the same error occurred with make:


I've googled for the problem and it seems like I must need the QuartzCore, but most of people said it should be included in the Xcode. I tried both ways to figure it out but I still have no idea why I can't build the extra modules. (I think the most weird problem is that I cannot install OpenCV cloned from Github, but I just wanna show I tried this way but it wasn't successful FYI.)

I'd be most grateful for any help and suggestions!

edit retag flag offensive close merge delete



would you be so nice, and replace the screenshot of the error with a text version ?

berak gravatar imageberak ( 2016-10-27 00:44:36 -0600 )edit

@berak Yes of course, it have been updated. thanks for your comment!

Hilary gravatar imageHilary ( 2016-10-27 00:59:55 -0600 )edit