<div dir="ltr">Thank you, Martin, for your knowledgeable explanation.  I was able to determine that the ARM Apple uses has a VFP co-processor, so I did a little more testing and eventually found out that... I was using the wrong version of GCC to build it!  Apple included two versions of GCC for cross-compiling to ARM, and I used the wrong one.<br>

<br>Unfortunately, I am still having problems.  I believe I am getting through the configuration process without any warnings (at least when I compile without GMP). There are new problems in what appears to be the lisp phase of the build.<br>
<br>My configuration instruction:<br>#!/bin/sh                                                                                                                                                                                                        <br>
./configure \<br> --prefix=/Users/red/lib/iphoneos-ecl/ \<br> --host=arm-apple-darwin \<br> --without-gmp \<br> --disable-shared \<br> CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 \<br> AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar \<br>
 CFLAGS="-arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphon\<br>eos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" \<br>
 CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp<br><br>The build appears to abort to the top-level <br><br>;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"  "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITmuv5u9.c" -o "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITmuv5u9.o"<br>
;;; Note: Invoking external command:<br>;;;   ar cr libcmp.a /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITmuv5u9.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpdefs.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmac.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpinline.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmputil.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptype.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpbind.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpblock.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcall.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcatch.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpenv.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpeval.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpexit.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpflet.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpfun.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpif.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmplam.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmplet.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmploc.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmap.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpstack.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmulti.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpspecial.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptag.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptop.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpvar.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpwt.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpffi.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcbk.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpct.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpnum.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpname.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpopt.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpclos.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpstructures.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmparray.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmain.o <br>
;;; Note: Invoking external command:<br>;;;   ranlib libcmp.a<br>;;; Compiling ext:profile;profile.lisp.<br>;;; OPTIMIZE levels: Safety=2, Space=3, Speed=1, Debug=0<br>;;; Compiling (DEFUN GET-BYTES-CONSED ...).<br>;;; Compiling (DEFVAR *PROFILED-FUN-NAME->INFO* ...).<br>
;;; Warning: Ignoring definition for class PROFILE-INFO<br>;;; No class named PROFILE-INFO.<br>;;; The variable C::C is unbound.<br>;;; Note: Creating tag: "_eclL8Sp8No8_cqMFyNy" for #P"build:ext;profile.o.NEWEST"<br>
;;; Note: Invoking external command:<br>;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"  "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITlubj6V.c" -o "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITlubj6V.o"<br>
;;; Note: Invoking external command:<br>ar: /Users/red/Projects/ecl/ecl-iphone/build/ext/profile.o: No such file or directory<br>;;; Warning: Ignoring definition for class SIMPLE-PROGRAM-ERROR<br>Not a condition type: SIMPLE-PROGRAM-ERROR<br>
;;;   ar cr libprofile.a /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITlubj6V.o /Users/red/Projects/ecl/ecl-iphone/build/ext/profile.o Broken at TOP-LEVEL. File: #P"/Users/red/Projects/ecl/ecl-iphone/src/lsp/top.lsp" (Form #26)No restarts available.<br>
Top level.<br>SI> <br><br>When I re-run make, I get slightly different output:<br><br>...<br>;;;   ar cr libcmp.a /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITrELdQO.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpdefs.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmac.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpinline.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmputil.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptype.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpbind.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpblock.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcall.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcatch.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpenv.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpeval.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpexit.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpflet.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpfun.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpif.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmplam.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmplet.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmploc.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmap.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpstack.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmulti.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpspecial.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptag.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmptop.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpvar.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpwt.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpffi.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpcbk.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpct.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpnum.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpname.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpopt.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpclos.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpstructures.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmparray.o /Users/red/Projects/ecl/ecl-iphone/build/cmp/cmpmain.o <br>
;;; Note: Invoking external command:<br>;;;   ranlib libcmp.a<br>;;; Note: Scanning #P"build:ext;profile.o.NEWEST"<br>;;; Note: Found tag: "_eclL8Sp8No8_zEgGyNy"<br>;;; Note: Invoking external command:<br>
;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"  "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITcoTKbI.c" -o "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITcoTKbI.o"<br>
;;; Note: Invoking external command:<br>;;;   ar cr libprofile.a /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITcoTKbI.o /Users/red/Projects/ecl/ecl-iphone/build/ext/profile.o <br>;;; Note: Invoking external command:<br>
;;;   ranlib libprofile.a<br>;;; Note: Scanning #P"build:ext;sockets.o.NEWEST"<br>;;; Note: Found tag: "_ecl3HaOXjm8_qKgGyNy"<br>;;; Note: Invoking external command:<br>;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"  "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITISkJE1.c" -o "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITISkJE1.o"<br>
;;; Note: Invoking external command:<br>;;;   ar cr libsockets.a /private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINITISkJE1.o /Users/red/Projects/ecl/ecl-iphone/build/ext/sockets.o <br>;;; Note: Invoking external command:<br>
;;;   ranlib libsockets.a<br>;;; Note: Invoking external command:<br>;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Ddarwin -I"/Users/red/Projects/ecl/ecl-iphone/src/c"  "-I/Users/red/Projects/ecl/ecl-iphone/build/" -w -c "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINIT4afjrO.c" -o "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINIT4afjrO.o"<br>
;;; Note: Invoking external command:<br>gcc-4.0: installation problem, cannot exec '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/i686-apple-darwin9-gcc-4.0.1': No such file or directory<br>LAMBDA: Too many arguments to function CONTINUE.<br>
;;;   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -o "/Users/red/Projects/ecl/ecl-iphone/build/bin/ecl" -L"/Users/red/Projects/ecl/ecl-iphone/build/" "/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINIT4afjrO.o" "-lsockets" "-lprofile" "-lcmp" "-L./"   libecl.a -leclgc    -lm  Broken at TOP-LEVEL. File: #P"/Users/red/Projects/ecl/ecl-iphone/src/lsp/top.lsp" (Form #26)No restarts available.<br>
Top level.<br>SI> (quit)<br><br><br>From what I can tell, one problem is that not all the GCC flags I specified in the configuration stage are preserved in this latter stage of the build.<br><br>The command issued at the end of the final output,<br>
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -o
"/Users/red/Projects/ecl/ecl-iphone/build/bin/ecl"
-L"/Users/red/Projects/ecl/ecl-iphone/build/"
"/private/var/folders/bZ/bZzxCBiyF0ec7xuYjNmSMk+++TI/-Tmp-/ECLINIT4afjrO.o"
"-lsockets" "-lprofile" "-lcmp" "-L./"   libecl.a -leclgc    -lm <br><br>does not contain the -arch arm etc. flags specified in my call to configure.  However, many other calls to gcc do have those flags.<br>
<br>The AR value I specify also does not make it all the way to the lisp stage.  Commands like " ar cr libsockets.a ..." are being called instead of /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar.  I'm not sure what difference this makes.<br>
<br>I will keep hacking away at this but your expert opinions would be helpful!  I avoid C as much as I can, so this is a different world.<br><br>Thanks,<br>Red<br><br><br><div class="gmail_quote">On Tue, Sep 9, 2008 at 1:59 AM, Red Daly <span dir="ltr"><<a href="mailto:reddaly@gmail.com" target="_blank">reddaly@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">ECLispers,<br><br>I am trying to cross-compile ECL to work on the iPhone, which uses an ARM v6 architecture, little endian.<br>


<br>I have successfully built and tested ECL, with all the default features enabled, for my Darwin i686 Intel Mac.  I can use it within the iPhone Simulator (which does not simulate the architecture).. pretty cool<br>
<br>However, the hard part is getting ECL to cross-compile correctly for an ARM processor.  I have run into bugs with fenv.h<br><br>Here is my ./configure command with tons of arguments to work correctly for the iPhone.  (I have inserted some line spaces to make it readable<br>



<br>./configure<br>
  --prefix=/Users/red/lib/iphoneos-ecl/<br>  --host=arm-apple-darwin<br>  --without-gmp<br>
  CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1<br>  CFLAGS="-arch armv6 -pipe -std=c99 -miphoneos-version-min=2.0 -gdwarf-2 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk"<br>



   CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar<br><br>When I run configure, it accurately predicts trouble with fenv.h:<br>configure: WARNING: fenv.h: present but cannot be compiled<br>



configure: WARNING: fenv.h:     check for missing prerequisite headers?<br>configure: WARNING: fenv.h: see the Autoconf documentation<br>configure: WARNING: fenv.h:     section "Present But Cannot Be Compiled"<br>



configure: WARNING: fenv.h: proceeding with the preprocessor's result<br>configure: WARNING: fenv.h: in the future, the compiler will take precedence<br><br>the offending section in fenv.h is:<br>/*  We require VFP for this set of interfaces to work  */<br>



#if !defined(__VFP_FP__) || defined(__SOFTFP__)<br>    #error  This fenv header and set of APIs is intended for the ARM (with VFP) architecture only. <br>#endif<br><br>Unfortunately I don't know what VFP_FP means.  I am guessing that I am not including some necessary headers, but I don't know what they are.<br>



<br><br>As you can see, I am compiling without support for GMP.  When I enable it, I get the following error during configure:<br><br>checking compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 -fPIC -fno-common -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -fPIC -fno-common  ... no, long long reliability test 1<br>



configure: error: could not find a working compiler, see config.log for details<br><br><br>I would appreciate any help you can give regarding these two issues.<br><br>Red<br><br>
</div>
</blockquote></div><br></div>