This question already has an answer here:
- Cross-compiling mono for proprietary ARM device 1 answer
For the last three days I've been trying to cross-compile Mono 2.11.4 for the TechNexion Blizzard board (running an unknown version of Angstrom) using a virtual Ubuntu (12.04) on my Win7 32 bit machine and CodeSourcery Sourcery G++ ARM toolchain, but with little/no success. I've followed every tutorial on the web but it just doesn't work.
CodeSourcery Sourcery G++ toolchain and Scratchbox2 (compiled from the latest git sources) are installed and working. Scratchbox2 set it up using
sb2-init armv7 /home/dev/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc
while in the correct directory (~/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc).
I can compile a simple 'Hello world' (cpp), compile and run it on the board. In Ubuntu:
file hello
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
I the downloaded the source for Mono 2.11.4 and followed one of the instructions. The first part (on the native machine) works well, no errors. However, when I run the second part (compiling for ARM) ./configure works as expected but then make fails with "../lib/mini[some_file] is incompatible with arm output". A file on these files says that they are indeed Intel 80386 executables, but I don't know why.
So the next step was to run a make clean and repeat the steps, but it still produced the same result.
I then tried to ./configure and make the whole thing inside sb2 instead and it seemed to work at first. But then some errors popped up the build broke:
./.libs/libmini.a(libmini_la-mini-arm.o): In function `mono_arch_init':
/home/dev/source/host-mono/mono-2.11.4/mono/mini/mini-arm.c:689: undefined reference to `debugger_agent_single_step_from_context'
/home/dev/source/host-mono/mono-2.11.4/mono/mini/mini-arm.c:689: undefined reference to `debugger_agent_breakpoint_from_context'
/home/dev/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld: .libs/libmono-2.0.so.1.0.0: hidden symbol `debugger_agent_single_step_from_context' isn't defined
/home/dev/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld: final link failed: Nonrepresentable section on output
Any ideas on what I'm doing wrong, or any tips on tutorials I might have missed?
//Anders