On Fri, 20 Sep 2013, Ryan Kirkpatrick wrote:

> I am trying to get Mono 2.10 working on a core-image-basic running on 
> qemux86 machine. I am using pokay-dylan-9.0.2 on a Debian 6.0.7 system for 
> the builds and been able to build and run images without issue. Yet, when 
> I went to add the meta-mono layer from git.yoctoporject.org, I started 
> running into problems.
> 
> Corlib not in sync with this runtime: expected corlib version 96, found 100.
> Loaded from: /usr/lib/mono/2.0/mscorlib.dll
> Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.

I dug into the mono build and figured out that I had a version mismatch 
between 'mono' (builds the runtime for the target) and 'mono-native' 
(builds a runtime for the build system and uses it to build the corlib). 
The key was defining both of the following in local.conf, not just the 
first line which is all I had originally.

PREFERRED_VERSION_mono = "2.10.8.1"
PREFERRED_VERSION_mono-native = "2.10.8.1"

Anyway, attached is a patch against meta-mono (from 
git://git.yoctoproject.org/meta-mono) that makes these changes:
 - Adds a comment to the README about the two configs above.
 - Reconfigures mono to be built without X support, skip as desired.
 - A few packaging tweaks, namely moving the bulky *.mdb (Mono debug 
   databases) to the -dbg package.
 - Adjustment to QA packaging checks to resolve errors encountered.
 - Moved the mono-2.10.8.1 folder in meta-mono/recipes/mono to 
   meta-mono/recipes/mono/files so the contents can be found.
 - Quick fix to mono-xsp recipe to avoid parsing error, probably not the 
   fix to make if mono-xsp was going to be built (but I am not).

Hope that helps some one, it does myself as I can now run Mono apps in my 
qemux86 target. Next challenge is to do the same with a qemuarm target 
(actual hardware comes later :)!

---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, CO | rkirkpat.net | twitter.com/rkirkpatnet |
---------------------------------------------------------------------------
Index: meta-mono/README
===================================================================
--- meta-mono/README	(revision 4704)
+++ meta-mono/README	(working copy)
@@ -34,8 +34,17 @@
 Windows Forms applications. While mono can run w/o X, that recipe
 is not supported currently. It is unlikely to be supported.
 
+WARNING:
+If not building the latest version of Mono, make sure that
+PREFERRED_VERSION_* is defined for both mono and mono-native.
+Otherwise the runtime (built by mono recipe) and corlib (built by
+mono-native recipe) will not be in sync! That is, to build Mono
+v2.10.8.1, put this in local.conf or a distro conf:
 
+PREFERRED_VERSION_mono = "2.10.8.1"
+PREFERRED_VERSION_mono-native = "2.10.8.1"
 
+
 3) Maintainer(s) & Patch policy
 
 Autif Khan (autif.ml...@gmail.com)
Index: meta-mono/recipes-mono/mono/mono_2.10.8.1.bb
===================================================================
--- meta-mono/recipes-mono/mono/mono_2.10.8.1.bb	(revision 4704)
+++ meta-mono/recipes-mono/mono/mono_2.10.8.1.bb	(working copy)
@@ -2,11 +2,12 @@
 
 inherit autotools pkgconfig
 
-DEPENDS =+ "mono-native libgdiplus"
+DEPENDS =+ "mono-native"
 
-PR = "r0"
+PR = "r1"
 
 EXTRA_OECONF += "--disable-mcs-build mono_cv_uscore=no --with-tls=pthread --with-sigaltstack=no --with-mcs-docs=no"
