sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet build --native fails on Mac OS X

Open mateusrodrigues opened this issue 10 years ago • 6 comments

The following code fails upon native build trial on Mac OS X El Capitan 10.11.3

using System;

namespace ConsoleApplication
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string name = Console.ReadLine();

            Console.WriteLine($"Hello, {name}");
        }
    }
}

Using version:

.NET Command Line Tools (1.0.0-beta-001563)

Product Information: Version: 1.0.0-beta-001563 Commit Sha: b00a75e3ea

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin Runtime Id: osx.10.11-x64

The error message displayed is:

Project DotnetBot (DNXCore,Version=v5.0) will be compiled because some of its inputs were newer than its oldest output. Compiling DotnetBot for DNXCore,Version=v5.0

Compilation succeeded. 0 Warning(s) 0 Error(s)

Time elapsed 00:00:01.9555503 Input Assembly: /Users/Mateus/Desktop/DotnetBot/bin/Debug/dnxcore50/DotnetBot.dll clang: warning: argument unused during compilation: '-pthread' ld: warning: object file (/Users/Mateus/Desktop/DotnetBot/obj/Debug/dnxcore50/native/DotnetBot.obj) was built for newer OSX version (15.3) than being linked (10.11) ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Runtime_EH__UnhandledExceptionFailFastViaClasslib: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__Int32ToDecStr: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__UInt32ToDecStr: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__Int64ToDecStr: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__UInt64ToDecStr: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__FormatExponent: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__FormatFixed: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Console_System_ConsolePal__WriteStdoutAnsiString: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Console_System_IO_StdInStreamReader__ReadExtraBuffer: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Console_System_IO_StdInStreamReader__AppendExtraBuffer: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Private_CoreLib_System_Globalization_FormatProvider_Number__DoubleToNumber: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Console_Interop_Sys__StrError: does not use RBP or RSP based frame ld: warning: could not create compact unwind for _System_Console_System_IO_PersistedFiles__GetHomeDirectory: does not use RBP or RSP based frame

mateusrodrigues avatar Feb 25 '16 21:02 mateusrodrigues

@mateusrodrigues There don't seem to be any error messages there, although there are definitely weird things happening.

Is there a native binary in bin/Debug/dnxcore50/osx.10.11-x64/native?

brthor avatar Feb 25 '16 21:02 brthor

@brthor Looks like you're right. There is a native binary in that path. When I run it, it outputs:

Call to an unimplemented runtime method; execution cannot continue.
Method: RhpThrowEx

The non-native binary runs just as expected.

mateusrodrigues avatar Feb 25 '16 22:02 mateusrodrigues

cc @schellap

brthor avatar Feb 25 '16 22:02 brthor

Expected, because http://github.com/dotnet/corert is still under development and many simple features are being brought up here: http://github.com/dotnet/corert/pulls.

schellap avatar Feb 25 '16 22:02 schellap

I expected as much, just wanted to bring it to your attention :smile:

brthor avatar Feb 25 '16 22:02 brthor

All right, gentleman. As this is expected, I'll be closing the issue, if that's fine.

mateusrodrigues avatar Feb 25 '16 22:02 mateusrodrigues