5

Has anyone successfully cross-compiled mono for ARM under Linux without scratchbox or qemu?

(maybe with distcc or some cross-compiler toolchain)

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Gobliins
  • 3,848
  • 16
  • 67
  • 122

2 Answers2

4

I managed to cross compile mono(2.0, 2.4, 2.6, 2.8, 2.10.1) with Scratchbox 2 installed on a Ubuntu machine using CodeSourcery Lite tool chain. I used the article from the Mono project page.

First compile it on the native machine

./configure
$ make
$ make install DESTDIR=path

Then in sb2:

[sbox-ARMEL: ~] > ./configure --disable-mcs-build
[sbox-ARMEL: ~] > make 
[sbox-ARMEL: ~] > make install DESTDIR=path

I use this for configuration

./configure --enable-minimal=profiler,debug,logging,soft_debug --with-tls=--with-tls=__thread --with-monotouch=no --without-mcs-docs --disable-mono-debugger CFLAGS=-DARM_FPU_NONE --disable-mcs-build
abatishchev
  • 98,240
  • 88
  • 296
  • 433
retek4
  • 66
  • 2
  • 1
    hmm i tried the ./configure --disable-mcs-build, but i failed with lots of undefined references, i will tomorrow test your configuration – Gobliins Mar 04 '11 at 15:03
  • which toolchain do you use in the sbox environment? is your DESTDIR the same in both environments or do you merge later after building? – Gobliins Mar 06 '11 at 22:26
  • 1
    sorry for the delayed answer. yes the destdir is the same.(Note: I changed the toolchain, using crosstool-ng) – retek4 Jun 21 '11 at 12:36
  • Disabling MCS doesn't work for me either. It seems to fail on the test program steps. – jocull Apr 11 '12 at 01:32
  • When you compile mono on the native machine you should not use --disable-mcs-build. After install run clean and rerun configure with the disable mcs in sb2 – retek4 Apr 13 '12 at 07:12
  • do any of you gents have any help, man pages, tutorials, with a step-by-step process of how to do all of this? I'm presently looking at doing the same, but everything i see here is a set of notes from someone with experience, not suited for a n00b doing this. – Richard B May 14 '16 at 17:39
2

I tried and tried and tried with scratchbox2 last night.. Ran into some problem.. Ended up just compiling on arm, went fine! took 30 minutes!

CFLAGS=-DARM_FPU_VFP_HARD HardFloat
CFLAGS=-DARM_FPU_VFP_NONE SoftFloat

Compile mono on PC

sudo make install `directory like /tmptree etc`

move all these files from /tmptree over to / etc on your arm device.

./autogen.sh --disable-mcs-build
make CFLAGS=-DARM_FPU_VFP_HARD
sudo make install
sudo ldconfig

Mono Hard Float Patch

Tried doing Hard Float with mono 3.0.3.. it said it didn't support it yet.

abatishchev
  • 98,240
  • 88
  • 296
  • 433