dotnet build --native fails on Mac OS X
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 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 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.
cc @schellap
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.
I expected as much, just wanted to bring it to your attention :smile:
All right, gentleman. As this is expected, I'll be closing the issue, if that's fine.