I’m trying to import opencv to android studios. To do so, I’m building opencv first with the help of this tutorial: OpenCV: Installation in MacOS .
I’m getting the following log files:
Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.
Compiler: /Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++
Build flags: -march=core2;-mtune=haswell;-mssse3;-ftree-vectorize;-fPIC;-fPIE;-fstack-protector-strong;-O2;-pipe;-stdlib=libc++;-fvisibility-inlines-hidden;-std=c++14;-fmessage-length=0
Id flags:The output was:
254
clang-4.0: error: unable to execute command: Segmentation fault: 11
clang-4.0: error: linker command failed due to signal (use -v to see invocation)Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: /Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang
Build flags: -march=core2;-mtune=haswell;-mssse3;-ftree-vectorize;-fPIC;-fPIE;-fstack-protector-strong;-O2;-pipe
Id flags:The output was:
254
clang-4.0: error: unable to execute command: Segmentation fault: 11
clang-4.0: error: linker command failed due to signal (use -v to see invocation)Detecting CXX compiler ABI info failed to compile with the following output:
Change Dir: /Users/apple/desktop/opencv/opencv/build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/make cmTC_9fc3d/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_9fc3d.dir/build.make CMakeFiles/cmTC_9fc3d.dir/build
Building CXX object CMakeFiles/cmTC_9fc3d.dir/CMakeCXXCompilerABI.cpp.o
/Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -fPIE -v -Wl,-v -o CMakeFiles/cmTC_9fc3d.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.19.6/share/cmake/Modules/CMakeCXXCompilerABI.cpp
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: /Users/apple/opt/anaconda3/bin
clang-4.0: warning: -Wl,-v: ‘linker’ input unused [-Wunused-command-line-argument]
clang-4.0: error: invalid version number in ‘-mmacosx-version-min=11.1’
make[1]: *** [CMakeFiles/cmTC_9fc3d.dir/CMakeCXXCompilerABI.cpp.o] Error 1
make: *** [cmTC_9fc3d/fast] Error 2Determining if the CXX compiler works failed with the following output:
Change Dir: /Users/apple/desktop/opencv/opencv/build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/make cmTC_5bea5/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_5bea5.dir/build.make CMakeFiles/cmTC_5bea5.dir/build
Building CXX object CMakeFiles/cmTC_5bea5.dir/testCXXCompiler.cxx.o
/Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -fPIE -o CMakeFiles/cmTC_5bea5.dir/testCXXCompiler.cxx.o -c /Users/apple/desktop/opencv/opencv/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
clang-4.0: error: invalid version number in ‘-mmacosx-version-min=11.1’
make[1]: *** [CMakeFiles/cmTC_5bea5.dir/testCXXCompiler.cxx.o] Error 1
make: *** [cmTC_5bea5/fast] Error 2
The second file is:
The system is: Darwin - 20.2.0 - x86_64
Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” succeeded.
Compiler: /Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++
Build flags: -march=core2;-mtune=haswell;-mssse3;-ftree-vectorize;-fPIC;-fPIE;-fstack-protector-strong;-O2;-pipe;-stdlib=libc++;-fvisibility-inlines-hidden;-std=c++14;-fmessage-length=0
Id flags: -cThe output was:
0Compilation of the CXX compiler identification source “CMakeCXXCompilerId.cpp” produced “CMakeCXXCompilerId.o”
The CXX compiler identification is Clang, found in “/Users/apple/desktop/opencv/opencv/build/CMakeFiles/3.19.6/CompilerIdCXX/CMakeCXXCompilerId.o”
Compiling the C compiler identification source file “CMakeCCompilerId.c” succeeded.
Compiler: /Users/apple/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang
Build flags: -march=core2;-mtune=haswell;-mssse3;-ftree-vectorize;-fPIC;-fPIE;-fstack-protector-strong;-O2;-pipe
Id flags: -cThe output was:
0Compilation of the C compiler identification source “CMakeCCompilerId.c” produced “CMakeCCompilerId.o”
The C compiler identification is Clang, found in “/Users/apple/desktop/opencv/opencv/build/CMakeFiles/3.19.6/CompilerIdC/CMakeCCompilerId.o”
Help is appreciated!