[Mono-dev] mkbundle --cross

dmaxime dmaxime at libero.it
Tue Jun 27 09:27:29 UTC 2017


Hello everybody,
I would like to build a 'all in one' OSX program from linux (ubuntu).

This is the linux version I'm using:
Linux  4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux

This and the Mono version installed:
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:16:53 
UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. 
www.mono-project.com
     TLS:           __thread
     SIGSEGV:       altstack
     Notifications: epoll
     Architecture:  amd64
     Disabled:      none
     Misc:          softdebug
     LLVM:          supported, not enabled.
     GC:            sgen (concurrent by default)

These are the necessary frameworks to run my program:
     Microsoft.CSharp.dll
     System.Configuration.dll
     System.Data.DataSetExtensions.dll
     System.Data.dll
     System.Deployment.dll
     System.dll
     System.Drawing.dll
     System.IO.Compression.dll
     System.IO.Compression.FileSystem.dll
     System.Net.Http.dll
     System.Runtime.Serialization.dll
     System.Web.dll
     System.Web.Extensions.dll
     System.Windows.Forms.dll
     System.Xml.dll
     System.Xml.Linq.dll

I took the following environments using the command "mkbundle 
--fetch-target":
mono-5.0.1-osx-10.7-i386.zip

I ran the build, using mkbundle, with the following command:
$ mkbundle --deps --cross mono-5.0.1-osx-10.7-i386.zip -o launcher-mac 
CHElauncher.exe

And this is the resulting output:
From: ~/.mono/targets/mono-5.0.1-osx-10.7-i386.zip
Using runtime: ~/.mono/targets/mono-5.0.1-osx-10.7-i386.zip/bin/mono
     Assembly: ~/mac/CHElauncher.exe
     Assembly: 
~/.mono/targets/mono-5.0.1-osx-10.7-i386.zip/lib/mono/4.5/I18N.West.dll
     Assembly: 
~/.mono/targets/mono-5.0.1-osx-10.7-i386.zip/lib/mono/4.5/I18N.dll
Generated launcher-mac

Note that my program runs fine in windows, linux and mac environments 
but when I move the resulting file from the build to the mac pc, where 
no mono environment is installed, and run it, I get the following error:
$ ./CHElauncher.exe
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the 
`/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.5/mscorlib.dll' 
directory.


I also tried to add mscorlib.dll to the command line mkbundle and I 
received this error:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 
'System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: 
Could not load file or assembly 'System, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its 
dependencies.
File name: 'System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089'

Could you explain to me what I'm wrong?

Thanks in advance for your attention.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20170627/d5e50f9e/attachment.html>


More information about the Mono-devel-list mailing list