[Mono-dev] Question about issue building basic.exe and mscorlib paths

Alex J Lennon ajlennon at dynamicdevices.co.uk
Wed Mar 5 09:54:48 UTC 2014


On 02/03/2014 13:54, Zoltan Varga wrote:
> Hi,
>
>   mono requires an existing mono installation to work, and will only
> fall back to monolite if it is missing. If you want it to use
> monolite, then remove the existing mono installation from the PATH.
>
>                     Zoltan
>
>

Hi Zoltan,

Thanks for the response.

I'm not sure I understand you. There is already a monolite/basic.exe
present in the Mono archive.

The build environment is building another basic.exe

The problem seems to be that a dependency is being introduced on the
wrong mscorlib by the basic
profile makefile, which is what I was attempting to address (?)

Best Regards,

Alex

> On Sun, Mar 2, 2014 at 8:24 AM, Alex J Lennon
> <ajlennon at dynamicdevices.co.uk <mailto:ajlennon at dynamicdevices.co.uk>>
> wrote:
>
>     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
>     <http://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
>
>
>     _______________________________________________
>     Mono-devel-list mailing list
>     Mono-devel-list at lists.ximian.com
>     <mailto:Mono-devel-list at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>

-- 

Dynamic Devices Ltd <http://www.dynamicdevices.co.uk/>

Alex J Lennon / Director
1 Queensway, Liverpool L22 4RA

mobile: +44 (0)7956 668178

Linkedin <http://www.linkedin.com/in/alexjlennon> Skype
<skype:alexjlennon?add>

This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended
recipient(s). Any unauthorized disclosure, dissemination, distribution,
copying or the taking of any action in reliance on the information
herein is prohibited. E-mails are not secure and cannot be guaranteed to
be error free as they can be intercepted, amended, or contain viruses.
Anyone who communicates with us by e-mail is deemed to have accepted
these risks. Company Name is not responsible for errors or omissions in
this message and denies any responsibility for any damage arising from
the use of e-mail. Any opinion and other statement contained in this
message and any attachment are solely those of the author and do not
necessarily represent those of the company.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140305/eb210e02/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ddlogo-4.png
Type: image/png
Size: 3997 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140305/eb210e02/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linkedin.png
Type: image/png
Size: 631 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140305/eb210e02/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skype.png
Type: image/png
Size: 800 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140305/eb210e02/attachment-0002.png>


More information about the Mono-devel-list mailing list