[Mono-dev] Build failure on ARMv6/Raspberry Pi with Raspbian/armhf (Mono-devel-list Digest, Vol 120, Issue 11)

Jo Shields directhex at apebox.org
Thu Apr 16 12:07:06 UTC 2015



On 15/04/15 14:21, Fabian Pietsch wrote:
> Hi,
>
> I'm trying to compile Mono GIT mono-3.12.0-branch on the Raspberry
> Pi (ARMv6), on Raspbian/armhf (Mono 3.2.8), with monolite-111-latest
> 3.6.1.0 as bootstrap compiler.
>
> I'm building like this:
>
> mono $ ./autogen.sh --prefix=/usr/local EXTERNAL_MCS="/home/pi/build/mono/mono/mcs/class/lib/monolite/gmcs.exe"
> [...]
> mono $ SKIP_AOT=true make EXTERNAL_MCS="/home/pi/build/mono/mono/mcs/class/lib/monolite/gmcs.exe" V=1
> [...]
> make[8]: Entering directory '/home/pi/build/mono/mono/mcs/class/corlib'
> /bin/sh ./../../mkinstalldirs ../../class/lib/build/
> touch ../../class/lib/build//.stamp
> MONO_PATH="./../../class/lib/basic:$MONO_PATH" /home/pi/build/mono/mono/runtime/mono-wrapper  ./../../class/lib/basic/basic.exe /codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB -d:LIBC  -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699 -nostdlib -lib:./../../class/lib/build  -optimize  /noconfig -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4 -target:library -out:../../class/lib/build/mscorlib.dll  @corlib.dll.sources
>
> Unhandled Exception:
> System.TypeLoadException: Could not load type 'Mono.CSharp.CommandLineParser' from assembly 'basic, Version=3.12.1.0, Culture=neutral, PublicKeyToken=null'.
> [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Mono.CSharp.CommandLineParser' from assembly 'basic, Version=3.12.1.0, Culture=neutral, PublicKeyToken=null'.
> ../../build/library.make:275: recipe for target '../../class/lib/build/mscorlib.dll' failed
> make[8]: *** [../../class/lib/build/mscorlib.dll] Error 1
> [...]

Don't specify EXTERNAL_MCS.

EXTERNAL_MCS needs to be set to an executable c# compiler, i.e.
"/usr/bin/mcs" not to a C# compiler assembly, i.e.
"/usr/lib/mono/4.5/mcs.exe" (the former requires an existing working
Mono in some path). In your case, because you have the binfmt-support
package installed, the kernel is interpreting efforts to execute mcs.exe
directly and passing them through /usr/bin/mono - mcs 3.12 doesn't work
on Mono 3.2.8

If EXTERNAL_MCS does not exist, and "mcs" does not exist in $PATH, then
the build system will use mcs.exe from monolite/ using the just-built
mono in mono/mini - this is the scenario you want.


More information about the Mono-devel-list mailing list