OpenCV 2.4 build Failed error while creating iOS framework in Mac
I have followed the following steps to install opencv on my mac. But I am getting a 'Build Failed' message.
What is the solution for this ?
Steps that I have followed:
- Create a New Folder OpenCV in Desktop Working Directory.
- In Terminal cd /Users/administrator/Desktop/OpenCV
- In Terminal git clone https://github.com/Itseez/opencv.git
This results in the cutting edge OpenCV from GIT repository
- Now install CMake software
- In Terminal cd /
- In Terminal sudo ln -s /Applications/Xcode.app/Contents/Developer Developer
- In Terminal cd /Users/administrator/Desktop/OpenCV (open working directory)
- In Terminal python opencv/ios/build_framework.py ios
Result of this is the build failed message.
The following build commands failed:
Libtool /Users/administrator/Desktop/OpenCV/ios/build/iPhoneSimulator-i386/modules/world/UninstalledProducts/libopencv_world.a normal i386
(1 failure)
Traceback (most recent call last):
File "opencv/ios/build_framework.py", line 128, in <module>
build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")), os.path.abspath(sys.argv[1]))
File "opencv/ios/build_framework.py", line 120, in build_framework
put_framework_together(srcroot, dstroot)
File "opencv/ios/build_framework.py", line 88, in put_framework_together
shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 168, in copytree
names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '../build/iPhoneOS-armv7/install/include/opencv2'
administrators-iMac-2:OpenCV administrator$
Did you ever figure this out?
Same here. Actually there is a build failure way before the lines you posted.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/christophkapffer/_privat/ios/build/iPhoneOS-armv7/3rdparty/libjpeg/OpenCV.build/Release-iphoneos/libjpeg.build/Objects-normal/armv7/jmemansi.o (No such file or directory) Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1
That is the reason why the libtool can't merge the different builds in order to create a universal framework. There is no install directory for iPhoneOS-armv7, because that build failed in the first place (see above).
Just to extend my previous comment: The file 'jmemansi.o' is missing for all three platforms (armv7, armv7s & i386).