[racket-dev] Cross compiling racket for Android

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Sep 18 15:17:19 EDT 2013

The simplest workaround is to provide `--enable-sgc` to `configure`.

The problem is that it's a little tricky to work with the Boehm GC in
cross-compile mode, at least with the way that we have the makefiles
set up. Assuming you don't need `racketcgc` at the end, it's easiest to
avoid the Boehm-GC step in a cross compile.

At Wed, 18 Sep 2013 20:20:11 +0200, Szabolcs Berecz wrote:
> Hi,
> 
> I'm trying to compile the latest Racket for Android using the instructions
> in racket/src/README but I'm hitting the following error:
> 
> ./if_mach SPARC SOLARIS arm-linux-androideabi-gcc  -c -o mach_dep2.o
> ../../../racket/gc/sparc_mach_dep.S
> ./if_mach: 1: ./if_mach: Syntax error: word unexpected (expecting ")")
> 
> Which is caused by compiling if_mach using the cross compiler. I'm pretty
> sure the problem is on my end, but I have no idea where to look.
> 
> This is the full output: https://gist.github.com/khernyo/6613001
> This is a script I used for building:
> https://gist.github.com/khernyo/6612979
> 
> The script first builds Racket for x86 which is then used to build the
> Android version. It's probably not necessary, but I wanted to eliminate the
> potential problems caused by using Racket v.5.3.4 which I have installed on
> my system.
> 
> I also tried using this version:
> https://github.com/plt/racket/commit/4e6e18119c0b85ac09b11fbb0c8941a7c520da08bu
> t
> I get the same error. This version is supposed to work because this is
> the commit which adds the instructions for compiling for Android.
> 
> Can you help me fix this problem?
> 
> Thanks,
> Szabolcs
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Posted on the dev mailing list.