Ask Your Question

Revision history [back]

build opencv3.1 on mac for iOS failed

I had used cmkae to build opencv3.1 on my mac successes, and passed testing on python script. when I try to build the opencv framework for iOS ,it failed: my input build command is (version of python is 2.7.11):

python ../opencv/platforms/ios/build_framework.py --opencv ../opencv/ --contrib ../opencv_contrib/ ./

the opencv path 、opencv_contrib path is correct。 the build error info is as following:


* BUILD FAILED *

The following build commands failed: CompileC /Users/allenyang/openSourcePjt/opencv/opencv_ios_framwork/build/arm64-iPhoneOS/3rdparty/zlib/OpenCV.build/Release-iphoneos/zlib.build/Objects-normal/arm64/gzlib.o 3rdparty/zlib/gzlib.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

============================================================ ERROR: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65

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

Traceback (most recent call last): File "../opencv/platforms/ios/build_framework.py", line 87, in build self._build(outdir) File "../opencv/platforms/ios/build_framework.py", line 81, in _build self.buildOne(t[0], t[1], mainBD, cmake_flags) File "../opencv/platforms/ios/build_framework.py", line 139, in buildOne execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir) File "../opencv/platforms/ios/build_framework.py", line 34, in execute retcode = check_call(cmd, cwd = cwd) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65


It Seem that build for iPhone 6.0 is failed.. while the platform configured in build_framework.py is as following:

b = Builder(args.opencv, args.contrib,
    [
        ("armv7", "iPhoneOS"),
        ("armv7s", "iPhoneOS"),
        ("arm64", "iPhoneOS"),
        ("i386", "iPhoneSimulator"),
        ("x86_64", "iPhoneSimulator"),
    ])

so ,it was failed when build for arm64 architecture。。。how to fix it?
my Xcode version is Version 7.3.1 (7D1014)

opencv version is 3.1.0

python version is 2.7.11

mac os version is 10.11.5

thanks a lot。。