[Mono-devel-list] out of sync on clean install

Jonathan Pryor jonpryor at vt.edu
Tue May 20 10:37:06 EDT 2003

How can the corlib and runtime be out of sync after one build?  It's
possible because of a "deficiency" within mono.  A deficiency I'd like
to correct, and would welcome suggestions for fixes (hey lupus!).

Mono attempts to bind methods "early."  Put another way, if we have the
following two methods declared:

	[MethodImpl (MethodImplOptions.InternalCall)]
	private static extern void NeverCalled ();

	[DllImport ("does-not-exist.dll")]
	private static extern void AlsoNeverCalled ();

Mono will issue a "corlib out of sync" warning for NeverCalled() and an
equivalent "can't find library does-not-exist.dll" warning for
AlsoNeverCalled().  Even though these functions aren't used (just
present in the IL), mono generates a warning.

.NET, on the other hand, permits both of these to be defined and never
issues a warning for either one.

What I would prefer to see is that the warnings are only issued IF THE

Implementing this is what I could use some suggestions for.

How's this apply to you?  You built a new corlib.  MCS, merely seeing
the *declarations* for the InternalCall (NeverCalled()), will issue a
"corlib out of sync" warning.  In this case, it's completely groundless,
and can be ignored.

This also applies to apps that have their own internal calls (XSP, IIRC)
and apps which DllImport Win32 DLLs but have a runtime check so they
don't invoke Win32 functions inappropriately.  Both of these
circumstances generate useless warnings.

In general, you can ignore the "corlib out of sync" warnings when you're
*building* corlib (or anything else that may declare InternalCalls). 
It's only when you're running the application *using* the InternalCalls
that the warning actually needs to be headed.

So, you're seeing normal behavior.  Install your new corlib, make &
install the runtime, and all *should* be well.  (If it isn't well,
recompile corlib under the new runtime, which should remove the

 - Jon

On Mon, 2003-05-19 at 23:55, Alvaro A. Ramirez wrote:
> Hi. I just reinstalled mandrake 9.1 on my machine, followed by the mono
> RPMS 0.24. I tried to compile mod_mono 0.3.7 found at
> http://www.apacheworld.org/modmono/ and it already says that my runtime
> and corlib are out of sync. how is this possible? i have only installed
> the rpms without any previous  builds. any suggestions? should i just
> uninstall the rpms and start from CVS using the script?
> thanks,
> alvaro
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list