<br><br><div><span class="gmail_quote">On 2/26/06, <b class="gmail_sendername">Peter Ross</b> <<a href="mailto:pro@missioncriticalit.com">pro@missioncriticalit.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sun, Feb 26, 2006 at 12:31:06AM +1100, Jonathan Morgan wrote:<br>><br>> An update on the status of DotGnu/Mono and the Mercury IL backend.<br>> I have tried the patches with both DotGnu and Mono on Win32, and also
<br>> with Mono on Linux (DotGnu is already being covered by Julien on<br>> Linux). Both DotGnu and Mono have a C# compiler (cscc/mcs), a IL<br>> compiler (ilasm) and a linker (ilalink/al). Neither have a Managed
<br>> C++ compiler, which we'll have to look into after we convince the C#<br>> to compile. It can probably be cut out as unnecessary.<br><br>The managed C++ compiler should be unnecessary, I think I've removed
<br>all the managed C++ from inside the library and runtime. If not it's<br>just a matter of translating from C++ to C#.</blockquote><div><br>It is removed from the library/runtime (though some of the runtime seems to be defined only in an MC++ header, as #defines). However, *__cpp_code.o should still be in the dependencies, meaning that make should still try to build them, and fail.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> DotGnu does not have the /addmodule: option to cscc, but instead it<br>
> has a -fmodule= option.<br>> mcs supports all Microsoft csc type flags, as well as GNU type flags<br>> (eg. /addmodule: and -addmodule and --addmodule)<br>> DotGnu fails to build because it cannot find the mercury namespaces
<br>> (eg. mercury.runtime.*).<br><br>Does the runtime assembly build? ie do you have a mercury_dotnet.dll<br>and mercury_il.dll in the runtime directory.</blockquote><div><br>Yes, for both DotGnu and Mono.<br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Mono crashes completely with the following error messages:<br>> ** (C:/Programs/Programming/Mono-[1]
<br>> <a href="http://1.1.12.1/lib/mono/1.0/mcs.exe:2312">1.1.12.1/lib/mono/1.0/mcs.exe:2312</a>): WARNING **: The following<br>> assembly referenced from<br>> C:\cygwin\installs\mercury-compiler-0.12.2\tmp_dir\library\bool.dll
<br>> could not be loaded:<br>> Assembly: mercury (assemblyref_index=0)<br>> Version: [2]0.0.0.0<br>> Public Key: 228c167d12aa0b0b<br>> The assembly was not found in the Global Assembly Cache, a path listed
<br>> in the MONO_PATH environment variable, or in the location of the<br>> executing assembly (.).<br>> **<br>> (C:/Programs/Programming/Mono-[3]1.1.12.1/lib/mono/1.0/mcs.exe:2312):<br>> WARNING **: The class
mercury.bool.bool_0 could not be loaded, used in<br>> mercury, Version= [4]0.0.0.0, Culture=neutral,<br>> PublicKeyToken=228c167d12aa0b0b<br>> This application has requested the Runtime to terminate it in an
<br>> unusual way.<br>> Please contact the application's support team for more information.<br>> Obviously it is unable to realise that it is in the middle of building<br>> the mercury assembly it is referencing.
<br><br>Yes it is trying to load the mercury assembly of which in the end<br>bool.dll is part of.</blockquote><div><br>Obviously this partial assembling is a feature of MS csc - should it really be? It may be useful for building arcane applications like Mercury, but could not this building be done by referencing assemblies, rather than modules?
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Both Mono and DotGnu ilasm appear to try to build assemblies rather<br>
> than modules, so that MS csc complains that it should reference the<br>> resultant DLLs rather than including them. I tried building the IL<br>> library with MS ilasm to see if this was the problem, but the same
<br>> errors occurred in cscc/mcs. The problem appears to be that neither<br>> them are able to find the namespace or the assembly mercury, as it is<br>> in the middle of being built.<br>> Any suggestions as to what to do next?
<br><br>It still works and builds using the MS tools? One way to continue<br>further would be to build the first copy of mercury.dll using these<br>tools and then see if you can get further.</blockquote><div><br>It will not build with MS csc, because Mono/DotGnu ilasm appear to build assemblies, rather than modules. However, it would work if you used /R: (reference assembly) rather than /addmodule: (note that this fix would not work with mcs/cscc).
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">My only suggestion is to build a small example of what you are trying to<br>do and the post it to the Mono and DotGNU mailing lists and see what
<br>help you can get there.<br></blockquote></div><br>I'll have a look into it.<br><br>Jon<br>