gcc : error : unrecognized command-line option '--target=aarch64-linux-gnu'
$ dotnet publish -p:PublishAot=true -p:SelfContained=true -r linux-arm64
MSBuild version 17.4.0+18d5aef85 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
frog -> /home/goose/sandbox-1668781319/frog/bin/Debug/net7.0/linux-arm64/frog.dll
Generating native code
gcc : error : unrecognized command-line option '--target=aarch64-linux-gnu' [/home/goose/sandbox-1668781319/frog/frog.csproj]
/home/goose/programs/dotnet-folder/sdk/7.0.100/Sdks/Microsoft.DotNet.ILCompiler/build/Microsoft.NETCore.Native.targets(346,5): error MSB3073: The command ""gcc" "obj/Debug/net7.0/linux-arm64/native/frog.o" -o "bin/Debug/net7.0/linux-arm64/native/frog" /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/sdk/libbootstrapper.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/sdk/libRuntime.WorkstationGC.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/framework/libSystem.Native.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/framework/libSystem.Globalization.Native.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/framework/libSystem.IO.Compression.Native.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/framework/libSystem.Net.Security.Native.a /home/goose/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/7.0.0/framework/libSystem.Security.Cryptography.Native.OpenSsl.a --target=aarch64-linux-gnu -g -Wl,-rpath,'$ORIGIN' -Wl,--build-id=sha1 -Wl,--as-needed -pthread -lstdc++ -ldl -lm -lz -lrt -pie -Wl,-z,relro -Wl,-z,now -Wl,--discard-all -Wl,--gc-sections" exited with code 1. [/home/goose/sandbox-1668781319/frog/frog.csproj]
Description
Getting an error
When trying to compile my app for ARM64 while being on x86 64bit laptop
Reproduction Steps
dotnet new console -n frog && cd frogdotnet publish -p:PublishAot=true -p:SelfContained=true -r linux-arm64Expected behavior
Compiles
Actual behavior
Doesn't compile:
Regression?
No response
Known Workarounds
No response
Configuration
Other information
No response