the clang compiler does not support '-mfpu=neon-fp16' on the opencv build stage
I'm trying to build opencv for iOS using this tutorial. But I get the error on the python opencv/platforms/ios/build_framework.py iOS
stage:
clang: error: the clang compiler does not support '-mfpu=neon-fp16'
* BUILD FAILED *
...
ERROR: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=armv7', '-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 "/System/Library/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=armv7', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
How can I fix it and build opencv for iOS?
Did you clone OpenCV from Github or use the 3.1 package? If you cloned and used the latest version of OpenCV, you should try to comment the following line:
add_extra_compiler_option("-mfpu=neon-fp16")
.You should also report the issue here.