Compiling pjsip current trunk under iOS 5.0 GM Fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Did you see try my compile tip 5 days ago on the mailinglist?

"
If anyone is having issues compiling pjsip with the new XCode 4.2 + iOS 5 GM,
I had to change the host in configure-iphone script on the following line:

./aconfigure --host=arm-apple-darwin9 --disable-floating-point $*

to 

./aconfigure --host=arm-apple-darwin10 --disable-floating-point $*


Then run:
export CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
./configure-iphone


in order to make the pjsip library compile.
"

Best regards,
Even Andr?

On 10. okt. 2011, at 05:54, Dan Nolan wrote:

> Hey guys, 
> 
> With the iOS5 GM, Apple has pulled their previous gcc cross-compilers and now provides an LLVM frontend to GCC for cross compiling to the arm platform. There are apparently some expectation incompatibilities between the LLVM frontend and the GCC frontend. This means that if you manually specify the compilers, aconfigure believes that you simply cannot compile on the platform.
> 
> I've been fiddling around with the compile script for a while now. On a plain jane demo trunk pull with the changes to config-site.h made to configure for iPhone you get the following error:
> 
> configure-iphone: DEVPATH is not specified, using /Developer/Platforms/iPhoneOS.platform/Developer
> configure-iphone: IPHONESDK is not specified, choosing iPhoneOS5.0.sdk
> configure-iphone error: unable to find gcc for iPhoneOS5.0.sdk. If you think you have the right gcc, set the full path in CC environment variable.
> 
> 
> If I supply the CC and CXX variables as the actual links to the new LLVM frontends.
> 
> CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
> CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2
> 
> And run a recompile, I have the following error because of how LLVM under OS X functions.
> 
> configure-iphone: DEVPATH is not specified, using /Developer/Platforms/iPhoneOS.platform/Developer
> configure-iphone: IPHONESDK is not specified, choosing iPhoneOS5.0.sdk
> configure-iphone: calling ./aconfigure with env vars:
> CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
> CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2
> SDKPATH = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
> CFLAGS = -O2 -Wno-unused-label -DPJ_SDK_NAME="\"iPhoneOS5.0.sdk\"" -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
> LDFLAGS = -O2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -framework AudioToolbox -framework Foundation
> AR = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static -o
> RANLIB = echo ranlib
> aconfigure: WARNING: If you wanted to set the --build type, don't use --host.
> If a cross compiler is detected then cross compile mode will be used.
> checking build system type... i386-apple-darwin11.2.0
> checking host system type... arm-apple-darwin10
> checking target system type... arm-apple-darwin10
> checking for arm-apple-darwin10-gcc... no
> checking for gcc... gcc
> checking whether the C compiler works... no
> aconfigure: error: in `/Users/dan/Documents/Development/ios/Internal/vtalk4/pjsip_latest':
> aconfigure: error: C compiler cannot create executables
> 
> 
> Would anyone be able to recommend any basic aconfigure changes I could make to change this test? I'll outline the important feedback from config.log here:
> 
> aconfigure:2259: checking build system type
> aconfigure:2273: result: i386-apple-darwin11.2.0
> aconfigure:2293: checking host system type
> aconfigure:2306: result: arm-apple-darwin10
> aconfigure:2326: checking target system type
> aconfigure:2339: result: arm-apple-darwin10
> aconfigure:2387: checking for arm-apple-darwin10-gcc
> aconfigure:2417: result: no
> aconfigure:2427: checking for gcc
> aconfigure:2443: found /usr/bin/gcc
> aconfigure:2454: result: gcc
> aconfigure:2683: checking for C compiler version
> aconfigure:2692: gcc --version >&5
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> aconfigure:2703: $? = 0
> aconfigure:2692: gcc -v >&5
> Using built-in specs.
> Target: i686-apple-darwin11
> Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
> Thread model: posix
> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
> aconfigure:2703: $? = 0
> aconfigure:2692: gcc -V >&5
> llvm-gcc-4.2: argument to `-V' is missing
> aconfigure:2703: $? = 1
> aconfigure:2692: gcc -qversion >&5
> i686-apple-darwin11-llvm-gcc-4.2: no input files
> aconfigure:2703: $? = 1
> aconfigure:2723: checking whether the C compiler works
> aconfigure:2745: gcc -O2 -Wno-unused-label -DPJ_SDK_NAME="\"iPhoneOS5.0.sdk\"" -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -O2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -framework AudioToolbox -framework Foundation conftest.c >&5
> ld: library not found for -lcrt1.10.6.o
> collect2: ld returned 1 exit status
> aconfigure:2749: $? = 1
> aconfigure:2787: result: no
> aconfigure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "pjproject"
> | #define PACKAGE_TARNAME "pjproject"
> | #define PACKAGE_VERSION "1.x"
> | #define PACKAGE_STRING "pjproject 1.x"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h. */
> | 
> | int
> | main ()
> | {
> | 
> | ;
> | return 0;
> | }
> aconfigure:2792: error: in `/Users/dan/Documents/Development/ios/Internal/vtalk4/pjsip_latest':
> aconfigure:2796: error: C compiler cannot create executables
> 
> 
> 
> You can see two main points, firstly on aconfigure:2692 - it says Target: i686-darwin11 (the new simulator), which is what gcc returns by default. 
> 
> This makes me think it's calling args on gcc that simply do not work anymore and a separate flag on aconfigure may need to be called to handle iOS 5 and the iOS platform moving forward. I feel this may also apply to OS X from 10.7.2 onwards.
> 
> Feedback and recommendations on what needs to be patched would be appreciated. I'll put in any research or input needed to get it building on 10.7 for iOS 5 if I could get pointed in the right direction.
> 
> Regards,
> 
> Dan Nolan
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 






[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux