Cross compiling PJSIP for iPhone ARM on Mac 10.5.5

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

 



Hi,

Thanks for your help again. pureroot, the symbolic links were correct. The
only problem was with the libtool (RANLIB) for which we need to specifiy the
output files with -o switch in rules.mak file.
Now I think I have one last problem, when I run make dep, make or make
clean, I get an error message "os-auto.mak:104: *** missing separator" right
after the *.o files for libgsmcodec have been compiled. I haven't modified
any other make files other than rules.mak. Besides the os-auto.mak file is
present in each project and this makes it very difficult to confirm which
os-auto.mak has the problem.

Here's a snip of the output in case of make.

arm-apple-darwin9-gcc -c -DSASR -DWAV49 -DNeedFunctionPrototypes=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. -I../../gsm/inc -I../../../pjlib/include \
-o output/libgsmcodec-arm-apple-darwin9/table.o \
../../gsm/src/table.c
if test ! -d ../../lib; then mkdir -p ../../lib; fi
arm-apple-darwin9-ranlib -static -o
../../lib/libgsmcodec-arm-apple-darwin9.a
 output/libgsmcodec-arm-apple-darwin9/add.o
 output/libgsmcodec-arm-apple-darwin9/code.o
 output/libgsmcodec-arm-apple-darwin9/decode.o
 output/libgsmcodec-arm-apple-darwin9/gsm_create.o
 output/libgsmcodec-arm-apple-darwin9/gsm_decode.o
 output/libgsmcodec-arm-apple-darwin9/gsm_destroy.o
 output/libgsmcodec-arm-apple-darwin9/gsm_encode.o
 output/libgsmcodec-arm-apple-darwin9/gsm_explode.o
 output/libgsmcodec-arm-apple-darwin9/gsm_implode.o
 output/libgsmcodec-arm-apple-darwin9/gsm_option.o
 output/libgsmcodec-arm-apple-darwin9/long_term.o
 output/libgsmcodec-arm-apple-darwin9/lpc.o
 output/libgsmcodec-arm-apple-darwin9/preprocess.o
 output/libgsmcodec-arm-apple-darwin9/rpe.o
 output/libgsmcodec-arm-apple-darwin9/short_term.o
 output/libgsmcodec-arm-apple-darwin9/table.o
os-auto.mak:104: *** missing separator.  Stop.
make: *** [all] Error 1

If I run make again, I get to the following

