[racket-dev] Cross compiling racket for Android

From: Szabolcs Berecz (szabolcs.berecz at gmail.com)
Date: Wed Sep 18 18:26:50 EDT 2013

That helped a lot, thanks!

I also had a bug in my script which resulted in running "configure" with an
empty "--enable-racket=" which in turn caused racketcgc to be built and
that failed as expected.

I updated the gist in case somebody wants to use the script.

BTW, I wanted to use cgc because I read that sgc is mainly for debugging
and 3m is harder to use when embedding racket and that's what I'm planning
to do. So, is sgc the way to go, or is it worth the effort to use 3m?



On Wed, Sep 18, 2013 at 9:17 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130919/404ce56b/attachment-0001.html>

Posted on the dev mailing list.