the clang compiler does not support '-mfpu=neon-fp16' on the opencv build stage

asked 2016-08-23 20:01:38 -0500

don-prog gravatar image

I'm trying to build opencv for iOS using this tutorial. But I get the error on the python opencv/platforms/ios/ iOS stage:

clang: error: the clang compiler does not support '-mfpu=neon-fp16'



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/", line 87, in build self._build(outdir) File "opencv/platforms/ios/", line 81, in _build self.buildOne(t[0], t[1], mainBD, cmake_flags) File "opencv/platforms/ios/", line 139, in buildOne execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir) File "opencv/platforms/ios/", line 34, in execute retcode = check_call(cmd, cwd = cwd) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", 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?

edit retag flag offensive close merge delete


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.

Eduardo gravatar imageEduardo ( 2016-08-24 11:27:58 -0500 )edit