[Mono-dev] Question about issue building basic.exe and mscorlib paths
Alex J Lennon
ajlennon at dynamicdevices.co.uk
Sun Mar 2 13:24:39 UTC 2014
Hi,
I'm updating a recipe for Yocto/Openembedded layer, meta-mono, which
cross-compiles Mono 3.2.8 for embedded Linux targets.
I am using an Ubuntu 12.04 LTS host for build and previously this has
worked well with the default mono support available in precise, version
2.10 I think.
(NB the Yocto build environment shouldn't have any external
dependencies on the host version of mono as it is building its own
native, host, build prior to the cross-compiled build).
When I updated the host to use Mono 3.2.1 from ppa:directhex/monoxide
for some other work I was doing, I started getting unexpected build
problems with the meta-mono recipe.
>From what I've been able to track down, what is happening is that the
build process is building basic/basic.exe from the basic profile. I'm
not sure why this is happening as we already have the bootstrap
basic.exe in monolite.
This new basic.exe should have a dependency on the apropriate
mscorlib.dl that is being built with it, but instead has a dependency on
an external mscorlib.dll on the host. With Mono 3.2.1 installed this
dependency is on /usr/lib/mono/4.5/mscorlib.dll
As a result of this dependency when the new basic.exe is executed we get
various warnings of the form,
../corlib/Mono/DataConverter.cs(759,25): warning CS0436: The type
`Mono.DataConverter' conflicts with the imported type of same name'.
Ignoring the imported type definition
../../build/common/MonoTODOAttribute.cs(38,17): (Location of the symbol
related to previous warning)
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to
previous warning)
Then an error
MCS [build] mscorlib.dll
Unhandled Exception:
System.TypeLoadException: Could not load type
'Mono.CSharp.CommandLineParser' from assembly 'basic, Version=3.2.8.0,
Culture=neutral, PublicKeyToken=null'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not
load type 'Mono.CSharp.CommandLineParser' from assembly 'basic,
Version=3.2.8.0, Culture=neutral, PublicKeyToken=null'.
make[8]: *** [../../class/lib/build/tmp/mscorlib.dll] Error 1
I took a look at the basic profile make file for missing paths and I
think it may be missing the required dependency path. When I added this
in the build works,
--- 3.2.8-r0/mcs/build/profiles/basic.make.org 2014-03-01
17:51:52.904670729 +0000
+++ 3.2.8-r0/mcs/build/profiles/basic.make 2014-03-01
17:46:50.476669939 +0000
@@ -12,7 +12,7 @@
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(MONOLITE_MCS) -sdk:2
else
-PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
+PROFILE_RUNTIME = ${with_mono_path) $(EXTERNAL_RUNTIME)
BOOTSTRAP_MCS = $(EXTERNAL_MCS)
endif
Could somebody please comment on whether this makes sense? If so I'd be
happy to provide the patch to you in whatever format is required.
Thanks & Best Regards,
Alex Lennon
Dynamic Devices Ltd
More information about the Mono-devel-list
mailing list