-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The "--use-current-runtime" option doesn't work correctly in Arm-based musl system (Alpine) #28809
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This was going to be fixed by dotnet/installer#14637 but now it's going to be fixed by dotnet/installer#14647 (thank you @baronfel). The implicit SDK Rid is also using the same portableSDKRid as UCR so this is concerning. |
@nagilson - Does that mean it will be fixed in the GA release of 7.0? |
I am actually using --use-current-runtime on musl arm64 for a while with net6.0 earliest RTM in a build machine. This regression was introduced in #22373 which I noticed a few weeks ago #22373 (comment) when testing upgrades with 7.0.0-rc2. We should backport the regression fix to 6.x as well. |
FYI, the |
Not exactly sure which 7.0 patch release this was fixed in but it's fixed now. |
The
--use-current-runtime
option should make use of the current system's RID. This is not working currently when that system is on the Arm architecture and musl-based. I specifically used Alpine. Not sure if it's all musl systems or just specific to Alpine since Alpine has its own RID. It's essentially treating it as a non-musl-based system. In other words, it's deriving the RID aslinux-arm64
instead oflinux-musl-arm64
. What's interesting is that this only occurs for Arm64/Arm32 but not x64.This can be shown in two ways using the
dotnet restore
anddotnet publish
commands.Repro steps
dotnet --info
:dotnet new console
dotnet restore --use-current-runtime -v normal
Notice in the output that package names are not specific to musl when they should be. For example,
linux-arm64
should belinux-musl-arm64
in this output:dotnet restore -r linux-musl-arm64
--use-current-runtime
option:dotnet publish -c Release -o /app --use-current-runtime --no-restore
And you get this error because it's trying to use
linux-arm64
instead oflinux-musl-arm64
:If you just use
--use-current-runtime
for all these steps and ignore the fact it's not doing the right stuff, the app won't run because it's not using the correct bits for the system it's running on. You end up getting this fun error when attempting to run the app:The text was updated successfully, but these errors were encountered: