runtime: Failed to build tests for libs on Riscv64
After https://github.com/dotnet/runtime/pull/95980 we get next output during build of CoreCLR
Determining projects to restore...
Tool 'coverlet.console' (version '6.0.0') was restored. Available commands: coverlet
Tool 'dotnet-reportgenerator-globaltool' (version '5.0.2') was restored. Available commands: reportgenerator
Tool 'microsoft.dotnet.xharness.cli' (version '9.0.0-prerelease.24077.1') was restored. Available commands: xharness
Tool 'microsoft.visualstudio.slngen.tool' (version '11.1.0') was restored. Available commands: slngen
Restore was successful.
All projects are up-to-date for restore.
Determining projects to restore...
/home/runtime/.dotnet/sdk/9.0.100-alpha.1.23615.4/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(157,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-riscv64'. [/home/runtime/Build.proj]
/home/runtime/.dotnet/sdk/9.0.100-alpha.1.23615.4/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(157,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-riscv64'. [/home/runtime/Build.proj]
/home/runtime/.dotnet/sdk/9.0.100-alpha.1.23615.4/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(157,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-riscv64'. [/home/runtime/Build.proj]
/home/runtime/.dotnet/sdk/9.0.100-alpha.1.23615.4/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(157,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-riscv64'. [/home/runtime/Build.proj]
Nothing to do. None of the projects specified contain packages to restore.
Build FAILED.
Build commands:
ROOTFS_DIR=/home/runtime/.tools/rootfs/riscv64 ./build.sh --cross --clang --arch riscv64 --runtimeConfiguration Release --librariesConfiguration Release --hostConfiguration Release --subset host.native+clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+libs.native+libs.sfx+libs.oob /p:EnableSourceLink=false
After the first command the build completes successfully. The error occurs in the following command:
ROOTFS_DIR=/home/runtime/.tools/rootfs/riscv64 ./build.sh --cross --clang --arch riscv64 --runtimeConfiguration Release --librariesConfiguration Release --hostConfiguration Release --subset libs.pretest+libs.tests --testscope all /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
Please help to fix it.
cc @gbalykov
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 5
- Comments: 20 (19 by maintainers)
@am11 Thanks for quick response, your fix did the trick! Now clr and libs tests can be built for riscv64 without any issues (I checked on f84d33c7b8313d36f31f686920c7e5e9f038b60e). Will you open PR for your patch?
For reference, he’s a set of commands to build coreclr, libs, coreclr tests and libs tests for riscv64:
@gbalykov, please try applying:
and add
-p:UseLocalAppHostPack=trueat the end of your call:Original issue with libs tests build was fixed at some point (not sure about exact commit), but before that similar problem with coreclr tests started to happen as I mentioned in https://github.com/dotnet/runtime/pull/96941#discussion_r1507143464.
Now clr, libs and libs tests build works with next commands without any issues:
However, trying to build clr tests with next command fails:
error (same as @clamp03 mentioned in https://github.com/dotnet/runtime/pull/98476#issuecomment-1978047139):
@am11 do you know what can help with this one?
Yes. However, @SzpejnaDawid recently made some progress with RISC-V SDK (and even a successful build).
We used src/tests/Common/scripts/bringup_runtest.sh during early development, it’s pure bash, no SDK necessary. However, it doesn’t respect exclusions in src/tests/issues.targets so the runs have false positives. For CI we rolled out our own runner scripts at least until RISC-V SDK is in good enough shape to use src/tests/run.sh.
This also works
Great! Yes, I will send a PR shortly. This seems like a stopgap solution. I think the proper solution would be to integrate
eng/targetingpacks.targetsin src/tests and adjust the subset dependencies, so we can utilize apphost live built in various subsets without going through the sdk overhead. Also that"$(DotNetTool)" restorepart can probably be replaced by<MSBuild Targets="Restore"to avoid shelling out the restore task.I wonder if this simpler command also works. Would you mind trying?
@dotnet/area-infrastructure-libraries Could you take a look, please?
@dotnet/runtime-infrastructure can you please help? Seems to be host and prebuilt related. Possibly a component that tries to use a live built host?