-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
failed on Configuring with M1 Mac #23156
Copy link
Copy link
Closed
Description
System Information
OpenCV version: 4.5.2
CMakeError.log
CMakeOutput.log
Operating System / Platform: macOS Monterey 12.5 Apple M1
Compiler & compiler version: XCode 14.0.1
Python version: 3.10
CMake: 3.25.1
Detailed description
I tried to solve this problem for a week....
-- Check size of size_t
CMake Error at /opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/CheckTypeSize.cmake:148 (try_compile):
Cannot copy output executable
''
to destination specified by COPY_FILE:
'/Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.bin'
Recorded try_compile output location doesn't exist:
/Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-2PaoqU/Release/cmTC_7e257.app/cmTC_7e257
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/CheckTypeSize.cmake:278 (__check_type_size_impl)
3rdparty/libjpeg-turbo/CMakeLists.txt:25 (check_type_size)
-- Check size of unsigned long
CMake Error at /opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/CheckTypeSize.cmake:148 (try_compile):
Cannot copy output executable
''
to destination specified by COPY_FILE:
'/Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG.bin'
Recorded try_compile output location doesn't exist:
/Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeScratch/TryCompile-pJTmFi/Release/cmTC_8bb7b.app/cmTC_8bb7b
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/CheckTypeSize.cmake:278 (__check_type_size_impl)
3rdparty/libjpeg-turbo/CMakeLists.txt:26 (check_type_size)
-- General configuration for OpenCV 4.5.2 =====================================
-- Version control: unknown
--
-- Platform:
-- Timestamp: 2023-01-19T16:22:16Z
-- Host: Darwin 21.6.0 arm64
-- Target: iOS 9.0 arm64
-- CMake: 3.25.1
-- CMake generator: Xcode
-- CMake build tool: /Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/xcodebuild_wrapper
-- Xcode: 14.0.1
-- 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 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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
-- 3rdparty dependencies: libprotobuf libjpeg-turbo libwebp libpng zlib quirc ade
--
-- OpenCV modules:
-- To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objc objdetect photo stitching video videoio world
-- Disabled: -
-- Disabled by dependency: -
-- Unavailable: java python2 python3 ts
-- Applications: -
-- Documentation: NO
-- Non-free algorithms: NO
--
-- GUI:
--
-- Media I/O:
-- ZLib: build (ver 1.2.11)
-- JPEG: build-libjpeg-turbo (ver 2.0.6-62)
-- 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.5.1)
--
-- Python (for build): NO
--
-- Objective-C wrappers: YES
--
-- Install to: /Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/install
-- -----------------------------------------------------------------
--
-- Configuring incomplete, errors occurred!
See also "/Users/zhaoweiwang/opencv/ios/build/build-arm64-iphoneos/CMakeFiles/CMakeOutput.log".
See also "/Users/zhaoweiwang/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/zhaoweiwang/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/zhaoweiwang/opencv/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.
============================================================
Traceback (most recent call last):
File "/Users/zhaoweiwang/opencv/opencv/platforms/ios/build_framework.py", line 159, in build
self._build(outdir)
File "/Users/zhaoweiwang/opencv/opencv/platforms/ios/build_framework.py", line 133, in _build
self.buildOne(target[0], target[1], main_build_dir, cmake_flags)
File "/Users/zhaoweiwang/opencv/opencv/platforms/ios/build_framework.py", line 284, in buildOne
execute(cmakecmd, cwd = builddir)
File "/Users/zhaoweiwang/opencv/opencv/platforms/apple/cv_build_utils.py", line 13, in execute
retcode = check_call(cmd, cwd = cwd)
File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, 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/zhaoweiwang/opencv/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/zhaoweiwang/opencv/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.
Steps to reproduce
cd ~/<my_working_directory>
python opencv/platforms/ios/build_framework.py ios
run the code above can reproduce
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable