dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.42k stars 4.76k forks source link

docker build --rm -f test.dockerfile . -t img-test : native aot compilation fails on Mac M1 in version 9, ok in version 8 #104325

Closed LLT21 closed 4 months ago

LLT21 commented 4 months ago

Description

While packaging the project in https://github.com/LLT21/dotnet9.git with the command docker build --rm -f test.dockerfile . -t img-test, the following error occurs with .NET 9 preview:

image

Reproduction Steps

  1. Clone the project in https://github.com/LLT21/dotnet9.git on a Mac M1 (ARM)
  2. Build the docker file with: docker build --rm -f test.dockerfile . -t img-test

Expected behavior

With dotnet version 8 this compiles well in aot; would like this also to work in dotnet 9

Actual behavior

In dotnet 9 there is this error: 12.32 /usr/bin/ld.bfd:obj/Release/net9.0/linux-arm64/native/test.exports:3: syntax error in VERSION script

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

LLT21 commented 4 months ago

Apparently this is due the this line in the .csproj file: <DebuggerSupport>false</DebuggerSupport> Was probably supported in .NET 8, not anymore in .NET 9 ?

dotnet-policy-service[bot] commented 4 months ago

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.

jkotas commented 4 months ago

Thank you for the report! https://github.com/dotnet/runtime/pull/104339 has the fix.