This fix seems to fix the issue, while still maintaining NEON support for iOS devices:
https://github.com/opencv/opencv/commit/262a52f3063c50fbb1236e2cba2bd3c68f9979bb
Essentially, the sentence adding -DENABLE_NEON=ON to the cmake line only applies to architectures starting with "armv" (note the "v"); the above commit modifies opencv/platforms/ios/build_framework.py so that the cmake command can work with "arm64" .
Before:
if arch.startswith("armv"): cmakecmd.append("-DENABLE_NEON=ON")
After:
if arch.startswith("armv") or arch.startswith("arm64"): cmakecmd.append("-DENABLE_NEON=ON")
The diagnostic process, as it may be useful:
This was discovered by running the script build.log before calling python ../opencv/platforms/ios/build_framework.py ios and digging up the result; arm_init.c not created for arm64 (where png_init_filter_functions_neon was defined), but was for armv7 and armv7s . From there, browsing 3rdparty/libpng/CMakeLists.txt , pointing to ENABLE_NEON not installed.
source share