Unable to build opencv 4.6 with contrib for iOS

Is there a opencv 4.6 with contrib readily available for IOS?
I was trying to build opencv with contrib following the official tutorial,
https://docs.opencv.org/4.6.0/d5/da3/tutorial_ios_install.html
but building is failing, also I am not sure if I am building 4.6 or the latest version, I wanted to build 4.6 version open cv with contrib.


python3 opencv/platforms/ios/build_framework.py ios --contrib opencv_contrib --iphoneos_archs arm64 --phonesimulator_archs x86_64
The following args are not recognized and will not be used: ['--phonesimulator_archs', 'x86_64']
Using IPHONEOS_DEPLOYMENT_TARGET=9.0
Using iPhoneOS ARCHS=['arm64']
Using iPhoneSimulator ARCHS=['i386', 'x86_64']

=================================
CMake
=================================

Executing: ['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DOPENCV_INCLUDE_INSTALL_PATH=include', '-DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty', '-DFRAMEWORK_NAME=opencv2', '-DIOS_ARCH=arm64', '-DCMAKE_TOOLCHAIN_FILE=/Users/sgopala/Documents/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/sgopala/Documents/opencv/opencv', '-DOPENCV_EXTRA_MODULES_PATH=/Users/sgopala/Documents/opencv/opencv_contrib/modules', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos
Executing: cmake -GXcode -DAPPLE_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DOPENCV_INCLUDE_INSTALL_PATH=include -DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty -DFRAMEWORK_NAME=opencv2 -DIOS_ARCH=arm64 -DCMAKE_TOOLCHAIN_FILE=/Users/sgopala/Documents/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake -DCPU_BASELINE=DETECT /Users/sgopala/Documents/opencv/opencv -DOPENCV_EXTRA_MODULES_PATH=/Users/sgopala/Documents/opencv/opencv_contrib/modules -DCMAKE_C_FLAGS=-fembed-bitcode -DCMAKE_CXX_FLAGS=-fembed-bitcode
-- Setting up iPhoneOS toolchain for IOS_ARCH='arm64'
-- iPhoneOS toolchain loaded
-- Setting up iPhoneOS toolchain for IOS_ARCH='arm64'
-- iPhoneOS toolchain loaded
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: arm64
-- Looking for ccache - not found
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WRETURN_TYPE
-- Performing Test HAVE_CXX_WRETURN_TYPE - Success
-- Performing Test HAVE_C_WRETURN_TYPE
-- Performing Test HAVE_C_WRETURN_TYPE - Success
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WADDRESS
-- Performing Test HAVE_CXX_WADDRESS - Success
-- Performing Test HAVE_C_WADDRESS
-- Performing Test HAVE_C_WADDRESS - Success
-- Performing Test HAVE_CXX_WSEQUENCE_POINT
-- Performing Test HAVE_CXX_WSEQUENCE_POINT - Success
-- Performing Test HAVE_C_WSEQUENCE_POINT
-- Performing Test HAVE_C_WSEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WFORMAT_SECURITY
-- Performing Test HAVE_CXX_WFORMAT_SECURITY - Success
-- Performing Test HAVE_C_WFORMAT_SECURITY
-- Performing Test HAVE_C_WFORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Success
-- Performing Test HAVE_CXX_WUNINITIALIZED
-- Performing Test HAVE_CXX_WUNINITIALIZED - Success
-- Performing Test HAVE_C_WUNINITIALIZED
-- Performing Test HAVE_C_WUNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_CXX_WNO_COMMENT
-- Performing Test HAVE_CXX_WNO_COMMENT - Success
-- Performing Test HAVE_C_WNO_COMMENT
-- Performing Test HAVE_C_WNO_COMMENT - Success
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY
-- Performing Test HAVE_CXX_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success
-- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY
-- Performing Test HAVE_C_WNO_SEMICOLON_BEFORE_METHOD_BODY - Success
-- Performing Test HAVE_CPU_NEON_SUPPORT (check file: cmake/checks/cpu_neon.cpp)
-- Performing Test HAVE_CPU_NEON_SUPPORT - Success
-- Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CPU_FP16_SUPPORT - Success
-- Performing Test HAVE_CPU_NEON_DOTPROD_SUPPORT (check file: cmake/checks/cpu_dotprod.cpp)
-- Performing Test HAVE_CPU_NEON_DOTPROD_SUPPORT - Failed
-- Performing Test HAVE_CXX_MARCH_ARMV8_2_A+DOTPROD (check file: cmake/checks/cpu_dotprod.cpp)
-- Performing Test HAVE_CXX_MARCH_ARMV8_2_A+DOTPROD - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_LINK_AS_NEEDED
-- Performing Test HAVE_LINK_AS_NEEDED - Failed
-- Performing Test HAVE_LINK_NO_UNDEFINED
-- Performing Test HAVE_LINK_NO_UNDEFINED - Failed
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for malloc.h
-- Looking for malloc.h - not found
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_C_WNO_ATTRIBUTES
-- Performing Test HAVE_C_WNO_ATTRIBUTES - Success
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WNO_SHIFT_NEGATIVE_VALUE
-- Performing Test HAVE_C_WNO_SHIFT_NEGATIVE_VALUE - Success
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Success
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- libjpeg-turbo: VERSION = 2.1.3, BUILD = opencv-4.7.0-dev-libjpeg-turbo
-- Check size of size_t
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.25/Modules/CheckTypeSize.cmake:148 (try_compile):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    '/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.bin'

  Recorded try_compile output location doesn't exist:

    /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-KINC1d/Release/cmTC_4fe80.app/cmTC_4fe80

Call Stack (most recent call first):
  /Applications/CMake.app/Contents/share/cmake-3.25/Modules/CheckTypeSize.cmake:278 (__check_type_size_impl)
  3rdparty/libjpeg-turbo/CMakeLists.txt:70 (check_type_size)


-- Check size of unsigned long
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.25/Modules/CheckTypeSize.cmake:148 (try_compile):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    '/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG.bin'

  Recorded try_compile output location doesn't exist:

    /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-LeCDAE/Release/cmTC_d9879.app/cmTC_d9879

Call Stack (most recent call first):
  /Applications/CMake.app/Contents/share/cmake-3.25/Modules/CheckTypeSize.cmake:278 (__check_type_size_impl)
  3rdparty/libjpeg-turbo/CMakeLists.txt:71 (check_type_size)


-- Looking for include file locale.h
-- Looking for include file locale.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Performing Test HAVE_VLD1_S16_X3
-- Performing Test HAVE_VLD1_S16_X3 - Success
-- Performing Test HAVE_VLD1_U16_X2
-- Performing Test HAVE_VLD1_U16_X2 - Success
-- Performing Test HAVE_VLD1Q_U8_X4
-- Performing Test HAVE_VLD1Q_U8_X4 - Success
-- Use full Neon SIMD intrinsics implementation (NEON_INTRINSICS = ON)
-- SIMD extensions: arm64 (WITH_SIMD = 1)
-- Performing Test HAVE_C_STD_C99
-- Performing Test HAVE_C_STD_C99 - Success
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_C_WNO_CAST_ALIGN
-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
-- Performing Test HAVE_C_WNO_NULL_POINTER_SUBTRACTION
-- Performing Test HAVE_C_WNO_NULL_POINTER_SUBTRACTION - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED
-- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Success
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
-- ADE: Downloading v0.1.2a.zip from https://github.com/opencv/ade/archive/v0.1.2a.zip
-- Module opencv_alphamat disabled because the following dependencies are not found: Eigen
-- Julia not found. Not compiling Julia Bindings. 
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Processing WORLD modules...
--     module opencv_core...
-- Allocator metrics storage type: 'int'
--     module opencv_flann...
--     module opencv_imgproc...
--     module opencv_intensity_transform...
--     module opencv_ml...
--     module opencv_phase_unwrapping...
--     module opencv_photo...
--     module opencv_plot...
--     module opencv_quality...
--     module opencv_reg...
--     module opencv_surface_matching...
--     module opencv_xphoto...
--     module opencv_dnn...
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /Users/sgopala/Documents/opencv/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- opencv_dnn: filter out ocl4dnn source code
-- opencv_dnn: filter out cuda4dnn source code
--     module opencv_dnn_superres...
--     module opencv_features2d...
--     module opencv_fuzzy...
--     module opencv_hfs...
--     module opencv_imgcodecs...
--     module opencv_line_descriptor...
--     module opencv_saliency...
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL - Success
--     module opencv_text...
--     module opencv_videoio...
--     module opencv_barcode...
--     module opencv_calib3d...
--     module opencv_datasets...
--     module opencv_highgui...
-- highgui: using builtin backend: NONE
--     module opencv_mcc...
--     module opencv_objdetect...
--     module opencv_rapid...
--     module opencv_rgbd...
-- rgbd: Eigen support is disabled. Eigen is Required for Posegraph optimization
--     module opencv_shape...
--     module opencv_structured_light...
--     module opencv_video...
--     module opencv_videostab...
--     module opencv_wechat_qrcode...
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Failed
-- wechat_qrcode: Downloading detect.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel
-- wechat_qrcode: Downloading detect.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt
-- wechat_qrcode: Downloading sr.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel
-- wechat_qrcode: Downloading sr.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt
--     module opencv_xfeatures2d...
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_bi.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_hd.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_064.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_128.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_256.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Downloading boostdesc_lbgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
-- xfeatures2d/vgg: Downloading vgg_generated_48.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
-- xfeatures2d/vgg: Downloading vgg_generated_64.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
-- xfeatures2d/vgg: Downloading vgg_generated_80.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
-- xfeatures2d/vgg: Downloading vgg_generated_120.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
--     module opencv_ximgproc...
--     module opencv_xobjdetect...
--     module opencv_aruco...
--     module opencv_bgsegm...
--     module opencv_bioinspired...
--     module opencv_ccalib...
--     module opencv_dnn_objdetect...
--     module opencv_dpm...
--     module opencv_face...
-- data: Downloading face_landmark_model.dat from https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
--     module opencv_gapi...
--     module opencv_optflow...
--     module opencv_stitching...
--     module opencv_tracking...
--     module opencv_stereo...
-- Processing WORLD modules... DONE
-- Excluding from source files list: modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
-- Excluding from source files list: modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/world/layers/layers_common.avx.cpp
-- Excluding from source files list: <BUILD>/modules/world/layers/layers_common.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/world/layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/world/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/world/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/world/int8layers/layers_common.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/world/int8layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/world/int8layers/layers_common.lasx.cpp
-- Excluding from source files list: modules/features2d/src/fast.avx2.cpp
-- Performing Test HAVE_CXX_FOBJC_EXCEPTIONS
-- Performing Test HAVE_CXX_FOBJC_EXCEPTIONS - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 4.7.0-dev =====================================
--   Version control:               4.7.0-23-g3085fc6345
-- 
--   Extra modules:
--     Location (extra):            /Users/sgopala/Documents/opencv/opencv_contrib/modules
--     Version control (extra):     4.7.0-6-gd2581b4e
-- 
--   Platform:
--     Timestamp:                   2023-01-23T07:45:33Z
--     Host:                        Darwin 21.6.0 x86_64
--     Target:                      iOS 9.0 arm64
--     CMake:                       3.25.2
--     CMake generator:             Xcode
--     CMake build tool:            /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/xcodebuild_wrapper
--     Xcode:                       14.2
--     Configuration:               Debug Release
-- 
--   CPU/HW features:
--     Baseline:                    NEON FP16
--       requested:                 DETECT
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  (ver 14.0.0.14000029)
--     C++ flags (Release):         -fembed-bitcode   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fembed-bitcode   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
--     C flags (Release):           -fembed-bitcode   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fembed-bitcode   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          -framework UIKit -framework Accelerate -framework CoreGraphics -framework QuartzCore Iconv::Iconv
--     3rdparty dependencies:       libprotobuf libjpeg-turbo libwebp libpng zlib quirc ade
-- 
--   OpenCV modules:
--     To be built:                 aruco barcode bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objc objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light surface_matching text tracking video videoio videostab wechat_qrcode world xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    -
--     Disabled by dependency:      -
--     Unavailable:                 alphamat cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java julia matlab ovis python2 python3 sfm superres ts viz
--     Applications:                -
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
-- 
--   Media I/O: 
--     ZLib:                        build (ver 1.2.13)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
--       SIMD Support Request:      YES
--       SIMD Support:              YES
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         build (ver 1.6.37)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     AVFoundation:                YES
--     iOS capture:                 YES
-- 
--   Parallel framework:            GCD
-- 
--   Trace:                         YES (built-in)
-- 
--   Other third-party libraries:
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
-- 
--   Python (for build):            NO
-- 
--   Objective-C wrappers:          YES
-- 
--   Install to:                    /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/install
-- -----------------------------------------------------------------
-- 
-- Configuring incomplete, errors occurred!
See also "/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeOutput.log".
See also "/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeError.log".
============================================================
ERROR: Command '['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DOPENCV_INCLUDE_INSTALL_PATH=include', '-DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty', '-DFRAMEWORK_NAME=opencv2', '-DIOS_ARCH=arm64', '-DCMAKE_TOOLCHAIN_FILE=/Users/sgopala/Documents/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/sgopala/Documents/opencv/opencv', '-DOPENCV_EXTRA_MODULES_PATH=/Users/sgopala/Documents/opencv/opencv_contrib/modules', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.
============================================================
Traceback (most recent call last):
  File "/Users/sgopala/Documents/opencv/opencv/platforms/ios/build_framework.py", line 181, in build
    self._build(outdir)
  File "/Users/sgopala/Documents/opencv/opencv/platforms/ios/build_framework.py", line 139, in _build
    self.buildOne(target[0], target[1], main_build_dir, cmake_flags)
  File "/Users/sgopala/Documents/opencv/opencv/platforms/ios/build_framework.py", line 306, in buildOne
    execute(cmakecmd, cwd = builddir)
  File "/Users/sgopala/Documents/opencv/opencv/platforms/apple/cv_build_utils.py", line 13, in execute
    retcode = check_call(cmd, cwd = cwd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DOPENCV_INCLUDE_INSTALL_PATH=include', '-DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty', '-DFRAMEWORK_NAME=opencv2', '-DIOS_ARCH=arm64', '-DCMAKE_TOOLCHAIN_FILE=/Users/sgopala/Documents/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/sgopala/Documents/opencv/opencv', '-DOPENCV_EXTRA_MODULES_PATH=/Users/sgopala/Documents/opencv/opencv_contrib/modules', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.

please let me know what is the steps or prerequisites apart from cmake and Xcode.

Compilation failed:
source file: ‘/Users/sgopala/Documents/opencv/opencv/cmake/checks/cpu_dotprod.cpp’
check option: ‘’
===== BUILD LOG =====
Change Dir: /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/xcodebuild_wrapper -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_53a13 -parallelizeTargets -configuration Release -hideShellScriptEnvironment && Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild IPHONEOS_DEPLOYMENT_TARGET=9.0 CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO ARCHS=arm64 -sdk iphoneos -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_53a13 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment

User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
ARCHS = arm64
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
IPHONEOS_DEPLOYMENT_TARGET = 9.0
SDKROOT = iphoneos16.2

note: Using codesigning identity override:
Computing target dependency graph and provisioning inputs

Create build description
Build description signature: c35aebd43719ce3077d0b601d7b9b56f
Build description path: /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/XCBuildData/c35aebd43719ce3077d0b601d7b9b56f-desc.xcbuild

note: Building targets in dependency order
CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build

CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug

CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs

/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
MkDir /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_53a13.app (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
/bin/mkdir -p /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_53a13.app

ProcessInfoPlistFile /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_53a13.app/Info.plist /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_53a13.dir/Info.plist (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
builtin-infoPlistUtility /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_53a13.dir/Info.plist -producttype com.apple.product-type.application -genpkginfo /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_53a13.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -requiredArchitecture arm64 -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_53a13.app/Info.plist

WriteAuxiliaryFile /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cmTC_53a13.LinkFileList (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
write-file /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cmTC_53a13.LinkFileList

CompileC /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cpu_dotprod.o /Users/sgopala/Documents/opencv/opencv/cmake/checks/cpu_dotprod.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-ios9.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DCMAKE_INTDIR="Debug-iphoneos" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/include -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/DerivedSources-normal/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/DerivedSources/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/DerivedSources -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug -fembed-bitcode -fPIE -std=c++11 -MMD -MT dependencies -MF /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cpu_dotprod.d --serialize-diagnostics /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cpu_dotprod.dia -c /Users/sgopala/Documents/opencv/opencv/cmake/checks/cpu_dotprod.cpp -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cpu_dotprod.o
/Users/sgopala/Documents/opencv/opencv/cmake/checks/cpu_dotprod.cpp:12:24: error: use of undeclared identifier ‘vdotq_u32’
uint32x4_t v_dst = vdotq_u32(v_src, v_m0, v_m1);
^
1 error generated.

** BUILD FAILED **

The following build commands failed:
CompileC /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_53a13.build/Debug-iphoneos/Objects-normal/arm64/cpu_dotprod.o /Users/sgopala/Documents/opencv/opencv/cmake/checks/cpu_dotprod.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘cmTC_53a13’ from project ‘CMAKE_TRY_COMPILE’)
(1 failure)

===== END =====

Compilation failed:
source file: ‘/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/src.cxx’
check option: ‘’
===== BUILD LOG =====
Change Dir: /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/xcodebuild_wrapper -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_98a8a -parallelizeTargets -configuration Release -hideShellScriptEnvironment && Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild IPHONEOS_DEPLOYMENT_TARGET=9.0 CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO ARCHS=arm64 -sdk iphoneos -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_98a8a -parallelizeTargets -configuration Debug -hideShellScriptEnvironment

User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
ARCHS = arm64
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
IPHONEOS_DEPLOYMENT_TARGET = 9.0
SDKROOT = iphoneos16.2

note: Using codesigning identity override:
Computing target dependency graph and provisioning inputs

Create build description
Build description signature: d7bdcb4016b53d89441d99ff86447972
Build description path: /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/XCBuildData/d7bdcb4016b53d89441d99ff86447972-desc.xcbuild

note: Building targets in dependency order
CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build

CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug

CreateBuildDirectory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs

/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
MkDir /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
/bin/mkdir -p /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app

ProcessInfoPlistFile /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/Info.plist /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_98a8a.dir/Info.plist (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
builtin-infoPlistUtility /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_98a8a.dir/Info.plist -producttype com.apple.product-type.application -genpkginfo /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -requiredArchitecture arm64 -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/Info.plist

WriteAuxiliaryFile /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/cmTC_98a8a.LinkFileList (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
write-file /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/cmTC_98a8a.LinkFileList

CompileC /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/src.o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/src.cxx normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-ios9.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DCMAKE_INTDIR="Debug-iphoneos" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/include -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/DerivedSources-normal/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/DerivedSources/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/DerivedSources -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug -fembed-bitcode -fPIE -std=c++11 -MMD -MT dependencies -MF /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/src.d --serialize-diagnostics /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/src.dia -c /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/src.cxx -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/src.o

Ld /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/cmTC_98a8a normal (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs -L/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/EagerLinkingTBDs -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug -filelist /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/cmTC_98a8a.LinkFileList -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/cmTC_98a8a_lto.o -Xlinker -no_deduplicate -Wl,–as-needed -Wl,-search_paths_first -Xlinker -dependency_info -Xlinker /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/build/cmTC_98a8a.build/Debug-iphoneos/Objects-normal/arm64/cmTC_98a8a_dependency_info.dat -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/cmTC_98a8a
ld: unknown option: --as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/Debug/cmTC_98a8a.app/cmTC_98a8a normal (in target ‘cmTC_98a8a’ from project ‘CMAKE_TRY_COMPILE’)
(1 failure)

===== END =====

Compilation failed:
source file: ‘/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp/src.cxx’
check option: ‘’
===== BUILD LOG =====
Change Dir: /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/xcodebuild_wrapper -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_aadd4 -parallelizeTargets -configuration Release -hideShellScriptEnvironment && Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild IPHONEOS_DEPLOYMENT_TARGET=9.0 CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO ARCHS=arm64 -sdk iphoneos -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_aadd4 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment

User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
ARCHS = arm64
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
IPHONEOS_DEPLOYMENT_TARGET = 9.0
SDKROOT = iphoneos16.2

note: Using codesigning identity override:
Computing target dependency graph and provisioning inputs

WriteAuxiliaryFile /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/cmTC_844e2.LinkFileList (in target ‘cmTC_844e2’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj
write-file /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/cmTC_844e2.LinkFileList

CompileC /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/src.o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/src.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target ‘cmTC_844e2’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target arm64-apple-ios9.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR="Debug-iphoneos" -DIconv_IS_BUILT_IN -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug/include -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/DerivedSources-normal/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/DerivedSources/arm64 -I/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/DerivedSources -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug -fembed-bitcode -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -fvisibility=hidden -fvisibility-inlines-hidden -fPIE -MMD -MT dependencies -MF /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/src.d --serialize-diagnostics /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/src.dia -c /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/src.c -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/src.o

Ld /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug/cmTC_844e2.app/cmTC_844e2 normal (in target ‘cmTC_844e2’ from project ‘CMAKE_TRY_COMPILE’)
cd /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/EagerLinkingTBDs -L/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/EagerLinkingTBDs -F/Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug -filelist /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/cmTC_844e2.LinkFileList -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/cmTC_844e2_lto.o -Xlinker -no_deduplicate -Wl,-search_paths_first -Xlinker -dependency_info -Xlinker /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/build/cmTC_844e2.build/Debug-iphoneos/Objects-normal/arm64/cmTC_844e2_dependency_info.dat -o /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug/cmTC_844e2.app/cmTC_844e2
Undefined symbols for architecture arm64:
“_iconv”, referenced from:
_main in src.o
“_iconv_close”, referenced from:
_main in src.o
“_iconv_open”, referenced from:
_main in src.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld /Users/sgopala/Documents/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-gHlmDj/Debug/cmTC_844e2.app/cmTC_844e2 normal (in target ‘cmTC_844e2’ from project ‘CMAKE_TRY_COMPILE’)
(1 failure)

Source file was:

  #include <stddef.h>
  #include <iconv.h>
  int main() {
    char *a, *b;
    size_t i, j;
    iconv_t ic;
    ic = iconv_open("to", "from");
    iconv(ic, &a, &i, &b, &j);
    iconv_close(ic);
  }

I met the same problem as yours.I solved it with downgrade cmake version from 3.26.4 to 3.23.0.

Besides,you should use Xcode 13 to be compatible with cmake 3.23.0