[Mono-dev] mgnat.dll saga

Robert Jordan robertj at gmx.net
Sun Nov 13 07:24:32 EST 2005


Laurent,

>>Your assembly is not a valid PE file. You may check it yourself
>>with pedump --verify all mgnat.dll
> 
> 
> Thanks for the hint! I removed the /key=.../TestKey.snk argument to the
> ilasm command generating mgnat.dll from the big .il file and it removed
> the CS0006 message (may be TestKey.snk is somewhat invalid?). pedump now
> says:
> 
> guerby at m:~/tmp/mgnat/src/lib> pedump --verify all mgnat.dll
> CLS: Invalid CLS name '_tag` in Field row 11
> CLS: Invalid CLS name '_gnat_stack_cache` in Field row 14

Not critical.

> $ mcs /debug /t:library /r:mgnat.dll /out:mgnatcs.dll AssemblyInfo.cs Acc.cs Dbl.cs Flt.cs Int.cs UInt.cs Lng.cs _abort_signal.cs constraint_error.cs program_error.cs storage_error.cs tasking_error.cs standard\$access_string.cs Ada_AR.cs Object_File.cs PushbackReader.cs Prim_Input_Stream.cs Prim_Output_Stream.cs Prim_Conversions.cs ada_wrapper.cs GNAT_libc.cs ada.cs ada.calendar.cs array_constructor.cs
> 
> ** (/usr/lib/mono/1.0/mcs.exe:11960): WARNING **: The following assembly referenced from /home/guerby/tmp/mgnat/src/lib/mgnat.dll could not be loaded:
>      Assembly:   mgnatcs    (assemblyref_index=1)
>      Version:    3.0.0.0
>      Public Key: 3e8670be13aa99a5
> The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/guerby/tmp/mgnat/src/lib).
> 
> 
> ** ERROR **: file class.c: line 2418 (mono_class_setup_parent): should not be reached
> 
> It looks like mgnat.dll refers to mgnatcs.dll and mgnatcs.dll refers to
> mgnat.dll, is that kind of circular dependancy possible? If so, do I
> need a flag or something?

It is not possible, but it can be solved using conditional compilation.
Have a look at the sourcecode whether it has some #if preprocessing
instructions.

Robert




More information about the Mono-devel-list mailing list