[Mono-dev] Building mono with android ndk standalone toolchain (android ndk r8e)

Jeremy Bell bell.jeremy at gmail.com
Wed May 8 20:29:06 UTC 2013


I'm attempting to build mono using the ndk standalone toolchain from the
android ndk (version r8e), but I am unable to complete the build.

I setup my standalone environment like so:
export
SYSROOT=/home/jeremybell/Desktop/android-ndk-r8e/platforms/android-14/arch-arm
/home/jeremybell/Desktop/android-ndk-r8e/build/tools/make-standalone-toolchain.sh
--platform=android-14 --install-dir=./android-14-toolchain

Next, I configure mono. I'm using something similar to the example shown
here:
http://permalink.gmane.org/gmane.comp.gnome.mono.patches/181374

Except for a few differences. First, I export each of the variables (AR,
AS, CC, etc..) including SYSROOT (the configure script no longer takes a
--sysroot=/path/to/sysroot option) prior to running configure. Second, I
added --with-sgen=yes --disable-boehm

Here's my environment and my autogen.sh command:
export NDK=/home/jeremybell/Desktop/android-ndk-r8e
export SYSROOT=$NDK/platforms/android-14/arch-arm
export NDK_STANDALONE=/home/jeremybell/Desktop/monodevsrc/ndk_standalone
export PATH=$NDK_STANDALONE/bin:$PATH
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export AR=arm-linux-androideabi-ar
export AS=arm-linux-androideabi-as
export CPP=arm-linux-androideabi-cpp
export LD=arm-linux-androideabi-ld
export RANLIB=arm-linux-androideabi-ranlib
export STRIP=arm-linux-androideabi-strip
./autogen.sh --build=`./config.guess` --host=armv5-linux-androideabi
--target=armv5-linux-androideabi --enable-nls=no --with-mcs-docs=no
--enable-mcs-build=no --with-glib=embedded --with-monodroid=yes
CFLAGS="-DARM_FPU_NONE=1" CXXFLAGS="-DARM_FPU_NONE=1"

Configure appears to run fine, but make fails while building
mono_sgen-main.o:

  CC     libmini_static_la-tramp-arm.lo
  CC     libmini_static_la-mini-posix.lo
  CXXLD  libmini-static.la
  CC     mono_sgen-main.o
main.c:7:22: fatal error: buildver.h: No such file or directory
compilation terminated.
make[4]: *** [mono_sgen-main.o] Error 1
make[4]: Leaving directory
`/home/jeremybell/Desktop/monodevsrc/mono/mono/mini'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/jeremybell/Desktop/monodevsrc/mono/mono/mini'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono'
make: *** [all] Error 2


The offending line:
#include <config.h>
#include "mini.h"
#ifndef HOST_WIN32
#ifdef HAVE_SGEN_GC
#include "buildver-sgen.h"
#else
#include "buildver.h"
#endif
#endif

So, it looks like HAVE_SGEN_GC is not defined, but should be? Have I missed
a step somewhere?

Thanks!
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130508/ecd70d9b/attachment.html>


More information about the Mono-devel-list mailing list