LegoCV
LegoCV copied to clipboard
Issue installing using coccapods
This is the error I am getting when I install with Coccapods
`[!] /bin/bash -c set -e git submodule init git submodule update /usr/bin/python opencv/platforms/ios/build_framework.py ios --dynamic cp -a ./ios/opencv2.framework ./opencv2.framework
Submodule path 'opencv': checked out '1522722fab8016638b2039257f1665e402285768' Submodule 'opencv' (https://github.com/opencv/opencv.git) registered for path 'opencv' Cloning into '/Users/zubairamjad/Library/Caches/CocoaPods/Pods/Release/OpenCV-Dynamic/4.0.0-1d0bc/opencv'... xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ERROR: Command '['xcodebuild', '-version']' returned non-zero exit status 1
Traceback (most recent call last): File "opencv/platforms/ios/build_framework.py", line 113, in build self._build(outdir) File "opencv/platforms/ios/build_framework.py", line 81, in _build xcode_ver = getXCodeMajor() File "opencv/platforms/ios/build_framework.py", line 41, in getXCodeMajor ret = check_output(["xcodebuild", "-version"]) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command '['xcodebuild', '-version']' returned non-zero exit status 1`
Like i have no idea what is going on
Edit) Looks like this is an Xcode 10 issue. Updating CMake resolved it for me! https://github.com/opencv/opencv/issues/12646
brew upgrade cmake
I tried updating OpenCV submodule and OpenCV-Dynamic's submodules, but this error still occurred.
To add to the error log for search engines:
The following build commands failed:
CompileC /Users/jon/Library/Caches/CocoaPods/Pods/External/OpenCV-Dynamic/0bb9aeaef20d9b04170e14a14286f932/ios/build/build-iphoneos/modules/world/OpenCV.build/Release-iphoneos/opencv_world.build/Objects-normal/armv7s/opencl_kernels_video.o /Users/jon/Library/Caches/CocoaPods/Pods/External/OpenCV-Dynamic/0bb9aeaef20d9b04170e14a14286f932/ios/build/build-iphoneos/modules/world/opencl_kernels_video.cpp normal armv7s c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
============================================================
ERROR: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=8.0', 'ONLY_ACTIVE_ARCH=NO', 'BITCODE_GENERATION_MODE=bitcode', '-arch', 'armv7', '-arch', 'armv7s', '-arch', 'arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '8', '-target', 'ALL_BUILD', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
============================================================
Traceback (most recent call last):
File "opencv/platforms/ios/build_framework.py", line 117, in build
self._build(outdir)
File "opencv/platforms/ios/build_framework.py", line 109, in _build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "opencv/platforms/ios/build_framework.py", line 205, in buildOne
execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir)
File "opencv/platforms/ios/build_framework.py", line 39, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=8.0', 'ONLY_ACTIVE_ARCH=NO', 'BITCODE_GENERATION_MODE=bitcode', '-arch', 'armv7', '-arch', 'armv7s', '-arch', 'arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '8', '-target', 'ALL_BUILD', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
@jondwillis were you able to successfully use LegoCV in XCode 10? I used the LegoCV pod and I'm getting tons of semantic warnings, plus errors about non existent members and functions. For example "no matching function for call to 'rectangle' OCVImageOperation.mm
try
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer