title: Cross Compile perl for ARM
body: <p>I'm attempting to cross compile the perl interpreter for an ARM architecture (<a href="http://www.friendlyarm.net/products/mini2440?lang=en" rel="noreferrer">FriendlyARM Micro2440</a>).  I'm using the <a href="http://www.friendlyarm.net/downloads" rel="noreferrer">ARM-Linux GCC 4.4.3</a> cross-compiler provided by the manufacturer.  The board is running Linux 2.6.</p>
  
  <p>I was able to cross-compile a basic "Hello World" application successfully, and it ran on the target machine.</p>
  
  <p>I've downloaded the perl v5.12.3 source.  I was able to do a normal compilation of perl for Ubuntu.  I'm now attempting to do a cross-compilation for the ARM board.  I'm working out of the perl-5.12.3/Cross folder in the source download.</p>
  
  <p><code>make patch</code> succeeded, but when I run <code>make perl</code> it fails with this</p>
  
  <pre><code>LD_LIBRARY_PATH=/home/reed022/.local/share/Trash/files/perl-5.2.12.3 arm-linux-gcc  -o miniperl \
          gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   \
          miniperlmain.o opmini.o perlmini.o -lnsl -ldl -lm -lcrypt -lutil -lc 
  LD_LIBRARY_PATH=/home/reed022/.local/share/Trash/files/perl-5.2.12.3  ./miniperl -w -Ilib -MExporter -e '&lt;?&gt;' || make minitest
  ./miniperl: 1: Syntax error: word unexpected (expecting ")")
  </code></pre>
  
  <p>I think the relevant part of the output is the <code>./miniperl -w -Ilib -MExporter -e '&lt;?&gt;' || make minitest</code> part.  Though I'm not sure.  It seems confusing to me that the cross-compilation environment would try to run tests, since it's targeting a different system than the one it's being built on.</p>
  
  <p>I'm completely lost as where to go from here.  The people I've talked to haven't had much experience with cross-compiling programs.</p>
  
  <p>UPDATE<br>
  I decided to delete the perl source folder and re-extract it, thinking that the previous compilation of perl for the Ubuntu host machine might have been messing with the current cross-compilation.  I'm now getting a different but similar error.</p>
  
  <pre><code>`sh  cflags "optimize='-O2'" generate_uudmap.o` -fexpensive-optimizations -fomit-frame-pointer -O2 -march=armv4 -mtune=strongarm1100 generate_uudmap.c
        CCCMD =  arm-linux-gcc -DPERL_CORE -c  -fexpensive-optimizations -fomit-frame-pointer -O2 -march=armv4 -mtune=strongarm1100  -O2 -Wall 
  arm-linux-gcc -o generate_uudmap  generate_uudmap.o -lnsl -ldl -lm -lcrypt -lutil -lc 
  ./generate_uudmap uudmap.h bitcount.h
  ./generate_uudmap: 1: Syntax error: word unexpected (expecting ")")
  make[1]: *** [bitcount.h] Error 2
  make[1]: Leaving directory `/home/reed022/Downloads/perl-5.12.3'
  make[1]: Entering directory `/home/reed022/Downloads/perl-5.12.3'
  make[1]: *** No rule to make target `more'.  Stop.
  make[1]: Leaving directory `/home/reed022/Downloads/perl-5.12.3'
  make: *** [perl] Error 2
  </code></pre>