Build OpenCV Framework - Mac osx error

Hi there,

I’m completely new to OpenCV and so yesterday I with installing it. I didn’t want to use Homebrew to install it on my Mac but I wanted to use the method of building the frameworks. I did this successfully for the framework for iOS but I cannot figure out what is the reason for the error I get when trying to build it for osx.

What I type:

python3 opencv-master/platforms/osx/build_framework.py osx --contrib opencv_contrib-master

And the error I get:

**** BUILD FAILED ****

The following build commands failed:

CompileC /Users/lisagumpoltsberger/Documents/osx/build/build-x86_64-macosx/modules/world/OpenCV.build/Release/opencv_world.build/Objects-normal/x86_64/versions.pb.o /Users/lisagumpoltsberger/Documents/opencv-master/modules/dnn/misc/tensorflow/versions.pb.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

============================================================

ERROR: Command ‘[‘xcodebuild’, ‘MACOSX_DEPLOYMENT_TARGET=10.12’, ‘ARCHS=x86_64’, ‘-sdk’, ‘macosx’, ‘-configuration’, ‘Release’, ‘-parallelizeTargets’, ‘-jobs’, ‘8’, ‘-target’, ‘ALL_BUILD’, ‘build’]’ returned non-zero exit status 65.

I would really appreciate it if someone could help me. I tried a few solutions I found online (e.g. changing the deployment target) but nothing worked.

Best regards
Lisa

if you only need OpenCV from python, I’d suggest pip install opencv-python (or pip3 or whatever)

I want to use OpenCV with C++. I used the framework installment option because I also want to use my app on devices that don’t have OpenCV installed.