Open utterances-bot opened 3 years ago
Hi, thanks for the tutorial. I followed your steps and everything went smooth untill I ran mdfind cv2.cpython
which was returned empty. Any ideas as to why would that be happening?
That is very strange. If the compilation was successful thre process should have generated the .so files. Maybe you could look into the paths manually? You can get an idea of the paths from the post itself.
Thanks a lot! This really helps.
@ntlex it might be that your numpy and python3 lib path may not be configured, at least this was the case for me.. Even after the fact, mfind wasn't working, but the objects were generated at the paths provided opencv-4.5.0/build/lib/python3/cv2.cpython-38-darwin.so
Thanks for the tutorial @sayakpaul. But after a while after typing make -j8 command I get the following error. Do you have an idea?
[ 71%] Linking CXX shared library ../../lib/libopencv_sfm.dylib ld: warning: ignoring file /usr/local/lib/libglog.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 ld: warning: ignoring file /usr/local/lib/libglog.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 ld: warning: ignoring file /usr/local/lib/libceres.1.14.0.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 ld: warning: ignoring file /usr/local/lib/libgflags.2.2.2.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 [ 71%] Building CXX object modules/optflow/CMakeFiles/opencv_optflow.dir/src/sparsetodenseflow.cpp.o Undefined symbols for architecture arm64: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [lib/libopencv_sfm.4.5.0.dylib] Error 1 make[1]: [modules/sfm/CMakeFiles/opencv_sfm.dir/all] Error 2
ld: warning: ignoring file /usr/local/lib/libglog.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
This tells me that the architecture you are building on is not based on ARM6.
I did not understand. I do these operations on Macbook Air M1. The cmake code I ran is as follows
/opt/homebrew/Cellar/cmake/3.19.3/bin/cmake \
-DCMAKE_SYSTEM_PROCESSOR=arm64 \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DWITH_OPENJPEG=OFF \
-DWITH_IPP=OFF \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=/Users/eminarvas/deeplearning/opencv_contrib-4.5.0/modules \
-D PYTHON3_EXECUTABLE=/Users/eminarvas/miniforge3/envs/deeplearning/bin/python3 \
-D PYTHON_LIBRARY=/Users/eminarvas/miniforge3/envs/deeplearning/lib/libpython3.8.dylib \
-D PYTHON_NUMPY_INCLUDE_DIR=/Users/eminarvas/miniforge3/envs/deeplearning/lib/python3.8/site-packages/numpy/core/include \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D BUILD_EXAMPLES=ON ..
From your comment here https://github.com/sayakpaul/portfolio/issues/7#issuecomment-767517870, it appears that CMAKE is picking up the architecture as x86_64 and not as ARM64. This, I believe, is the primary cause of why your build is failing.
Thanks @sayakpaul. I solve the problem encoutered by Memina by:
Use the latest OpenCV (current build is 4.5.1-dev): Just download directly OpenCV and unzip from the links
https://github.com/opencv/opencv https://github.com/opencv/opencv_contrib
Make sure you install Cmake properly. Maybe the easiest way is to follow instruction to download Universal Cmake version
and then configure
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
arch -arm64 cmake ... arch -arm64 make -j8 arch -arm64 sudo make install
Thanks for passing this along @luuqh.
@sayakpaul Everything worked fine and installed as you mentioned, except on typing
mdfind cv2.cpython
this is not returning anything, please help me out.
You will probably need to do a bit of trial and error for that. Look for the path I have mentioned in my blog post and start your search from there. I am not exactly sure why mdfind
behaves weirdly sometimes. Probably there's an updatedb
like command which I am not aware of.
Sayak, thanks for the great description. Honestly, I have used venv instead of conda and that might be my problem. I would prefer to use venv in order to not mix several different environment manages.
Now the make process breaks at 23% with the following output:
'ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [lib/libopencv_hdf.4.5.1.dylib] Error 1 make[1]: [modules/hdf/CMakeFiles/opencv_hdf.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 23%] Built target opencv_imgproc make: [all] Error 2'
Maybe you have an idea what to look at. Thanks in advance.
ld: symbol(s) not found for architecture arm64
The above line from the logs might suggest that it's an architecture mismatch but I am not sure.
@sayakpaul I resolved my issue of mdfind cv2.cpython
returning empty string by deleting the build folder and compiling opencv again.
Thanks for the help.
Hi @sayakpaul I'm a newcomer in terms of python, conda, numpy and have zero knowledge in environment programming other than C/C++. On my m1 mac, I've installed conda and python 3.8.6 but when I'm trying to install NumPy I got several errors.
1st problem, when I execute :
pip install --upgrade --no-dependencies --force numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
it returns as zsh: command not found:pip
After some googling, people on stackoverflow suggest to use pip3 instead of pip.
Hence when I execute: pip3 install --upgrade --no-dependencies --force numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
it returns as WARNING: Requirement 'numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl' looks like a filename, but the file does not exist ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl is not a supported wheel on this platform.
I'm extremely new in this installation (literally installed homebrew a few hours ago). Any help would be highly appreciate. Thanks !
@muhmdakml seems like you have not downloaded this file - numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
. If you untar tensorflow_macos-0.1alpha0.tar.gz
you will find it inside tensorflow_macos/arm64
directory.
@sayakpaul thank you for your feedback. I deleted the original tensorflow_macos folder and re-download it from github. Extracting the newly downloaded .tar.gz now runs smoothly.
The only issue I face now is the same as others, where running
mdfind cv2.python
returns nothing.
I'm trying to find the paths manually as per suggested. But manually path searching (enabled show hidden folders) into
/Users/xxx/opencv-4.5.0/build/lib/
/usr/local/lib
only files with ".dylib" extensions are shown. No other folders inside this lib and no 'python3' folder are shown. However, I did install python 3.8.6 as per the tutorial.
Is there anything more installation that I could've missed? Or am I looking in the wrong path direction ? Thank you so much.
Edit : Upon further inspection when running CMake (just before running make), I noticed my :
Python 3:
> Interpreter : NO
> Libraries : NO
> numpy : NO (Python3 wrappers can not be generated)
> Install Path : -
Could this be the issue? When I execute python3 --version
it does return as python 3.8.6.
I would suggest activating your conda environment first and then try redoing all the installations. You probably forgot to activate conda environment before starting all the other installations which is not recommended for this blog post.
I think if you follow through this tutorial sequentially you would be successful installing OpenCV on your M1 Mac.
Now that conda install opencv
is available, what's the difference between that one and this one?
@louy2 when I wrote this blog post it was not available. I believe with conda install opencv
the process is easier. So, there won't likely be any difference.
I am still getting the error of module not found when I import cv2.
When I ran "ls -l cv2.so" I got the exact same output as "/usr/local/lib/python3.8/site-packages/cv2/python-3.8/cv2.cpython-38-darwin.so". But when I went to look at the "venv/lib/python3.8/site-packages/cv2.so" file from finder, it showed that the original item for cv2.so could not be found.
Please help me resolve this issue.
You probably forgot to sym-link the .so file.
Thank you for the tutorial, @sayakpaul! I was wondering if after doing the above steps (which worked perfectly for me) it is possible for me to use opencv in pycharm, or only in the terminal?
Sorry for the noob question :D
As long as the Python interpreter inside your PyCharm is pointed to the one where you installed OpenCV, you should be able to use it inside PyCharm. In fact, this is exactly what I do as well.
I did every step successfully but the command - "mdfind cv2.cpython" is not giving location of the .so file . and I not able to symlink I looked myself manually in many folders but nothing could be found . can u help me ?
Try looking here - /usr/local/lib/python3.8/site-packages/cv2/python-3.8
(of course, the path might be different in your case).
Thanks, it worked! For future people asking this you must check the 'previously created interpreter' when creating a new project and fill in the location of the environment configured with @sayakpaul 's tutorial.
If mdfind doesn't work for you, you could also try to do:
python -c "import cv2; print(cv2.__file__)"
thanks @sayakpaul @gerardsimons I just removed everything and did the process again and it worked
I use python3 from Homebrew; no conda. I added the following lines to cmake command:
-D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-D PYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
-D PYTHON3_EXECUTABLE=/opt/homebrew/bin/python3 \
Without the first line, the build process will skip the Python package. This line tells it where to find Python.h.
This might explain why mdfind cv2.cpython
returns empty.
HI Sayak, thanks for the tutorial.
I managed to install it and when I import the package I can run print(cv2.__version__), but when I try to install another package that has
opencv-python` as a dependency, it doesn't seem to recognize that it is already installed. It then tries to install the default pip version, which of course fails.
Any idea how to fix this? Greatly appreciated. Thanks.
Are you using any Python virtual environments to manage the dependencies?
I'm getting: " ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl is not a supported wheel on this platform.
When running: pip install --upgrade --no-dependencies --force numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
virtual environment activated
@muhmdakml which file did you download from github? A different one from the one in the tutorial?
while using cmake to compile, it says "configuring incomplete, errors occurred". Has anyone experiences the same? OPENCV_EXTRA_MODULES_PATH and PYTHON3_EXECUTABLE have been changed to the correct paths. Any idea what is my problem and how to solve it? here is the CMakerError.log: Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /Library/Developer/CommandLineTools/usr/bin/c++ Build flags: Id flags:
The output was: 1 ld: library not found for -lc++ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /Library/Developer/CommandLineTools/usr/bin/cc Build flags: Id flags:
The output was: 1 ld: library not found for -lSystem clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compilation failed: source file: '/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.cxx' check option: '' ===== BUILD LOG ===== Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_b6de8/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_b6de8.dir/build.make CMakeFiles/cmTC_b6de8.dir/build Building CXX object CMakeFiles/cmTC_b6de8.dir/src.cxx.o /Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -std=c++11 -MD -MT CMakeFiles/cmTC_b6de8.dir/src.cxx.o -MF CMakeFiles/cmTC_b6de8.dir/src.cxx.o.d -o CMakeFiles/cmTC_b6de8.dir/src.cxx.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.cxx Linking CXX executable cmTC_b6de8 /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b6de8.dir/link.txt --verbose=1 /Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,--as-needed CMakeFiles/cmTC_b6de8.dir/src.cxx.o -o cmTC_b6de8 ld: unknown option: --as-needed clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [cmTC_b6de8] Error 1 make: [cmTC_b6de8/fast] Error 2
===== END =====
Determining if the include file malloc.h exists failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_9e417/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_9e417.dir/build.make CMakeFiles/cmTC_9e417.dir/build Building C object CMakeFiles/cmTC_9e417.dir/CheckIncludeFile.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_9e417.dir/CheckIncludeFile.c.o -MF CMakeFiles/cmTC_9e417.dir/CheckIncludeFile.c.o.d -o CMakeFiles/cmTC_9e417.dir/CheckIncludeFile.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'malloc.h' file not found
^~~~~~~~~~
1 error generated. make[1]: [CMakeFiles/cmTC_9e417.dir/CheckIncludeFile.c.o] Error 1 make: [cmTC_9e417/fast] Error 2
Determining size of off64_t failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_34922/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_34922.dir/build.make CMakeFiles/cmTC_34922.dir/build Building C object CMakeFiles/cmTC_34922.dir/OFF64_T.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_34922.dir/OFF64_T.c.o -MF CMakeFiles/cmTC_34922.dir/OFF64_T.c.o.d -o CMakeFiles/cmTC_34922.dir/OFF64_T.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:29:12: error: use of undeclared identifier 'off64_t' ('0' + ((SIZE / 10000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:30:12: error: use of undeclared identifier 'off64_t' ('0' + ((SIZE / 1000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:31:12: error: use of undeclared identifier 'off64_t' ('0' + ((SIZE / 100)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:32:12: error: use of undeclared identifier 'off64_t' ('0' + ((SIZE / 10)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:33:12: error: use of undeclared identifier 'off64_t' ('0' + (SIZE % 10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
^
5 errors generated. make[1]: [CMakeFiles/cmTC_34922.dir/OFF64_T.c.o] Error 1 make: [cmTC_34922/fast] Error 2
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/OFF64_T.c:
static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']',
' ','k','e','y','[', KEY, ']',
'\0'};
int main(argc, argv) int argc; char *argv[];
int main(int argc, char *argv[])
{ int require = 0; require += info_size[argc]; (void)argv; return require; }
Determining if the include file io.h exists failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_45f44/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_45f44.dir/build.make CMakeFiles/cmTC_45f44.dir/build Building C object CMakeFiles/cmTC_45f44.dir/CheckIncludeFile.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_45f44.dir/CheckIncludeFile.c.o -MF CMakeFiles/cmTC_45f44.dir/CheckIncludeFile.c.o.d -o CMakeFiles/cmTC_45f44.dir/CheckIncludeFile.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'io.h' file not found
^~~~~~
1 error generated. make[1]: [CMakeFiles/cmTC_45f44.dir/CheckIncludeFile.c.o] Error 1 make: [cmTC_45f44/fast] Error 2
Determining size of INT8 failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_083ed/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_083ed.dir/build.make CMakeFiles/cmTC_083ed.dir/build Building C object CMakeFiles/cmTC_083ed.dir/int8.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_083ed.dir/int8.c.o -MF CMakeFiles/cmTC_083ed.dir/int8.c.o.d -o CMakeFiles/cmTC_083ed.dir/int8.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:29:12: error: use of undeclared identifier 'INT8' ('0' + ((SIZE / 10000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:30:12: error: use of undeclared identifier 'INT8' ('0' + ((SIZE / 1000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:31:12: error: use of undeclared identifier 'INT8' ('0' + ((SIZE / 100)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:32:12: error: use of undeclared identifier 'INT8' ('0' + ((SIZE / 10)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:33:12: error: use of undeclared identifier 'INT8' ('0' + (SIZE % 10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:27:22: note: expanded from macro 'SIZE'
^
5 errors generated. make[1]: [CMakeFiles/cmTC_083ed.dir/int8.c.o] Error 1 make: [cmTC_083ed/fast] Error 2
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int8.c:
static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']',
' ','k','e','y','[', KEY, ']',
'\0'};
int main(argc, argv) int argc; char *argv[];
int main(int argc, char *argv[])
{ int require = 0; require += info_size[argc]; (void)argv; return require; }
Determining size of INT16 failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_e97a7/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_e97a7.dir/build.make CMakeFiles/cmTC_e97a7.dir/build Building C object CMakeFiles/cmTC_e97a7.dir/int16.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_e97a7.dir/int16.c.o -MF CMakeFiles/cmTC_e97a7.dir/int16.c.o.d -o CMakeFiles/cmTC_e97a7.dir/int16.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:29:12: error: use of undeclared identifier 'INT16' ('0' + ((SIZE / 10000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:30:12: error: use of undeclared identifier 'INT16' ('0' + ((SIZE / 1000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:31:12: error: use of undeclared identifier 'INT16' ('0' + ((SIZE / 100)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:32:12: error: use of undeclared identifier 'INT16' ('0' + ((SIZE / 10)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:33:12: error: use of undeclared identifier 'INT16' ('0' + (SIZE % 10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:27:22: note: expanded from macro 'SIZE'
^
5 errors generated. make[1]: [CMakeFiles/cmTC_e97a7.dir/int16.c.o] Error 1 make: [cmTC_e97a7/fast] Error 2
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int16.c:
static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']',
' ','k','e','y','[', KEY, ']',
'\0'};
int main(argc, argv) int argc; char *argv[];
int main(int argc, char *argv[])
{ int require = 0; require += info_size[argc]; (void)argv; return require; }
Determining size of INT32 failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_88d75/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_88d75.dir/build.make CMakeFiles/cmTC_88d75.dir/build Building C object CMakeFiles/cmTC_88d75.dir/int32.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_88d75.dir/int32.c.o -MF CMakeFiles/cmTC_88d75.dir/int32.c.o.d -o CMakeFiles/cmTC_88d75.dir/int32.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:29:12: error: use of undeclared identifier 'INT32' ('0' + ((SIZE / 10000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:30:12: error: use of undeclared identifier 'INT32' ('0' + ((SIZE / 1000)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:31:12: error: use of undeclared identifier 'INT32' ('0' + ((SIZE / 100)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:32:12: error: use of undeclared identifier 'INT32' ('0' + ((SIZE / 10)%10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:27:22: note: expanded from macro 'SIZE'
^
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:33:12: error: use of undeclared identifier 'INT32' ('0' + (SIZE % 10)), ^ /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:27:22: note: expanded from macro 'SIZE'
^
5 errors generated. make[1]: [CMakeFiles/cmTC_88d75.dir/int32.c.o] Error 1 make: [cmTC_88d75/fast] Error 2
/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CheckTypeSize/int32.c:
static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']',
' ','k','e','y','[', KEY, ']',
'\0'};
int main(argc, argv) int argc; char *argv[];
int main(int argc, char *argv[])
{ int require = 0; require += info_size[argc]; (void)argv; return require; }
Build output check failed: Regex: 'unknown .*option' Output line: 'warning: unknown warning option '-Wno-unused-but-set-variable', did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]' Compilation failed: source file: '/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c' check option: ' -Wno-unused-but-set-variable' ===== BUILD LOG ===== Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_a9948/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_a9948.dir/build.make CMakeFiles/cmTC_a9948.dir/build Building C object CMakeFiles/cmTC_a9948.dir/src.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -Wno-unused-but-set-variable -MD -MT CMakeFiles/cmTC_a9948.dir/src.c.o -MF CMakeFiles/cmTC_a9948.dir/src.c.o.d -o CMakeFiles/cmTC_a9948.dir/src.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option] /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c:1:8: warning: unknown pragma ignored [-Wunknown-pragmas]
^
2 warnings generated. Linking C executable cmTC_a9948 /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a9948.dir/link.txt --verbose=1 /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip CMakeFiles/cmTC_a9948.dir/src.c.o -o cmTC_a9948
===== END =====
Build output check failed: Regex: 'unknown .*option' Output line: 'warning: unknown warning option '-Wno-maybe-uninitialized', did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]' Compilation failed: source file: '/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c' check option: ' -Wno-maybe-uninitialized' ===== BUILD LOG ===== Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_f4b3b/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_f4b3b.dir/build.make CMakeFiles/cmTC_f4b3b.dir/build Building C object CMakeFiles/cmTC_f4b3b.dir/src.c.o /Library/Developer/CommandLineTools/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wstrict-prototypes -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-missing-prototypes -Wno-missing-declarations -Wno-undef -Wno-unused -Wno-sign-compare -Wno-cast-align -Wno-shadow -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -Wno-maybe-uninitialized -MD -MT CMakeFiles/cmTC_f4b3b.dir/src.c.o -MF CMakeFiles/cmTC_f4b3b.dir/src.c.o.d -o CMakeFiles/cmTC_f4b3b.dir/src.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option] /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c:1:8: warning: unknown pragma ignored [-Wunknown-pragmas]
^
2 warnings generated. Linking C executable cmTC_f4b3b /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f4b3b.dir/link.txt --verbose=1 /Library/Developer/CommandLineTools/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wstrict-prototypes -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-missing-prototypes -Wno-missing-declarations -Wno-undef -Wno-unused -Wno-sign-compare -Wno-cast-align -Wno-shadow -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip CMakeFiles/cmTC_f4b3b.dir/src.c.o -o cmTC_f4b3b
===== END =====
Build output check failed: Regex: 'unknown .*option' Output line: 'warning: unknown warning option '-Wno-unused-but-set-parameter', did you mean '-Wno-unused-parameter'? [-Wunknown-warning-option]' Compilation failed: source file: '/Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c' check option: ' -Wno-unused-but-set-parameter' ===== BUILD LOG ===== Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_93936/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_93936.dir/build.make CMakeFiles/cmTC_93936.dir/build Building C object CMakeFiles/cmTC_93936.dir/src.c.o /Library/Developer/CommandLineTools/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-implicit-function-declaration -Wno-uninitialized -Wno-missing-prototypes -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -Wno-unused-but-set-parameter -MD -MT CMakeFiles/cmTC_93936.dir/src.c.o -MF CMakeFiles/cmTC_93936.dir/src.c.o.d -o CMakeFiles/cmTC_93936.dir/src.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c warning: unknown warning option '-Wno-unused-but-set-parameter'; did you mean '-Wno-unused-parameter'? [-Wunknown-warning-option] /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/src.c:1:8: warning: unknown pragma ignored [-Wunknown-pragmas]
^
2 warnings generated. Linking C executable cmTC_93936 /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_93936.dir/link.txt --verbose=1 /Library/Developer/CommandLineTools/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-implicit-function-declaration -Wno-uninitialized -Wno-missing-prototypes -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip CMakeFiles/cmTC_93936.dir/src.c.o -o cmTC_93936
===== END =====
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)": Apple clang version 12.0.5 (clang-1205.0.22.9) Target: arm64-apple-darwin20.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Determining if the function sgemm_ exists failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_16123/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_16123.dir/build.make CMakeFiles/cmTC_16123.dir/build Building C object CMakeFiles/cmTC_16123.dir/CheckFunctionExists.c.o /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -DCHECK_FUNCTIONEXISTS=sgemm -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_16123.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_16123.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_16123.dir/CheckFunctionExists.c.o -c /opt/homebrew/Cellar/cmake/3.20.2/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_16123 /opt/homebrew/Cellar/cmake/3.20.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_16123.dir/link.txt --verbose=1 /Library/Developer/CommandLineTools/usr/bin/cc -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -DCHECK_FUNCTIONEXISTS=sgemm -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip CMakeFiles/cmTC_16123.dir/CheckFunctionExists.c.o -o cmTC_16123 Undefined symbols for architecture arm64: "sgemm", referenced from: _main in CheckFunctionExists.c.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [cmTC_16123] Error 1 make: [cmTC_16123/fast] Error 2
Determining if the CL_VERSION_2_2 exist failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_a163d/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_a163d.dir/build.make CMakeFiles/cmTC_a163d.dir/build Building C object CMakeFiles/cmTC_a163d.dir/CheckSymbolExists.c.o /Library/Developer/CommandLineTools/usr/bin/cc -F/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_a163d.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_a163d.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_a163d.dir/CheckSymbolExists.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'CL_VERSION_2_2' return ((int*)(&CL_VERSION_2_2))[argc]; ^ 1 error generated. make[1]: [CMakeFiles/cmTC_a163d.dir/CheckSymbolExists.c.o] Error 1 make: [cmTC_a163d/fast] Error 2
File /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /
int main(int argc, char** argv) { (void)argv;
return ((int*)(&CL_VERSION_2_2))[argc];
(void)argc; return 0;
} Determining if the CL_VERSION_2_1 exist failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_e22e6/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_e22e6.dir/build.make CMakeFiles/cmTC_e22e6.dir/build Building C object CMakeFiles/cmTC_e22e6.dir/CheckSymbolExists.c.o /Library/Developer/CommandLineTools/usr/bin/cc -F/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_e22e6.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_e22e6.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_e22e6.dir/CheckSymbolExists.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'CL_VERSION_2_1' return ((int*)(&CL_VERSION_2_1))[argc]; ^ 1 error generated. make[1]: [CMakeFiles/cmTC_e22e6.dir/CheckSymbolExists.c.o] Error 1 make: [cmTC_e22e6/fast] Error 2
File /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /
int main(int argc, char** argv) { (void)argv;
return ((int*)(&CL_VERSION_2_1))[argc];
(void)argc; return 0;
} Determining if the CL_VERSION_2_0 exist failed with the following output: Change Dir: /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_75b2d/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_75b2d.dir/build.make CMakeFiles/cmTC_75b2d.dir/build Building C object CMakeFiles/cmTC_75b2d.dir/CheckSymbolExists.c.o /Library/Developer/CommandLineTools/usr/bin/cc -F/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks -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 -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fPIE -MD -MT CMakeFiles/cmTC_75b2d.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_75b2d.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_75b2d.dir/CheckSymbolExists.c.o -c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'CL_VERSION_2_0' return ((int*)(&CL_VERSION_2_0))[argc]; ^ 1 error generated. make[1]: [CMakeFiles/cmTC_75b2d.dir/CheckSymbolExists.c.o] Error 1 make: [cmTC_75b2d/fast] Error 2
File /Users/huxinyun/AI/opencv-4.5.0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /
int main(int argc, char** argv) { (void)argv;
return ((int*)(&CL_VERSION_2_0))[argc];
(void)argc; return 0;
}
I have exactly the same here.
The output was: 1 ld: library not found for -lc++ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /Library/Developer/CommandLineTools/usr/bin/cc Build flags: Id flags:
The output was: 1 ld: library not found for -lSystem clang: error: linker command failed with exit code 1 (use -v to see invocation)
. . .
Please format your output with code tags "```". Also as the output mentions, please include -v for more verbose logging
Apologies for my late reply. I have tried to be as detailed as possible with the steps and my system setup. If you think you are exactly following the steps AND the system is similar to mine and then it's failing I think it might better to report it on OpenCV's GitHub.
@sayakpaul,
I am getting error while I am executing cmake statement. I think I have my directories correct as you mentioned above, Not sure how to resolve this. Can you suggest something to resolve this
" -- Configuring incomplete, errors occurred! See also "/Users/mayankbatra/Downloads/opencv-4.5.0 2/build/CMakeFiles/CMakeOutput.log". See also "/Users/mayankbatra/Downloads/opencv-4.5.0 2/build/CMakeFiles/CMakeError.log". "
@Sayakpaul,
Below is a detailed output that I got when I ran the cmake statement: (python38-demo-v2) mayankbatra@Mayanks-MacBook-Pro build % cmake \ -DCMAKE_SYSTEM_PROCESSOR=arm64 \ -DCMAKE_OSX_ARCHITECTURES=arm64 \ -DWITH_OPENJPEG=OFF \ -DWITH_IPP=OFF \ -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D OPENCV_EXTRA_MODULES_PATH=/Users/mayankbatra/Downloads/opencv-4.5.0 2/modules \ -D PYTHON3_EXECUTABLE=/Users/mayankbatra/miniforge3/envs/python38-demo-v2/bin/python3 \ -D BUILD_opencv_python2=OFF \ -D BUILD_opencv_python3=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D INSTALL_C_EXAMPLES=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ -D BUILD_EXAMPLES=ON .. -- Detected processor: arm64 -- Looking for ccache - not found -- Performing Test HAVE_CPU_BASELINE_FLAGS -- Performing Test HAVE_CPU_BASELINE_FLAGS - Success -- libjpeg-turbo: VERSION = 2.0.5, BUILD = opencv-4.5.0-libjpeg-turbo -- LAPACK(LAPACK/Apple): LAPACK_LIBRARIES: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Accelerate.framework;-lm;-ldl -- LAPACK(LAPACK/Apple): Support is enabled. -- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- Could NOT find Pylint (missing: PYLINT_EXECUTABLE) -- Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE) -- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file CMake Deprecation Warning at 3rdparty/carotene/hal/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at 3rdparty/carotene/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
-- OpenCV Python: during development append to PYTHONPATH: /Users/mayankbatra/Downloads/opencv-4.5.0 2/build/python_loader CMake Warning at /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:112 (message): OpenCV: Variable has been removed from CMake scripts: MINGW64 Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:9223372036854775807 (_ocv_access_removed_variable) /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:117 (if) /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:123 (ocv_declare_removed_variable) /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVDetectCXXCompiler.cmake:23 (ocv_declare_removed_variables) /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:163 (include)
CMake Warning at /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:112 (message): OpenCV: Variable has been removed from CMake scripts: MSVC64 Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:9223372036854775807 (_ocv_access_removed_variable) /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:117 (if) /Users/mayankbatra/Downloads/opencv-4.5.0 2/cmake/OpenCVUtils.cmake:123 (ocv_declare_removed_variable) /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVDetectCXXCompiler.cmake:23 (ocv_declare_removed_variables) /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:163 (include)
-- Detected processor: arm64 -- Looking for ccache - not found -- Performing Test HAVE_CPU_BASELINE_FLAGS -- Performing Test HAVE_CPU_BASELINE_FLAGS - Success CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/zlib/CMakeLists.txt:79 (add_library): add_library cannot create target "zlib" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/zlib". See documentation for policy CMP0002 for more details.
-- libjpeg-turbo: VERSION = 2.0.5, BUILD = opencv-4.5.0-libjpeg-turbo CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libjpeg-turbo/CMakeLists.txt:109 (add_library): add_library cannot create target "libjpeg-turbo" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/libjpeg-turbo". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libtiff/CMakeLists.txt:465 (add_library): add_library cannot create target "libtiff" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/libtiff". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libtiff/CMakeLists.txt:466 (target_link_libraries): Attempt to add link library "zlib" to target "libtiff" which is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libwebp/CMakeLists.txt:37 (add_library): add_library cannot create target "libwebp" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/libwebp". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libjasper/CMakeLists.txt:20 (add_library): add_library cannot create target "libjasper" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/libjasper". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libpng/CMakeLists.txt:77 (add_library): add_library cannot create target "libpng" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/libpng". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/libpng/CMakeLists.txt:78 (target_link_libraries): Attempt to add link library "zlib" to target "libpng" which is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/openexr/CMakeLists.txt:128 (add_library): add_library cannot create target "IlmImf" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/openexr". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/openexr/CMakeLists.txt:129 (target_link_libraries): Attempt to add link library "zlib" to target "IlmImf" which is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/protobuf/CMakeLists.txt:143 (add_library): add_library cannot create target "libprotobuf" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/protobuf". See documentation for policy CMP0002 for more details.
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE) -- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/quirc/CMakeLists.txt:11 (add_library): add_library cannot create target "quirc" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/quirc". See documentation for policy CMP0002 for more details.
CMake Deprecation Warning at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/carotene/hal/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/carotene/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/carotene/CMakeLists.txt:30 (add_library): add_library cannot create target "carotene_objs" because another target with the same name already exists. The existing target is created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/carotene". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/carotene/CMakeLists.txt:44 (add_library): add_library cannot create target "carotene" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/carotene". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/carotene/hal/CMakeLists.txt:86 (add_library): add_library cannot create target "tegra_hal" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/carotene/hal". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/ittnotify/CMakeLists.txt:40 (add_library): add_library cannot create target "ittnotify" because another target with the same name already exists. The existing target is a static library created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2/3rdparty/ittnotify". See documentation for policy CMP0002 for more details.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/3rdparty/ittnotify/CMakeLists.txt:44 (target_link_libraries): Attempt to add link library "dl" to target "ittnotify" which is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVExtraTargets.cmake:23 (add_custom_target): add_custom_target cannot create target "opencv_modules" because another target with the same name already exists. The existing target is a custom target created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:861 (include)
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVExtraTargets.cmake:33 (add_custom_target): add_custom_target cannot create target "opencv_tests" because another target with the same name already exists. The existing target is a custom target created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:861 (include)
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVExtraTargets.cmake:39 (add_custom_target): add_custom_target cannot create target "opencv_perf_tests" because another target with the same name already exists. The existing target is a custom target created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:861 (include)
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVExtraTargets.cmake:54 (add_custom_target): add_custom_target cannot create target "opencv_samples" because another target with the same name already exists. The existing target is a custom target created in source directory "/Users/mayankbatra/Downloads/opencv-4.5.0 2". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0/CMakeLists.txt:861 (include)
CMake Error at /Users/mayankbatra/Downloads/opencv-4.5.0/cmake/OpenCVModule.cmake:364 (message): OpenCV has already loaded its modules. Calling ocv_glob_modules second time is not allowed. Call Stack (most recent call first): /Users/mayankbatra/Downloads/opencv-4.5.0/modules/CMakeLists.txt:7 (ocv_glob_modules)
-- Configuring incomplete, errors occurred! See also "/Users/mayankbatra/Downloads/opencv-4.5.0 2/build/CMakeFiles/CMakeOutput.log". See also "/Users/mayankbatra/Downloads/opencv-4.5.0 2/build/CMakeFiles/CMakeError.log".
@Sayakpaul, Never mind, I was able to get it solved using conda install opencv. (reading through one of the comments on your post)
Thank you so much!
Hi, Im getting the below error. Im new to Mac environment. Could you please help
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file CMake Deprecation Warning at 3rdparty/carotene/hal/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at 3rdparty/carotene/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
dude, you obfuscated your username in the mdfind command but your cmake has your username wide open.
conda install opencv worked just fine!
mkdir build && cd build' i'm having empty build folder after excuting this code , and i tried to compile opencv it shows me a error 'CMakelists.txt is not found' pls help me out to solve this problem
conda install -y python==3.9
conda install opencv
import cv2
Traceback (most recent call last):
File "
hi I followed steps above but I seem to get this error when I import cv2?
ImportError: dlopen(/Users/w2030634/miniforge3/envs/venv/lib/python3.8/site-packages/cv2.so, 2): Library not loaded: /opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib Referenced from: /Users/w2030634/miniforge3/envs/venv/lib/python3.8/site-packages/cv2.so Reason: image not found
I solved the above problem by reinstalling ffmpeg
$ brew uninstall ffmpeg
$ brew update $ brew upgrade $ brew cleanup
$ brew install ffmpeg --force $ brew link ffmpeg
I can't make -j8
Building and Installing OpenCV 4.5.0 on an M1 Mac | Sayak Paul
This post shows how to build and install OpenCV 4.5.0 on a MacBook Pro that comes with an M1 chip.
https://sayak.dev/install-opencv-m1/