sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Error with executable created with --native on Linux

Open schnee72 opened this issue 10 years ago • 3 comments

I know --native is highly experimental, but brthor on gitter suggested filing an issue for this:

Linux 3.19.0-42 Ubuntu 14.04.3 LTS

Followed instructions to install dotnet from: https://dotnet.github.io/getting-started/

Created the Hello World example with 'dotnet new'.

The resulting file from using 'dotnet compile --native' works fine with the hello world example.

Changing 'Console.WriteLine("Hello World!");' to 'Console.WriteLine(100);' causes an error in the resulting file when using the --native option. It compiles just fine. But when executed it gives the following error:

ILCompiler failed generating code for this method; execution cannot continue. This is likely because of a feature that is not yet implemented in the compiler.

'Console.WriteLine(100);' compiled with just 'dotnet compile' runs without issue.

Thanks

schnee72 avatar Jan 04 '16 23:01 schnee72

cc @schellap

Is this expected?

brthor avatar Jan 04 '16 23:01 brthor

Yes, this is expected, there are a few methods that haven't been brought up yet due to which we are seeing this issue:

You can see those methods by running: dotnet compile --native --ilcargs "\\\"-verbose\\\""

I've filed issue https://github.com/dotnet/corert/issues/587

schellap avatar Jan 04 '16 23:01 schellap

Closing this since there is an issue on dotnet/corert.

thesmithee avatar Jul 22 '16 15:07 thesmithee