pjsip Compilatione error for iPhone ARM platform

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

 



On Wed, Aug 27, 2008 at 6:33 PM, c cd <urban_chokro at yahoo.com> wrote:

> Hi ,
>
> I am trying to cross-compile PJSIP for iphone OS which is based on ARM
> platform (with sound disabled).
> This is what I tried :
> (1) ./aconfigure  --host=arm-apple-darwin9 --disable-ssl --disable-sound
> --disable-ilbc-codec --disable-speex-aec --disable-speex-codec
> --disable-116-codec --disable-g722-codec
> CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> CFLAGS="-arch armv6 -pipe -O0 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -I
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/gcc/darwin/4.0"
> LDFLAGS="-L
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib"
> CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp
> AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
> RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
>
> This steps works fine . It says YES to "whether we are cross-compiling"
>
> (2) I then ran
> make dep
>
>
So far so good...


> (3) Finally I ran
> make
>
> I run into the following error :
>
> **********************************************************************************************************************************
> for dir in pjlib pjlib-util pjnath third_party pjmedia pjsip pjsip-apps; do
> \if make  -C $dir/build all; then \    true; \else \
>    exit 1; \
> fi; \
> done
> make -f /Users/jmarkandu/Documents/pjsip_iphone/pj16/build/rules.mak
> APP=PJLIB app=pjlib ../lib/libpj-arm-apple-darwin9.a
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> -Wall  -DPJ_AUTOCONF=1 -arch armv6 -pipe -O0 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/gcc/darwin/4.0
>    -I../include \
> -o output/pjlib-arm-apple-darwin9/file_access_unistd.o \
> ../src/pj/file_access_unistd.c
> Undefined symbols:
>   "_main", referenced from:
>       _main$non_lazy_ptr in crt1.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [output/pjlib-arm-apple-darwin9/file_access_unistd.o] Error 1
> make[1]: *** [pjlib] Error 2
> make: *** [all] Error 1
>
> **********************************************************************************************************************************
>
> Can someone please help me whats wrong here ? Why is not able to reference
> main from crt1.0
>
> By the way, I was able to cross-compile a simple hello world file using the
> same set of compiler and linker flags. But it doesnt seem to work with PJSIP
> code.
>
>
The step above is supposed to only compile file_access_unistd.c rather than
compile+link it, so the link error above doesn't make any sense. Looking
briefly into the command line, it looks like it's missing the "-c" option
(which tells the compiler to just compile it). I don't know why, perhaps the
options in the aconfigure somehow upsets something, but I think that's the
reason.

I don't have any clue about iPhone development of course.

Cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080827/a5efe2d1/attachment.html 


[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