|
From: | Saumar Hajjar |
Subject: | Re: [Linphone-developers] Building linphone-iphone w/ XCode4.2 / SL 10.6.8 |
Date: | Thu, 19 Dec 2013 12:18:01 -0200 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Guillaume, thanks for your prompt reply. Switching from clang to gcc helped me to build using XCode 4.2 on SL 10.6.8. I also had to disable zrtp and ffmpeg - Later I'll investigate this issue - as for now VP8 is fine for me. Follows what I had to do in order to build using a fresh SL 10.6.8 install + XCode 4.2: - Get the source git clone git://git.linphone.org/linphone-iphone.git --recursive - Prepare the environment as explained in README - Edit submodules/build/iphone-config.site (1): CC="xcrun gcc -std=c99 $COMMON_FLAGS" OBJC="xcrun gcc -std=c99 $COMMON_FLAGS" CXX="xcrun g++ $COMMON_FLAGS" - Edit submodules/build/builder-iphone-os.mk and remove zrtpcpp (2) and ffmpeg (3): #SUBMODULES_LIST := polarssl libantlr belle-sip srtp zrtpcpp speex libgsm libvpx libxml2 ffmpeg opus SUBMODULES_LIST := polarssl libantlr belle-sip srtp speex libgsm libvpx libxml2 opus - Build for simulator: make -f builder-iphone-simulator.mk enable_gpl_third_parties=no enable_zrtp=no enable_ffmpeg=no all - Create symlinks to arm-apple-darwin10-llvm-g??-4.2 compiler (4): sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 /Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-g++-4.2 /Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-g++-4.2 - Edit submodules/externals/libvpx/build/configure.sh (5): Note that before changing it, configure.sh needs to get patched by simulator build. For every make veryclean, these changes need to be applied again. #CXX=`xcrun --find clang++` CXX="xcrun g++" #CC=`xcrun --find clang` CC="xcrun gcc" #LD=`xcrun --find clang` LD="xcrun gcc" - Finish building: make -f builder-iphone-os.mk enable_gpl_third_parties=no enable_zrtp=no enable_ffmpeg=no all \ && make -f builder-iphone-os.mk delivery-sdk NOTES: (1) First clue that clang was "old" in SL10.6.8/XCode 4.2: libtool: link: xcrun clang -std=c99 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -miphoneos-version-min=4.0 -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions -O2 -fvisibility=hidden -o testenc testenc.o ./.libs/libspeex.a ./.libs/libspeexdsp.a -lm clang: warning: argument unused during compilation: '-std=c99' Undefined symbols for architecture i386: "_x", referenced from: _main in testenc.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[4]: *** [testenc] Error 1 (2) Even if enable_zrtp=no is specified, it still tries to compile it, giving the following errors: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/bits/basic_ios.h:242:26: error: expected ')' exceptions(iostate __except) ^ /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/bits/basic_ios.h:242:17: note: to match this '(' exceptions(iostate __except) ^ /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/bits/basic_ios.h:244:24: error: expected _expression_ _M_exception = __except; ^ 2 errors generated. make[4]: *** [src/CMakeFiles/zrtpcppcore.dir/Zrtp.cpp.obj] Error 1 (3) Even if enable_ffmpeg=no is specified, it still tries to compile it, giving the following errors: CC libavcodec/h264_cabac.o cc1: error in backend: Ran out of registers during register allocation! make[2]: *** [libavcodec/h264_cabac.o] Error 1 make[1]: *** [build-ffmpeg] Error 2 (4) Missing command trying to compile polarssl llvm-gcc-4.2: error trying to exec '/Developer/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory make[2]: *** [aes.o] Error 255 make[1]: *** [lib] Error 2 make: *** [build-polarssl] Error 2 (5) libvpx's configure.sh fails with clang: Configuring for target 'armv7-darwin-gcc' enabling armv7 enabling neon enabling media enabling edsp enabling fast_unaligned Toolchain is unable to link executables Em 18/12/2013 06:29, BIENKOWSKI
Guillaume escreveu:
|
[Prev in Thread] | Current Thread | [Next in Thread] |