Question

Does anyone have idea why this error occurs?

I run $ python platforms/ios/build_framework.py ios to create the framework of OpenCV for iOS. But the install failed.

Platform information: OpenCV latest commit from today, CMake 2.8.12.2, XCode 5.1.1, Mac OSX 10.9.2

I followed this tutorial: Installing Opencv For iOS

** INSTALL FAILED **


The following build commands failed:
    Libtool ios/build/iPhoneSimulator-x86_64/modules/world/UninstalledProducts/libopencv_world.a normal x86_64
(1 failure)
Traceback (most recent call last):
  File "platforms/ios/build_framework.py", line 112, in <module>
    build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../..")), os.path.abspath(sys.argv[1]))
  File "platforms/ios/build_framework.py", line 104, in build_framework
    put_framework_together(srcroot, dstroot)
  File "platforms/ios/build_framework.py", line 80, in put_framework_together
    shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 171, in copytree
    names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '../build/iPhoneOS-arm64/install/include/opencv2'
Was it helpful?

Solution

molbdnilo is right:) Building the latest release is always better idea than building the latest commit. Thanks. I have downloaded the latest release of OpenCV which is 2.4.8 right now and built it again. Everything worked fine.

OTHER TIPS

Just today I've faced the same problem and solved it with a simple command:

brew install cmake

This solution was described here.

As @enreas mentioned in his answer, the problem is that you don't have cmake installed. That would solve the problem.

There are many ways to do this, the easiers are via either homebrew or MacPorts:

homebrew version:

brew install cmake

MacPorts:

port install cmake
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top