Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello world failed to AOT compile on "mono:latest" #87

Open
rdebath opened this issue Apr 25, 2021 · 1 comment
Open

Hello world failed to AOT compile on "mono:latest" #87

rdebath opened this issue Apr 25, 2021 · 1 comment

Comments

@rdebath
Copy link

rdebath commented Apr 25, 2021

EDIT: See also: mono/mono#21515

I tried to compile a trivial program then process it using LLVM aot.
The error looks like this: mono/mono#18779
and this: xamarin/xamarin-macios#7833

The non-llvm version of AOT works.

$ docker run --rm -it mono:latest
root@58880953e546:/# cd /tmp
root@58880953e546:/tmp# ls
root@58880953e546:/tmp# mono --version
Mono JIT compiler version 6.12.0.107 (tarball Thu Dec 10 05:28:17 UTC 2020)
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
        Interpreter:   yes
        LLVM:          yes(610)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)
root@58880953e546:/tmp# cat > hello.cs
// Hello World! program
namespace HelloWorld
{
    class Hello {
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}
root@58880953e546:/tmp# csc hello.cs
Microsoft (R) Visual C# Compiler version 3.6.0-4.20224.5 (ec77c100)
Copyright (C) Microsoft Corporation. All rights reserved.

root@58880953e546:/tmp# mono --aot=mcpu=generic --llvm -O=all,-shared hello.exe
Mono Ahead of Time compiler - compiling assembly /tmp/hello.exe
AOTID FA76F661-DF92-D31D-9484-23A274DD7DAC
Executing opt: "/usr/lib/mono/llvm/bin/opt" -f -O2 -disable-tail-calls -place-safepoints -spp-all-backedges -o "mono_aot_sHrVqP/temp.opt.bc" "mono_aot_sHrVqP/temp.bc"
Executing llc: "/usr/lib/mono/llvm/bin/llc"  -march=x86-64 -mcpu=generic -enable-implicit-null-checks -disable-fault-maps -asm-verbose=false -disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=mono_aot_hello_eh_frame -disable-tail-calls -no-x86-call-frame-opt -relocation-model=pic -filetype=obj -o "mono_aot_sHrVqP/temp-llvm.o" "mono_aot_sHrVqP/temp.opt.bc"
llc: Unknown command line argument '-disable-fault-maps'.  Try: '/usr/lib/mono/llvm/bin/llc -help'
llc: Did you mean '-disable-tail-calls'?
AOT of image hello.exe failed.
root@58880953e546:/tmp#
@rdebath
Copy link
Author

rdebath commented Jun 3, 2022

This still fails in the same way. Mono version now 6.12.0.122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant