<div dir="ltr"><div><div>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.<br></div><br>I setup my standalone environment like so:<br>
export SYSROOT=/home/jeremybell/Desktop/android-ndk-r8e/platforms/android-14/arch-arm<br>/home/jeremybell/Desktop/android-ndk-r8e/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=./android-14-toolchain<br>
<br> Next, I configure mono. I'm using something similar to the example shown here:<br><a href="http://permalink.gmane.org/gmane.comp.gnome.mono.patches/181374">http://permalink.gmane.org/gmane.comp.gnome.mono.patches/181374</a><br>
<br>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<br>
<br></div><div>Here's my environment and my autogen.sh command:<br>export NDK=/home/jeremybell/Desktop/android-ndk-r8e<br>export SYSROOT=$NDK/platforms/android-14/arch-arm<br>export NDK_STANDALONE=/home/jeremybell/Desktop/monodevsrc/ndk_standalone<br>
export PATH=$NDK_STANDALONE/bin:$PATH<br>export CC=arm-linux-androideabi-gcc<br>export CXX=arm-linux-androideabi-g++<br>export AR=arm-linux-androideabi-ar<br>export AS=arm-linux-androideabi-as<br>export CPP=arm-linux-androideabi-cpp<br>
export LD=arm-linux-androideabi-ld<br>export RANLIB=arm-linux-androideabi-ranlib<br>export STRIP=arm-linux-androideabi-strip<br>./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"<br>
<br></div><div>Configure appears to run fine, but make fails while building mono_sgen-main.o:<br><br>  CC     libmini_static_la-tramp-arm.lo<br>  CC     libmini_static_la-mini-posix.lo<br>  CXXLD  <a href="http://libmini-static.la">libmini-static.la</a><br>
  CC     mono_sgen-main.o<br>main.c:7:22: fatal error: buildver.h: No such file or directory<br>compilation terminated.<br>make[4]: *** [mono_sgen-main.o] Error 1<br>make[4]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono/mono/mini'<br>
make[3]: *** [all] Error 2<br>make[3]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono/mono/mini'<br>make[2]: *** [all-recursive] Error 1<br>make[2]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono/mono'<br>
make[1]: *** [all-recursive] Error 1<br>make[1]: Leaving directory `/home/jeremybell/Desktop/monodevsrc/mono'<br>make: *** [all] Error 2<br><br><br></div><div>The offending line:<br>#include <config.h><br>#include "mini.h"<br>
#ifndef HOST_WIN32<br>#ifdef HAVE_SGEN_GC<br>#include "buildver-sgen.h"<br>#else<br>#include "buildver.h"<br>#endif<br>#endif<br><br></div><div>So, it looks like HAVE_SGEN_GC is not defined, but should be? Have I missed a step somewhere?<br>
<br></div><div>Thanks!<br>Jeremy<br></div></div>