[Mono-list] Error: mcs.exe: cannot execute binary file

Paolo Molaro lupus@ximian.com
Mon, 17 Jun 2002 19:31:48 +0200

On 06/16/02 Piers Haken wrote:
> what's the status on building corlib with mono? last time I looked there
> were some pretty tricky problems to work around, has any progress been
> made on this? it's definitely one of the last major barriers to full
> self-hosting.

The System assembly is basically done, the only blocker seems to be

The status with corlib is this (note: it needs to be compiled with the mono
runtime, since the ms runtime can't handle the issues of compiling
lupus@luna:/mnt/net/mcs/class/corlib$ mcs --timestamp -o S.dll @list
[05:615] Loading references
[00:018]    References loaded
[00:008] Initializing Core Types
[00:022]    Core Types done
[00:002] Resolving tree
[00:089] Populate tree
[02:252] Emitting code
System/Double.cs(151) error CS0029: Cannot convert implicitly from `int'
to `double+State'
System/String.cs(773) error CS0030: Cannot convert type 'int' to 'uint'
System/String.cs(820) error CS-00-6: Could not find any applicable
function for this argument list
System/Enum.cs(168) error CS0029: Cannot convert implicitly from
`object' to `string'

** (process:21377): WARNING **: unhandled exception
System.InvalidOperationException: "typebuilder: System.Enum"
in <0x000ec> System.Reflection.Emit.TypeBuilder:get_UnderlyingSystemType ()
in <0x0001c> Mono.CSharp.TypeManager:EnumToUnderlying (System.Type)

I could not isolate the the first 4 errors: the first seems related to
a mismatch between what the compiler considers the int type and the type
of the enum. The others may be similar issues with the types returned by
the runtime library and the internal types of the compiler.
The exception is weird: mcs should not try to get the underlying type of
System.Enum, since it's not an enumeration.


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better