Set /p:CrossBuild=true consistently for all repos#7574
Conversation
|
openbsd-x64 build was failing at aspnetcore https://github.com/am11/dotnet-riscv/actions/runs/28865536436/job/85614557857, note that ld.lld : error : cannot open crtbeginS.o: No such file or directory [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
ld.lld : error : unable to find library -l:libgssapi.so.9.0 [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
ld.lld : error : unable to find library -l:libinotify.so.4.0 [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
ld.lld : error : unable to find library -lcompiler_rt [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
ld.lld : error : unable to find library -lcompiler_rt [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
ld.lld : error : cannot open crtendS.o: No such file or directory [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
clang-22 : error : linker command failed with exit code 1 (use -v to see invocation) [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
/dotnet/src/aspnetcore/artifacts/.packages/microsoft.dotnet.ilcompiler/11.0.0-preview.7.26357.199/build/Microsoft.NETCore.Native.targets(420,5): error MSB3073: The command ""/usr/local/bin/clang-22" "/dotnet/src/aspnetcore/artifacts/obj/aspnetcoretools/Release/net11.0/openbsd-x64/native/aspnetcoretools.o" -o "/dotnet/src/aspnetcore/artifacts/bin/aspnetcoretools/Release/net11.0/openbsd-x64/native/libaspnetcoretools.so" -Wl,--version-script="/dotnet/src/aspnetcore/artifacts/obj/aspnetcoretools/Release/net11.0/openbsd-x64/native/aspnetcoretools.exports" -Wl,--export-dynamic -gz=zlib -fuse-ld=lld /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libSystem.Native.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libSystem.IO.Compression.Native.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libSystem.Net.Security.Native.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libbootstrapperdll.o /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libRuntime.WorkstationGC.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libeventpipe-disabled.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libRuntime.VxsortDisabled.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libstandalonegc-disabled.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libaotminipal.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libstdc++compat.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libz.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libbrotlienc.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libbrotlidec.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libbrotlicommon.a /dotnet/src/aspnetcore/artifacts/.packages/microsoft.netcore.app.runtime.nativeaot.openbsd-x64/11.0.0-preview.7.26357.199/runtimes/openbsd-x64/native/libzstd.a --target=x86_64-unknown-openbsd -g -Wl,--build-id=sha1 -Wl,--as-needed -Wl,-e,0x0 -pthread -lm -shared -Wl,-z,relro -Wl,-z,now -Wl,-z,nobtcfi -Wl,--no-execute-only -L"/usr/local/heimdal/lib" -l:libgssapi.so.9.0 -Wl,-rpath,/usr/local/heimdal/lib -L"/usr/local/lib/inotify" -l:libinotify.so.4.0 -Wl,-rpath,/usr/local/lib/inotify -Wl,--eh-frame-hdr -Wl,--icf=all -Wl,--discard-all -Wl,--gc-sections -Wl,-T,"/dotnet/src/aspnetcore/artifacts/obj/aspnetcoretools/Release/net11.0/openbsd-x64/native/sections.ld"" exited with code 1. [/dotnet/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]cc @DamianEdwards, @jkotas, @MichalStrehovsky, with this patch it passed https://github.com/am11/dotnet-riscv/actions/runs/28895261193/job/85718050571. |
|
Only
|
|
If there is no further feedback could this be merged? It's a regression for all community platforms (not just OpenBSD) compared to .NET 10 since SDK and aspnetcore are using PublishAot in this preview (and require CrossBuild prop to propagate for .NET eng infra). |
|
@jkotas, @MichalStrehovsky, PTAL. |
|
Can this be scoped down to only what's needed for OpenBSD (the I have question marks around the aspnetcore change (aspnetcoretools.csproj without PublishAot is meaningless - and we already seem to have a mechanism in place that works with the |
There are coreclr targeting platforms like SunOS, Haiku and NetBSD, which are pending AOT support. Those ports are work in progress and devs build the full VMR for testing on the machine as part of the work (old habit). Hence the condition Those ports started in 2020 which predate NativeAOT integration. The new port OpenBSD is on the new plan where we've considered crossgen2/AOT as "mandatory" part of the porting process and completed the work in few months. Once the other ports are completed, we can simplify the "supported OS" part of the equation and do a cleanup pass. Haiku is almost there (AOT PR is up), SunOS needs 2-3 more PRs to get there (but the pace is a bit slow) and NetBSD is on the fritz for a while (I may get to it after OpenBSD and SunOS). |
We infer cross build for runtime. Now that more repos have started to use NativeAot, it should be moved to common props.
Secondly, aspnetcore should adhere to NativeAotSupported just like SDK does.