Last active
October 25, 2017 08:43
-
-
Save benjohnde/7155910ec3aa3dfec34d12461ab1d822 to your computer and use it in GitHub Desktop.
Compilation error of dynamic framework for iOS (OpenCV 3.3.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone [email protected]:opencv/opencv.git | |
cd opencv | |
git checkout 3.3.0 | |
python platforms/ios/build_framework.py ios \ | |
--dynamic \ | |
--without imgcodec --without videoio --without video --without calib3d --without features2d \ | |
--without objdetect --without dnn --without ml --without flann --without photo --without stitching \ | |
--without cudaarithm --without cudabgsegm --without cudacodec --without cudafeatures2d \ | |
--without cudafilters --without cudaimgproc --without cudalegacy --without cudaobjdetect \ | |
--without cudaoptflow --without cudastereo --without cudawarping --without cudev --without shape \ | |
--without superres --without videostab --without viz |
For having full bitcode enabled, you need to add the following to the python buildscript in line #149:
if self.dynamic:
buildcmd += [
"IPHONEOS_DEPLOYMENT_TARGET=8.0",
"ONLY_ACTIVE_ARCH=NO",
"BITCODE_GENERATION_MODE=bitcode"
]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After failure you need to download:
https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20170418/ippicv/ippicv_2017u2_mac_intel64_20170418.tgz
And put the library into:
~/opencv/ios/build/build-iphonesimulator/3rdparty/ippicv
Then re-run command!
For god's sake, cmake only downloads the i386 ippicv prebuilt library.
In addition for a correct build, you need to add the following to the Info.plist: