[Mono-dev] Build failure on ARMv6/Raspberry Pi with Raspbian/armhf

Fabian Pietsch fabian at canvon.de
Wed Apr 15 13:21:20 UTC 2015


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
[...]


This can be reproduced simply by this:

mono $ cd mcs/class/corlib
mono/mcs/class/corlib $ MONO_PATH="./../../class/lib/basic:$MONO_PATH" /home/pi/build/mono/mono/runtime/mono-wrapper  ./../../class/lib/basic/basic.exe /help

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'.


However, this is working fine:

mono/mcs/class/corlib $ ./../../class/lib/basic/basic.exe /help
Mono C# compiler, Copyright 2001-2011 Novell, Inc., Copyright 2011-2012 Xamarin, Inc
mcs [options] source-files
   --about              About the Mono C# compiler
   -addmodule:M1[,Mn]   Adds the module to the generated assembly
[...]


So the bootstrapped compiler itself can be run (on existing Mono), but the
newly built Mono or mscorlib.dll or something else is broken?


I already tried this from [1], but it did not help:
[1] http://lists.ximian.com/pipermail/mono-devel-list/2014-March/041222.html

$ git diff
diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make
index 12f6c82..f93afab 100644
--- a/mcs/build/profiles/basic.make
+++ b/mcs/build/profiles/basic.make
@@ -12,7 +12,7 @@ ifdef use_monolite
 PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
 BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(MONOLITE_MCS) -sdk:2
 else
-PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
+PROFILE_RUNTIME = $(with_mono_path) $(EXTERNAL_RUNTIME)
 BOOTSTRAP_MCS = $(EXTERNAL_MCS)
 endif


Please advise at what else I can try.

Regards, Fabian


More information about the Mono-devel-list mailing list