|
From: | BIENKOWSKI Guillaume |
Subject: | Re: [Linphone-developers] Building linphone-iphone w/ XCode4.2 / SL 10.6.8 |
Date: | Thu, 19 Dec 2013 16:27:03 +0100 |
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):- Edit submodules/build/builder-iphone-os.mk and remove zrtpcpp (2) and ffmpeg (3):
CC="xcrun gcc -std=c99 $COMMON_FLAGS"
OBJC="xcrun gcc -std=c99 $COMMON_FLAGS"
CXX="xcrun g++ $COMMON_FLAGS"
SUBMODULES_LIST := polarssl libantlr belle-sip srtp speex libgsm libvpx libxml2 opus
#SUBMODULES_LIST := polarssl libantlr belle-sip srtp zrtpcpp speex libgsm libvpx libxml2 ffmpeg 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:(2) Even if enable_zrtp=no is specified, it still tries to compile it, giving the following errors:
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
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/bits/basic_ios.h:242:26: error:(3) Even if enable_ffmpeg=no is specified, it still tries to compile it, giving the following errors:
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
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:
And a veryclean / make ?in submodules/build/iphone-config.site to :Hello,Could you try changing the
I suspect the clang executable is a bit too old on these versions.
CC="xcrun clang -std=c99 $COMMON_FLAGS"
OBJC="xcrun clang -std=c99 $COMMON_FLAGS"
CXX="xcrun clang++ $COMMON_FLAGS"
CC="xcrun gcc -std=c99 $COMMON_FLAGS"
OBJC="xcrun gcc -std=c99 $COMMON_FLAGS"
CXX="xcrun g++ $COMMON_FLAGS"
On Tue, Dec 17, 2013 at 11:01 PM, saumar <address@hidden> wrote:
Hi,
After cloning linphone-iphone.git, I followed the build procedure in README, but I'm unable to build Linphone for iOS.
The first problem is:
[ 11%] Building CXX object src/CMakeFiles/zrtpcppcore.dir/Zrtp.cpp.obj
cd /Users/saumar/Documents/linphone-iphone/submodules/build-i386-apple-darwin/externals/zrtpcpp/src && /Developer/usr/bin/clang -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 -I/Users/saumar/Documents/linphone-iphone/submodules/externals/zrtpcpp/src -I/Users/saumar/Documents/linphone-iphone/submodules/build-i386-apple-darwin/externals/zrtpcpp -I/opt/local/include -g -O2 -fno-strict-aliasing -o CMakeFiles/zrtpcppcore.dir/Zrtp.cpp.obj -c /Users/saumar/Documents/linphone-iphone/submodules/externals/zrtpcpp/src/Zrtp.cpp
In file included from /Users/saumar/Documents/linphone-iphone/submodules/externals/zrtpcpp/src/Zrtp.cpp:21:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/sstream:43:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/istream:43:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/ios:49:
/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
make[3]: *** [src/CMakeFiles/zrtpcppcore.dir/all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [build-zrtpcpp] Error 2
make: *** [build] Error 2
(all arrows ^ above points to __except)
Calling make with arguments doesn't solve the problem (enable_gpl_third_parties=no or enable_zrtp=no).
Reading this support group I was able to pass this point by editing builder-iphone-os.mk directly and removing zrtpcpp:
#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 ffmpeg opus
After this change, make veryclean && make all stops on speex:
/bin/sh ../libtool --tag=CC --mode=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 libspeex.la libspeexdsp.la -lm
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
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [build-speex] Error 2
make: *** [build] Error 2
Any help is appreciated.
Cheers
sh
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________ Linphone-developers mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] | Current Thread | [Next in Thread] |