JoeHowse / iOSWithOpenCV

These are the projects for my book, iOS Application Development with OpenCV 3.
https://www.packtpub.com/application-development/ios-application-development-opencv
54 stars 18 forks source link

OpenCV build mac #8

Closed mihai-salari closed 7 years ago

mihai-salari commented 7 years ago

Hi, I tried this error:

➜ Other chmod +x OpenCV3/opencv/platforms/ios/build_framework.py ➜ Other sudo ./OpenCV3/opencv/platforms/ios/build_framework.py ~/Users/ronysteel/Developer/iOS/Other/OpenCV3/framework --contrib ~/Users/ronysteel/Developer/iOS/Other/OpenCV3/opencv_contrib

Note: contrib repository is bad - modules subfolder not found Executing: ['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DIOS_ARCH=armv7', '-DCMAKE_TOOLCHAIN_FILE=/Users/ronysteel/Developer/iOS/Other/OpenCV3/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DENABLE_NEON=ON', '/Users/ronysteel/Developer/iOS/Other/OpenCV3/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/ronysteel/Users/ronysteel/Developer/iOS/Other/OpenCV3/framework/build/build-armv7-iphoneos

ERROR: [Errno 2] No such file or directory

Traceback (most recent call last): File "./OpenCV3/opencv/platforms/ios/build_framework.py", line 112, in build self._build(outdir) File "./OpenCV3/opencv/platforms/ios/build_framework.py", line 104, in _build self.buildOne(t[0], t[1], mainBD, cmake_flags) File "./OpenCV3/opencv/platforms/ios/build_framework.py", line 186, in buildOne execute(cmakecmd, cwd = builddir) File "./OpenCV3/opencv/platforms/ios/build_framework.py", line 36, in execute retcode = check_call(cmd, cwd = cwd) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call retcode = call(*popenargs, *kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call return Popen(popenargs, **kwargs).wait() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

Can you help me, please?

Thank you

mihai-salari commented 7 years ago

Please, show me the correct command, please...

JoeHowse commented 7 years ago

The opencv_contrib folder normally contains a modules subfolder, which contains source code of various modules. The error message suggests that this modules subfolder is missing. Maybe you specified the path to opencv_contrib incorrectly, or maybe you mistakenly deleted modules, or maybe it didn't download correctly.

Based on your comments in issue #6, it seems you were able to build opencv_contrib successfully in the past, so please just go back and retrace your steps.