Open loretoparisi opened 8 years ago
@loretoparisi Added support for BitCode, will push to the repo. Thanks for the heads up.
Great, thank you :+1: To double check you can then run
$otool -l Mylib.framework/Versions/Current/Mylib | grep __LLVM
and if you see LLVM segments like
segname __LLVM
segname __LLVM
segname __LLVM
then we have the bitcode done!
Hi Guys,
I get following error while compile.
clang: error: unknown argument: '-fembed-bitcode'
If I remove -fembed-bitcode option from EXTRA_FLAGS in generate_ios_framework it compiles fine.
Here is the full log
./generate_ios_framework
generating torch
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun -- broken
CMake Error at /usr/local/Cellar/cmake/3.1.3/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/ElementInc/repositories/torch-ios/build/CMakeFiles/CMakeTmp
Run Build Command:"/Applications/Xcode.app/Contents/Developer/usr/bin/make"
"cmTryCompileExec3243808459/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTryCompileExec3243808459.dir/build.make
CMakeFiles/cmTryCompileExec3243808459.dir/build
/usr/local/Cellar/cmake/3.1.3/bin/cmake -E cmake_progress_report
/Users/ElementInc/repositories/torch-ios/build/CMakeFiles/CMakeTmp/CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec3243808459.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun --sdk iphoneos
clang -arch armv7 -miphoneos-version-min=6.0 -fembed-bitcode -D__NEON__
-mfpu=neon -o CMakeFiles/cmTryCompileExec3243808459.dir/testCCompiler.c.o
-c
/Users/ElementInc/repositories/torch-ios/build/CMakeFiles/CMakeTmp/testCCompiler.c
clang: error: unknown argument: '-fembed-bitcode'
make[1]: *** [CMakeFiles/cmTryCompileExec3243808459.dir/testCCompiler.c.o]
Error 1
make: *** [cmTryCompileExec3243808459/fast] Error 2
@sagarwaghmare69 if you run
$ cd /Applications/Xcode/Xcode.app/Contents/Developer/usr/bin/
$ ./xcodebuild -version
which version you get?
Getting this
XCode
error when compiling the example ios appThe
Torch.framework
should be compiled using the C compiler flag-fembed-bitcode
in order to enable bitcode.