make -f /Users/salman/Documents/pjproject/build/rules.mak APP=GSM_CODEC
app=libgsmcodec ../../lib/libgsmcodec-arm-apple-darwin9.a
make[3]: `../../lib/libgsmcodec-arm-apple-darwin9.a' is up to date.
os-auto.mak:104: *** missing separator.  Stop.
make: *** [all] Error 1

Now I believe the error occurs immediately after libgsmcodec is cross
compiled. Any hints or help will be appreciated.  Thanks.

P.S. I am thinking of writing a document that will list detailed steps of
how to cross-compile pjsip for iphone, in case any one needs it please let
me know.


On Sat, Sep 20, 2008 at 12:14 PM, samuel.vinson <samuelv at laposte.net> wrote:

> Hi Salman,
>
> You could change rules.mak in build directory like that :
> $(LIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
>     if test ! -d $(LIBDIR); then $(subst @@,$(subst
> /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi
> #    $(AR) $(LIB) $(OBJS)
>     $(RANLIB) -static -o $(LIB) $(OBJS)
>
> comment AR line and add RANLIB line
>
> Samuel
>
>
>
>
> > Message du 19/09/08 08:24
> > De : "Salman"
> > A : "pjsip list"
> > Copie ? :
> > Objet : Re: [pjsip] Cross compiling PJSIP for iPhone ARM on Mac 10.5.5
> >
> >
>
> Thank you all for your replies and help. I got it working. Here's how.
>
>
> >
>
> First I had to export the compiler path with
> PATH=$PATH\:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
>
>
> >
>
> Then I had to symbolically link using 'ln -s arm-apple-darwin9-gcc-4.0.1
> arm-apple-darwin9-gcc'  ---> Thanks Samuel :)
>
>
> >
>
> Strangely, I also had to symbolically link the AR c"ar" with
> 'arm-apple-darwin9-ar'  AND  'ranlib' with 'arm-apple-darwin9-ranlib' or I
> got the 'command not found' error for these.
>
>
> >
>
> But now when I do make, I get the following ranlib error, which says 'no
> output file specified'.
>
>
> >
>
> ranlib: file: ../lib/libpj-arm-apple-darwin9.a(pool_dbg.o) has no symbols
>
> arm-apple-darwin9-ranlib ../lib/libpj-arm-apple-darwin9.a
>
> arm-apple-darwin9-ranlib: no output file specified (specify with -o output)
>
> Usage: arm-apple-darwin9-ranlib -static [-] file [...] [-filelist
> listfile[,dirname]] [-arch_only arch] [-sacLT]
>
> Usage: arm-apple-darwin9-ranlib -dynamic [-] file [...] [-filelist
> listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name]
> [-compatibility_version #] [-current_version #] [-seg1addr 0x#]
> [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table ]
> [-seg_addr_table_filename ] [-all_load] [-noall_load]
>
> make[2]: *** [../lib/libpj-arm-apple-darwin9.a] Error 1
>
> make[1]: *** [pjlib] Error 2
>
> make: *** [all] Error 1
>
>
> >
>
>
> >
>
> Doesn't ranlib automatically generate the index without specifying an
> output. Can anyone please elaborate. Thanks.
>
>
> >
>
>
> > --
> > Regards,
> > Salman
> >
>
>
> >
>
>
> >
> >
>
> On Fri, Sep 19, 2008 at 10:47 AM, pureroot <pureroot at gmail.com> wrote:
> >
>
> Pardon, my reply
> >
> > what's your CC step?
> >
> > for me
> > 1. export PATH=$PATH:
> > 2. export CC=-gcc   ex: mipsel-linux-gcc
>
> > 3. make dep;make
> >
> > if u get GCC Linked against, u'r can fix it on build.mak file
> >
>
>
> > On Thu, 2008-09-18 at 15:07 +0200, samuel.vinson wrote:
> > >
> > >
> >
>
> > Hi Salman,
> > >
> > > I think you need to create a symbolic link ;-)
> > > You should localize arm-apple-darwin9-gcc ('wich
> > > arm-apple-darwin9-gcc-4.0.1')
> > > Go in this directory, and link ('ln -s arm-apple-darwin9-gcc-4.0.1
> > > arm-apple-darwin9-gcc')
> > >
> > > Samuel
> > >
> > >         > Message du 18/09/08 12:50
> > >         > De : "Salman"
> > >         > A : "pjsip list"
> > >         > Copie ? :
> > >         > Objet : [pjsip] Cross compiling PJSIP for iPhone ARM on Mac
> > >         10.5.5
> > >         >
> > >         >
> > >
> > >         Hi,
> > >
> > >
> > >         >
> > >
> > >         I am trying to compile PJSIP on a mac with the official IPhone
> > >         2.0 SDK.I followed the instructions given
> > >         at http://code.google.com/p/siphon/wiki/Compilation
> > >
> > >
> > >         >
> > >
> > >         This is what I've done so far (after following the
> > >         instructions on the site) .
> > >
> > >
> > >         >
> > >
> > >         > autoconf aconfigure.ac > aconfigure
> > >
> > >
> > >         >
> > >
> > >         This works fine. Next I did
> > >
> > >
> > >         >
> > >
> > >         > ./aconfigure --host=arm-apple-darwin9
> > >
> 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
> --disable-speex-aec --disable-speex-codec --disable-l16-codec
> --disable-g722-codec --disable-ilbc-codec
> > >
> > >
> > >         >
> > >
> > >         This works fine. It detects that I am trying to cross compile
> > >         and finds the arm-apple-darwin9-gcc compiler. Here's a snip of
> > >         the output.
> > >
> > >
> > >         >
> > >
> > >         checking build system type... i386-apple-darwin9.5.0
> > >
> > >         checking host system type... arm-apple-darwin9
> > >
> > >         checking target system type... arm-apple-darwin9
> > >
> > >         checking for
> > >         arm-apple-darwin9-gcc...
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> > >
> > >         checking for C compiler default output file name... a.out
> > >
> > >         checking whether the C compiler works... yes
> > >
> > >         checking whether we are cross compiling... yes
> > >
> > >         checking for suffix of executables...
> > >
> > >         checking for suffix of object files... o
> > >
> > >         checking whether we are using the GNU C compiler... yes
> > >
> > >         checking
> > >         whether
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> accepts -g... yes
> > >
> > >         checking
> > >         for
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> option to accept ISO C89... none needed
> > >
> > >
> > >         >
> > >
> > >         Now when I try make dep or make, I get the error:
> > >          "arm-apple-darwin9-gcc....... Command not found". Here's a
> > >         snip of the output.
> > >
> > >
> > >         >
> > >
> > >         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/salman/Pjsip/pjproject-1.0/build/rules.mak
> > >         APP=PJLIB app=pjlib ../lib/libpj-arm-apple-darwin9.a
> > >
> > >         arm-apple-darwin9-gcc -c -Wall  -DPJ_AUTOCONF=1
> > >         -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
>  -I../include \
> > >
> > >         -o output/pjlib-arm-apple-darwin9/file_access_unistd.o \
> > >
> > >         ../src/pj/file_access_unistd.c
> > >
> > >         make[2]: arm-apple-darwin9-gcc: Command not found
> > >         >
> > >
> > >         make[2]: ***
> > >         [output/pjlib-arm-apple-darwin9/file_access_unistd.o] Error
> > >         127
> > >
> > >         make[1]: *** [pjlib] Error 2
> > >
> > >         make: *** [all] Error 1
> > >
> > >
> > >         >
> > >
> > >
> > >         >
> > >
> > >         Is there sometihing that I'm missing? Any help will be
> > >         appreciated.
> > >
> > >         Thanks.
> > >
> > >
> > >         >
> > >
> > >         --
> > >         > Regards,
> > >         > Salman
> > >         >
> > >
> > >         >
> > >         > [ (pas de nom de fichier) (0.2 Ko) ]
> > >
> > >
> > > Cr?ez votre adresse ?lectronique prenom.nom at laposte.net
> > > 1 Go d'espace de stockage, anti-spam et anti-virus int?gr?s.
> >
>
> > _______________________________________________
> > > 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
> >
>
>
> >
>
> >
>
> >
> > [ (pas de nom de fichier) (0.2 Ko) ]
>
>
>
> *Cr?ez votre adresse <http://www.laposte.net> ?lectronique
> prenom.nom at laposte.net
> 1 Go d'espace de stockage, anti-spam et anti-virus int?gr?s.*
>
> _______________________________________________
> 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
>
>


-- 
Regards,
Salman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080922/01bdcb33/attachment-0001.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