Error Compiling for iPhone Simulator (Xcode4, gcc 4.2.1, iOS 4.3 or 4.2)

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

 



Hi Matt,

Try these steps:
export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
CFLAGS="-O2 -m32 -miphoneos-version-min=3.0" LDFLAGS="-O2 -m32"
./configure-iphone

Best regards,
Ming

On Wed, Apr 6, 2011 at 12:51 AM, Matt Nunogawa <Matt.Nunogawa at ribbit.com> wrote:
> Made some progress, but pjsip still doesn't work with the simulator...
>
> Again this error is for the simulator only with the most recent build (SVN r3495)
>
> Instead of export ARCH="-arch i386"
> export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
> export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
>
> I tried all the different gcc flavors in devpath/user/bin and got the farthest:
>
> export ARCH="-arch i686"
> export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
> export CC=$DEVPATH/usr/bin/i686-apple-darwin10-llvm-gcc-4.2
>
> This got me closer. ?I now get
>
> ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures
>
>
> no libraries are generated. ?According to the doc pages, I need to use
>
> export CFLAGS += -march=armv6 -mcpu=arm1176jzf-s -mcpu=cortex-a8
> export LDFLAGS += -march=armv6 -mcpu=arm1176jzf-s -mcpu=cortex-a8
>
> But I'm sure this is not the right settings for the simulator...
>
>
>
>
> On Apr 4, 2011, at 2:51 PM, Matt Nunogawa wrote:
>
>> I'm currently not able to compile for the simulator. (SVN r
>>
>> I've a 64bit Mac running Snow Leopard.
>>
>>
>> The error I'm getting is:
>>
>> ../src/pj/activesock.c: In function ?activesock_create_iphone_os_stream?:
>> ../src/pj/activesock.c:146: error: ?kCFStreamNetworkServiceType? is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:256)
>> ../src/pj/activesock.c:147: error: ?kCFStreamNetworkServiceTypeVoIP? is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:259)
>> make[2]: *** [output/pjlib-arm-apple-darwin9/activesock.o] Error 1
>> make[1]: *** [pjlib] Error 2
>> make: *** [all] Error 1
>>
>>
>> My export statements are a little different, as ARCH is necessary to even compile, compared to the directions
>>
>> I'm doing the following:
>>
>> svn export http://svn.pjsip.org/repos/pjproject/trunk/
>>
>> CONFIG_SITE=trunk/pjlib/include/pj/config_site.h
>> echo $CONFIG_SITE
>> touch $CONFIG_SITE
>> echo "#define PJ_CONFIG_IPHONE 1" > $CONFIG_SITE
>> echo "#include <pj/config_site_sample.h>" >> $CONFIG_SITE
>>
>> export ARCH="-arch i386"
>> export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
>> export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
>>
>> cd trunk
>> echo `pwd`
>> ./configure-iphone
>> make dep && make clean && make
>>
>>
>> I've also tried export IPHONESDK=$DEVPATH/SDKs/iPhoneSimulator4.2.sdk
>>
>> Would love to hear if anyone got this working with Xcode4
>>
>> Matt
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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