building for the iPhone

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

 



You should be able to compile with your last attempt, by modifying the  
(if I remember correctly) aconfigure.in file following the changes  
made to the ranlib command being run. You can find the changes needed  
on the Siphon googlecode wiki.

Sorry for being brief, but I'm on holiday without access to my mac...

Sent from my iPhone

Best regards
Even Andre Fiskvik

On 21. des. 2009, at 00.04, tcurdt at vafer.org wrote:

> Hey folks,
>
> while I managed to compile latest trunk for the iPhone at least once,
> I am back having trouble reproducing it.
>
> Unfortunately I am not exactly a pro with GNU build chain ...but maybe
> just let's get started. I started out with the following build script:
>
>    #!/bin/sh
>
>    set -e
>
>    export SDKVERSION=3.1.2
>    export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
>    export SDKROOT=$DEVROOT/SDKs/iPhoneOS${SDKVERSION}.sdk
>
>    export RANLIB=$DEVROOT/usr/bin/ranlib
>    export AR=$DEVROOT/usr/bin/ar
>    export CC=$DEVROOT/usr/bin/gcc
>    export CPP=$DEVROOT/usr/bin/cpp
>
>    export LDFLAGS="-arch armv6 -O2 -isysroot $SDKROOT -L$SDKROOT/usr/ 
> lib"
>    export CFLAGS="-arch armv6 -O2 -isysroot $SDKROOT -I$SDKROOT/usr/ 
> include"
>
>    export PATH=${DEVROOT}/usr/bin:${PATH}
>
>    ./configure --host=arm-apple-darwin9 --prefix=$SDKROOT \
>     --disable-ssl \
>     --disable-speex-aec \
>     --disable-speex-codec \
>     --disable-l16-codec \
>     --disable-g722-codec \
>     --disable-ilbc-codec \
>     --enable-gsm-codec \
>     --disable-sound
>
>    make dep
>    make
>
> Running this shows that it is looking for a gcc that is missing:
> "/bin/sh: arm-apple-darwin9-gcc: command not found". Looking at the
> SDK bin directory one can find:
>
>    ar
>    arm-apple-darwin9-g++-4.0.1
>    arm-apple-darwin9-g++-4.2.1
>    arm-apple-darwin9-gcc-4.0.1
>    arm-apple-darwin9-gcc-4.2.1
>    as
>    c++ -> c++-4.2
>    c++-4.0
>    c++-4.2
>    c89
>    c99
>    cc -> gcc-4.2
>    cmpdylib
>    codesign_allocate
>    cpp
>    cpp-4.0
>    cpp-4.2
>    csent
>    dyldinfo
>    g++ -> g++-4.2
>    g++-4.0
>    g++-4.2
>    gcc -> gcc-4.2
>    gcc-4.0
>    gcc-4.2
>    gcov -> gcov-4.2
>    gcov-4.0
>    gcov-4.2
>    gdb
>    gprof
>    i686-apple-darwin9-g++-4.2.1
>    i686-apple-darwin9-gcc-4.2.1
>    install_name_tool
>    iphoneos-optimize
>    ld
>    ld_classic
>    libtool
>    lipo
>    nm
>    nmedit
>    otool
>    pagestuff
>    pngcrush
>    powerpc-apple-darwin9-g++-4.2.1
>    powerpc-apple-darwin9-gcc-4.2.1
>    ranlib -> libtool
>    rebase
>    redo_prebinding
>    segedit
>    size
>    strings
>    strip
>    texturetool
>    unwinddump
>
> So I've create a symlink in
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
>
> ln -s arm-apple-darwin9-gcc-4.2.1 arm-apple-darwin9-gcc
>
> ....which makes it run through until one hits:
>
>    arm-apple-darwin9-gcc -c -Wall  -DPJ_AUTOCONF=1 -arch armv6 -O2
> -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 
> iPhoneOS3.1.2.sdk
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 
> iPhoneOS3.1.2.sdk/usr/include
>  -arch armv6 -O2 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 
> iPhoneOS3.1.2.sdk
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 
> iPhoneOS3.1.2.sdk/usr/include
> -I../include \
>            -o output/pjlib-arm-apple-darwin9/ioqueue_select.o \
>            ../src/pj/ioqueue_select.c
>    cc1: error: unrecognized command line option "-arch"
>
> Which is a little odd because that binary seems/should support the
> "-arch" option.
>
>    $ ./i686-apple-darwin9-gcc-4.2.1 -arch
>    i686-apple-darwin9-gcc-4.2.1: argument to '-arch' is missing
>    $ ./i686-apple-darwin9-gcc-4.2.1 -arch i386
>    i686-apple-darwin9-gcc-4.2.1: no input files
>
> Odd. Trying gcc 4.0.1 instead:
>
>    ln -sf arm-apple-darwin9-gcc-4.0.1 arm-apple-darwin9-gcc
>
> Which gets much further
>
>    make[2]: arm-apple-darwin9-ar: No such file or directory
>
> Hm ... why isn't it using the AR specified? Creating another link:
>
>    ln -s ar arm-apple-darwin9-ar
>
> Which then gets stuck at
>
>    make[2]: arm-apple-darwin9-ranlib: No such file or directory
>
> Another link:
>
>    ln -s ranlib arm-apple-darwin9-ranlib
>
> which now it ends with
>
>    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib:
> file: ../lib/libpj-arm-apple-darwin9.a(pool_dbg.o) has no symbols
>    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib:
> file: ../lib/libpj-arm-apple-darwin9.a(ssl_sock_ossl.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 <filename>] [-seg_addr_table_filename
> <file_system_path>] [-all_load] [-noall_load]
>
>
> No output files? Why? Seems also it's missing the "-static" option.
>
> Now I am little stuck because I got this working once with GCC 4.0.
> Not sure what I was doing differently.
>
> In general it would be great to get this building a bit more out-of- 
> the-box.
>
> Any pointers appreciated.
>
> cheers
> --
> Torsten
>
> _______________________________________________
> 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