Search code examples
c#monocross-platformmkbundle

Cross compiling issues with mkbundle in Mono


I facing some issues while trying to use the new cross-compile/linking feature on Mono Linux, with the mkbundle tool. I'm using Linux Mint 14.04 32 bit in a Intel x86 environment and I would like to create a static binary using mkbundle for 64bit platforms. As a reference I'm using Mono, version 4.6.2

mc@Carles-nix ~ $ mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.16/ac9e222 Tue Jan  3 11:57:29 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  x86
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

According to the documentation I need to have the destination target file first, so I try to fetch it from the server:

mc@Carles-nix ~ $ mkbundle --fetch-target 4.6.1-linux-libc2.12-amd64 --target-server https://download.mono-project.com/runtimes/raw/
Downloading runtime https://download.mono-project.com/runtimes/raw/4.6.1-linux-libc2.12-amd64 to /home/mc/.mono/targets/4.6.1-linux-libc2.12-amd64/mono
Failure to download the specified runtime from https://download.mono-project.com/runtimes/raw/4.6.1-linux-libc2.12-amd64
mc@Carles-nix ~ $ 

But as you can notice, I always get the same error, no matter what is the file that I try to download.

I've noticed that there is no file for my version (4.6.2), so I'm not sure if this could be the root of the issue.

Could anybody please give me any clue on what is going on?

Thank you very much in advance.


Solution

  • Just in case anybody would need an answer to this: I've contacted the guys at the Mono Project and it seems that there is a problem in their servers, so they proposed me to use an alternate server:

    $ mkbundle --fetch-target 4.6.1-linux-libc2.12-amd64 --target-server https://mono-project.azureedge.net/runtimes/raw/