[Mono-dev] Building mono with android ndk standalone toolchain (android ndk r8e)
Jeremy Bell
bell.jeremy at gmail.com
Fri May 10 16:39:28 UTC 2013
Thanks Jonathan.
I was aware that Boehm was broken, and so I added --with-sgen=yes and
--disable-boehm as noted (though it looks like the configure line in my
email was missing the options - sorry for the confusion).
I've also tried adding --with-gc=none instead of --disable-boehm, and in
addition to --disable-boehm, and a few combinations of the three options.
I've even thrown in --with-moon-gc=sgen:
note the following differences between these attempts and my earlier email:
- replaced --host and --target with armv7-a-linux-androideabi. Previously I
was using armv5-linux-androideabi
- Changed CFLAGS and CXXFLAGS to "-DARM_FPU_VFP". Previously I was using
"-DARM_FPU_NONE=1"
- hard coded "i686-pc-linux-gnu" for --build. Previously I was using
--build=`config.guess` which gave a "command config.guess not found" error.
I ran ./config.guess manually and inserted the value into the options.
-- Original, successful build config for mono branch mono-2-10-8:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
This builds successfully. Next, I tried with mono branch master:
-- first attempt with branch master, with options --with-sgen=yes
--disable-boehm --with-gc=none
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install
--with-sgen=yes --disable-boehm --with-gc=none
config report:
mcs source: mcs
Engine:
GC: sgen and included Boehm
TLS: pthread
SIGALTSTACK: no
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)
Libraries:
.NET 2.0/3.5: no
.NET 4.0: no
.NET 4.5: no
MonoDroid: no
MonoTouch: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib: system zlib
configure: WARNING: Turning off static Mono is a risk
build error:
CC mono_sgen-main.o
main.c:7:22: fatal error: buildver.h: No such file or directory
compilation terminated.
-- second attempt, adding --with-moon-gc=sgen
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install
--with-sgen=yes --disable-boehm --with-gc=none --with-moon-gc=sgen
config output: same as first attempt above
build error: same as first attempt above
-- third attempt, removing --with-gc=none and --with-moon-gc=sgen options
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install
--with-sgen=yes --disable-boehm
config output: same as first attempt above
build error: same as first attempt above
-- fourth attempt, removing --disable-boehm and adding back --with-gc=none
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install
--with-sgen=yes --with-gc=none
config output: same as first attempt above
build error: same as first attempt above
--fifth attempt, leaving just --with-gc=none as in successful mono-2-10-8
branch build:
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1" CXXFLAGS="-DARM_FPU_VFP"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install --with-gc=none
config output: same as first attempt above
build error: same as first attempt above
-- sixth attempt, adding HAVE_SGEN_GC=1 to the CFLAGS, and using
--with-sgen=yes --disable-boehm
config options:
./autogen.sh --build="i686-pc-linux-gnu" --host=armv7-a-linux-androideabi
--target=armv7-a-linux-androideabi --enable-nls=no --with-mcs-docs=no
--with-mcs-build=no --with-moonlight=no --with-gc=none
CFLAGS="-DARM_FPU_VFP=1 -DHAVE_SGEN_GC=1" CXXFLAGS="-DARM_FPU_VFP
-DHAVE_SGEN_GC=1"
--prefix=/home/jeremybell/desktop/monodevsrc/mono_arm_install
--with-sgen=yes --disable-boehm
config output: same as first attempt above
build error:
Making all in mini
make[3]: Entering directory
`/home/jeremybell/Desktop/monodevsrc/mono/mono/mini'
if test -d ../../.git; then \
(cd ../..; \
LANG=C; export LANG; \
branch=`git branch | grep '^\*' | cut -d ' ' -f 2`; \
version=`git log --no-color --first-parent -n1
--pretty=format:%h`; \
echo "#define FULL_VERSION \"$branch/$version\""; \
); \
else \
echo "#define FULL_VERSION \"tarball\""; \
fi > version.h
CC genmdesc-genmdesc.o
In file included from genmdesc.c:9:0:
mini.h:52:2: error: #error "The code in mini/ should not depend on these
defines."
make[3]: *** [genmdesc-genmdesc.o] Error 1
Regards,
Jeremy
On Fri, May 10, 2013 at 10:25 AM, Jonathan Pryor <jonpryor at vt.edu> wrote:
> On May 8, 2013, at 4:29 PM, Jeremy Bell <bell.jeremy at gmail.com> wrote:
> > So, it looks like HAVE_SGEN_GC is not defined, but should be? Have I
> missed a step somewhere?
>
> Yes, it should be. From the commit message you mention:
>
> > The Android NDK/bionic is "interesting", in that it's lacking header
> files and
> > macros normally present on Linux which otherwise break the build (e.g. no
> > <link.h> which breaks Boehm support).
>
> "breaks Boehm support" means "only sgen works". You need to disable Boehm,
> and enable sgen.
>
> - Jon
>
>
--
Jeremy Bell
Sleepy Daddy Software™
---------------------------------------------------------------------------------------------------------
Have a little one? Try Giggle Pad© for Windows Phone 7, a fun and
educational game for children 9 months and older:
http://social.zune.net/redirect?type=phoneApp&id=5858669e-88d5-df11-a844-00237de2db9e
Does your brand new Windows Phone 7 have dead pixels or screen
discoloration? Find out with Pixel Checkup© for Windows Phone 7:
http://social.zune.net/redirect?type=phoneApp&id=1f5d0cf5-a2d8-df11-a844-00237de2db9e
Giggle Pad and Pixel Checkup are copyright © 2010 Jeremy Bell and Sleepy
Daddy Software™
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130510/87305fb9/attachment.html>
More information about the Mono-devel-list
mailing list