Description
Upgrading an application targeting .NET 11 preview 1 to preview 2, native AoT compilation now fails on Linux using ubuntu-latest GitHub Actions runner (Ubuntu 24.04.3):
Generating native code
/usr/bin/ld.bfd : error : UniversalTransition.S.o: missing .note.GNU-stack section implies executable stack [/home/runner/work/website/website/src/Website/Website.csproj]
/usr/bin/ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/home/runner/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.2.26159.112/build/Microsoft.NETCore.Native.targets(391,5): error MSB3073: The command ""clang" "/home/runner/work/website/website/artifacts/obj/Website/release/native/Website.o" -o "/home/runner/work/website/website/artifacts/bin/Website/release/native/Website" -Wl,--version-script="/home/runner/work/website/website/artifacts/obj/Website/release/native/Website.exports" -Wl,--export-dynamic -gz=zlib -fuse-ld=bfd /home/runner/.nuget/packages/sentry/6.1.0/buildTransitive/../sentry-native/linux-x64/libsentry-native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libSystem.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libSystem.IO.Compression.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libSystem.Net.Security.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libbootstrapper.o /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libRuntime.ServerGC.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libeventpipe-enabled.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libRuntime.VxsortDisabled.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libstandalonegc-disabled.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libaotminipal.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libstdc++compat.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libz.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libbrotlienc.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libbrotlidec.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libbrotlicommon.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-x64/11.0.0-preview.2.26159.112/runtimes/linux-x64/native/libzstd.a -g -Wl,--build-id=sha1 -Wl,--as-needed -pthread -ldl -lrt -lm -pie -Wl,-pie -Wl,-z,relro -Wl,-z,now -Wl,--eh-frame-hdr -Wl,--discard-all -Wl,--gc-sections" exited with code -1. [/home/runner/work/website/website/src/Website/Website.csproj]
I have several applications targeting .NET 11 targeting preview 2, and this is the only one I'm having this issue (and #124336) with. I'm unsure what specifically causes the error for this application and not others. Also seeing here, here and here.
Reproduction Steps
- Clone martincostello/website@7e44977 on a Linux machine
- Run
build.ps1 in the root of the application
Expected behavior
The native AoT binary is successfully compiled.
Actual behavior
Compilation fails with the error UniversalTransition.S.o: missing .note.GNU-stack section implies executable stack.
Regression?
Yes
Known Workarounds
None
Configuration
.NET SDK 11.0.100-preview.2.26159.112
Other information
No response
Description
Upgrading an application targeting .NET 11 preview 1 to preview 2, native AoT compilation now fails on Linux using
ubuntu-latestGitHub Actions runner (Ubuntu 24.04.3):I have several applications targeting .NET 11 targeting preview 2, and this is the only one I'm having this issue (and #124336) with. I'm unsure what specifically causes the error for this application and not others.Also seeing here, here and here.Reproduction Steps
build.ps1in the root of the applicationExpected behavior
The native AoT binary is successfully compiled.
Actual behavior
Compilation fails with the error
UniversalTransition.S.o: missing .note.GNU-stack section implies executable stack.Regression?
Yes
Known Workarounds
None
Configuration
.NET SDK
11.0.100-preview.2.26159.112Other information
No response