-
Notifications
You must be signed in to change notification settings - Fork 5k
Build host.native for native AOT libraries testing #114764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We don't have a need for host in native AOT but after #113765 the outerloop started failing with: ``` Building native export: "/usr/local/bin/clang-20" -O2 -shared -fpic -D DNNE_ASSEMBLY_NAME=Microsoft.Interop.Tests.NativeExports -D DNNE_COMPILE_AS_SOURCE -I "/__w/1/s/.packages/dnne/2.0.5/tools/platform" -I "/__w/1/s/artifacts/bin/linux-arm64.Release/corehost" -o "/__w/1/s/artifacts/obj/NativeExports/Release/net10.0/linux-arm64/dnne/bin/Microsoft.Interop.Tests.NativeExportsNE.so" --target=aarch64-linux-gnu --gcc-toolchain=/crossrootfs/arm64/usr --sysroot=/crossrootfs/arm64 "/__w/1/s/artifacts/obj/NativeExports/Release/net10.0/linux-arm64/dnne/Microsoft.Interop.Tests.NativeExports.g.c" "/__w/1/s/.packages/dnne/2.0.5/tools/platform/platform.c" -lstdc++ "/__w/1/s/artifacts/bin/linux-arm64.Release/corehost/libnethost.a" --target=aarch64-linux-gnu --gcc-toolchain=/crossrootfs/arm64/usr --sysroot=/crossrootfs/arm64 -fuse-ld=lld -Wl,--rpath-link=/crossrootfs/arm64/lib/aarch64-linux-gnu -Wl,--rpath-link=/crossrootfs/arm64/usr/lib/aarch64-linux-gnu clang-20 : error : no such file or directory: '/__w/1/s/artifacts/bin/linux-arm64.Release/corehost/libnethost.a' [/__w/1/s/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj] ``` because some of the interop testing uses DNNE. This is a blind attempt to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Linux still on the floor because when it rains it pours (#114485 (comment)), not sure if this fixed the interop tests or we just don't get to them... |
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
@jkoritzinsky @AaronRobinsonMSFT Is this the right fix? Is it expected that DNNE needs a live native host, even when targeting NAOT? |
DNNE would need the native host for the regular build. It won't kick in for the Publish target, but it will for the Build target. |
Does it need the live host or could we pull from the host package? |
We could condition it to pull from the package when TestNativeAot is true. Once the new bootstrapping PR is in, we could even further adjust it to use the packaged version unless UseBootstrap=true is specified (as using either live for bootstrapped is required for cross-targeting to unknown/non-Microsoft RIDs). |
Yup, that's precisely what I was thinking. |
We could also make it skip the apphost during Build when TestNativeAot is true. |
DNNE needs nethost.h from the apphost build in its published location. It doesn't need the apphost itself. |
If nethost.h is all it needs, then source copy |
It also needs the nethost lib now that I think about it (to build the DNNE entrypoint module) so we can't just point into the source tree for the header. |
It exposes one API |
@jkoritzinsky could you please submit a PR with a fix? I don't understand what fix is being discussed here. We typically revert PRs that cause such wide issues and cannot be fixed immediately. People need to work around this to get work done (#114948 (comment)). I was taking time off last week and came back to this still being an issue. We need a fix now. |
I'll merge this one for now -- we can remove the dependency later. |
We don't have a need for host in native AOT but after #113765 the native AOT outerloop started failing with:
because some of the interop testing uses DNNE. This is a blind attempt to fix it.
Sample: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1016185&view=logs&j=2f6a7d26-0d60-5ade-d191-981fe0847989&t=950a5a68-ae8a-5bb4-8cad-fb293bb99dc4
Cc @dotnet/ilc-contrib