+EXTRA_OECONF += "--without-x --without-moonlight --without-libgdiplus"
 
 do_configure_prepend() {
 	autoreconf -Wcross --verbose --install --force || bbnote "mono failed to autoreconf"
@@ -25,6 +26,9 @@
 FILES_${PN} += "${libdir}/libikvm-native.so"
 FILES_${PN} += "${libdir}/libMonoPosixHelper.so"
 FILES_${PN} += "${libdir}/libMonoSupportW.so"
+FILES_${PN} += "${datadir}/mono-2.0"
+FILES_${PN} += "${datadir}/libgc-mono"
+FILES_${PN}-dbg += "usr/lib/mono/*/*.mdb usr/lib/mono/*/*/*.mdb usr/lib/mono/*/*/*/*.mdb"
 
-INSANE_SKIP_${PN} = "arch dev-so debug-files"
+INSANE_SKIP_${PN} = "arch dev-so debug-files ldflags"
 
Index: meta-mono/recipes-mono/mono/files/mono-2.10.8.1/Makefile.am.diff
===================================================================
--- meta-mono/recipes-mono/mono/files/mono-2.10.8.1/Makefile.am.diff	(revision 0)
+++ meta-mono/recipes-mono/mono/files/mono-2.10.8.1/Makefile.am.diff	(revision 4765)
@@ -0,0 +1,15 @@
+--- mono-2.10.8.1.orig/Makefile.am	2012-01-25 14:24:43.564002232 -0500
++++ mono-2.10.8.1/Makefile.am	2012-01-25 14:25:02.036002218 -0500
+@@ -4,10 +4,10 @@
+ MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
+ 
+ if CROSS_COMPILING
+-SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
++SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
+ # Keep in sync with SUBDIRS
+ ## 'tools' is not normally built
+-DIST_SUBDIRS = po libgc eglib mono ikvm-native         data runtime scripts man samples tools msvc docs
++DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
+ else
+ if ONLY_MOONLIGHT
+ SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
Index: meta-mono/recipes-mono/mono/files/mono-2.10.8.1/mcs/class/Makefile.diff
===================================================================
--- meta-mono/recipes-mono/mono/files/mono-2.10.8.1/mcs/class/Makefile.diff	(revision 0)
+++ meta-mono/recipes-mono/mono/files/mono-2.10.8.1/mcs/class/Makefile.diff	(revision 4765)
@@ -0,0 +1,13 @@
+--- mono-2.10.8.1.orig/mcs/class/Makefile	2012-01-27 16:20:36.319297999 -0500
++++ mono-2.10.8.1/mcs/class/Makefile	2012-01-27 20:37:30.867593825 -0500
+@@ -55,10 +55,8 @@
+ 	Novell.Directory.Ldap		\
+ 	Mono.Security.Win32		\
+ 	System.DirectoryServices	\
+-	RabbitMQ.Client			\
+ 	Mono.Messaging			\
+ 	System.Messaging	        \
+-	Mono.Messaging.RabbitMQ		\
+ 	System.ServiceProcess           \
+ 	System.Drawing.Design		\
+ 	System.Design			\
Index: meta-mono/recipes-mono/mono/files/mono-2.10.8.1/data/config.in.diff
===================================================================
--- meta-mono/recipes-mono/mono/files/mono-2.10.8.1/data/config.in.diff	(revision 0)
+++ meta-mono/recipes-mono/mono/files/mono-2.10.8.1/data/config.in.diff	(revision 4765)
@@ -0,0 +1,11 @@
+--- mono-2.10.8.1.orig/data/config.in	2012-01-27 09:29:07.072001924 -0500
++++ mono-2.10.8.1/data/config.in	2012-01-27 09:30:59.740001933 -0500
+@@ -15,7 +15,7 @@
+ 	<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
+ 	<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
+ 	<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
+-	<dllmap dll="libX11" target="@X11@" os="!windows" />
++	<dllmap dll="libX11" target="libX11.so.6" os="!windows" />
+ 	<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
+ 	<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
+ 	<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
Index: meta-mono/recipes-mono/mono/mono-native_2.10.8.1.bb
===================================================================
--- meta-mono/recipes-mono/mono/mono-native_2.10.8.1.bb	(revision 4704)
+++ meta-mono/recipes-mono/mono/mono-native_2.10.8.1.bb	(working copy)
@@ -5,6 +5,7 @@
 PR = "r1"
 
 EXTRA_OECONF += "mono_cv_uscore=no --with-tls=pthread --with-sigaltstack=no --with-mcs-docs=no"
+EXTRA_OECONF += "--without-x --without-moonlight --without-libgdiplus"
 
 do_configure_prepend() {
     autoreconf -Wcross --verbose --install --force || bbnote "mono-native failed to autoreconf"
Index: meta-mono/recipes-mono/mono/mono-2.10.8.1/data/config.in.diff
===================================================================
--- meta-mono/recipes-mono/mono/mono-2.10.8.1/data/config.in.diff	(revision 4704)
+++ meta-mono/recipes-mono/mono/mono-2.10.8.1/data/config.in.diff	(working copy)
@@ -1,11 +0,0 @@
---- mono-2.10.8.1.orig/data/config.in	2012-01-27 09:29:07.072001924 -0500
-+++ mono-2.10.8.1/data/config.in	2012-01-27 09:30:59.740001933 -0500
-@@ -15,7 +15,7 @@
- 	<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
- 	<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
- 	<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
--	<dllmap dll="libX11" target="@X11@" os="!windows" />
-+	<dllmap dll="libX11" target="libX11.so.6" os="!windows" />
- 	<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
- 	<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
- 	<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
Index: meta-mono/recipes-mono/mono/mono-2.10.8.1/Makefile.am.diff
===================================================================
--- meta-mono/recipes-mono/mono/mono-2.10.8.1/Makefile.am.diff	(revision 4704)
+++ meta-mono/recipes-mono/mono/mono-2.10.8.1/Makefile.am.diff	(working copy)
@@ -1,15 +0,0 @@
---- mono-2.10.8.1.orig/Makefile.am	2012-01-25 14:24:43.564002232 -0500
-+++ mono-2.10.8.1/Makefile.am	2012-01-25 14:25:02.036002218 -0500
-@@ -4,10 +4,10 @@
- MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
- 
- if CROSS_COMPILING
--SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
-+SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
- # Keep in sync with SUBDIRS
- ## 'tools' is not normally built
--DIST_SUBDIRS = po libgc eglib mono ikvm-native         data runtime scripts man samples tools msvc docs
-+DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
- else
- if ONLY_MOONLIGHT
- SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
Index: meta-mono/recipes-mono/mono/mono-2.10.8.1/mcs/class/Makefile.diff
===================================================================
--- meta-mono/recipes-mono/mono/mono-2.10.8.1/mcs/class/Makefile.diff	(revision 4704)
+++ meta-mono/recipes-mono/mono/mono-2.10.8.1/mcs/class/Makefile.diff	(working copy)
@@ -1,13 +0,0 @@
---- mono-2.10.8.1.orig/mcs/class/Makefile	2012-01-27 16:20:36.319297999 -0500
-+++ mono-2.10.8.1/mcs/class/Makefile	2012-01-27 20:37:30.867593825 -0500
-@@ -55,10 +55,8 @@
- 	Novell.Directory.Ldap		\
- 	Mono.Security.Win32		\
- 	System.DirectoryServices	\
--	RabbitMQ.Client			\
- 	Mono.Messaging			\
- 	System.Messaging	        \
--	Mono.Messaging.RabbitMQ		\
- 	System.ServiceProcess           \
- 	System.Drawing.Design		\
- 	System.Design			\
Index: meta-mono/recipes-mono/mono-xsp/mono-xsp_1.2.5.bb
===================================================================
--- meta-mono/recipes-mono/mono-xsp/mono-xsp_1.2.5.bb	(revision 4704)
+++ meta-mono/recipes-mono/mono-xsp/mono-xsp_1.2.5.bb	(working copy)
@@ -91,7 +91,7 @@
 	/usr/lib/mono/2.0/mod-mono-server2.exe \
 	/usr/bin/mod-mono-server2 \
 	"
-FILES_mono-xsp-dev = "\
+FILES_mono-xsp2-dev = "\
 	/usr/lib/pkgconfig/xsp.pc \
 	/usr/lib/pkgconfig/xsp-2.pc \
 	"
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to