Skip to content
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

Managed and Native RID discovery can resolve different RIDs #33069

Closed
jkoritzinsky opened this issue Mar 2, 2020 · 3 comments
Closed

Managed and Native RID discovery can resolve different RIDs #33069

jkoritzinsky opened this issue Mar 2, 2020 · 3 comments

Comments

@jkoritzinsky
Copy link
Member

We currently have two methods of resolving the current build's RID. For native components, we use the init_distro_rid.sh script in eng/native. This script supports discovering RIDs for not-officially-supported distros as well as discovering rids for cross-compilation.

The managed RID discovery mechanism only supports discovering the host RID and then overriding it with a specific RID manually. @am11 reported that was causing him issues when building for android, where the native components built correctly for android.28-arm64 but the managed components were looking for linux-arm64.

@am11
Copy link
Member

am11 commented Mar 2, 2020

Following components built successfully (with #31701 changes):

  • CoreCLR - native and managed
  • Libraries - native and managed
  • Installer - native

managed components of installer failed at the package step, due to the wrong RID (linux-arm64) resolution.

@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label Jul 15, 2020
@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Jul 15, 2020
@ViktorHofer
Copy link
Member

@am11 do you know if there's still work left to do here? Asking as you spent quite a lot of time into consolidating RID logic on at least the managed side.

@am11
Copy link
Member

am11 commented Aug 6, 2021

Yes, this can be closed. :)

The native RID continues to be calculated in eng/native/init-distro-rid.sh, and managed RID is derived from the input from script in some cases (__DistroRid). We have combined all managed RIDs calculation in CalculateRID property group in Directory.Build.props at root of the repo.

For Android, currently it is working but the situation is not ideal as coreclr and mono are using different setups for Android. That requires us to add mysterious conditions and tweaks here and there to make things just work. I opened #56622 for discussion. The rootfs setup done by this script: eng/common/cross/build-android-rootfs.sh builds both coreclr and mono. If mono.android requires lower API level, we can change

__ApiLevel=28 # The minimum platform for arm64 is API level 21 but the minimum version that support glob(3) is 28. See $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/glob.h
and I'll find a workaround where we need glob(3) support in coreclr. But using this setup is a good thing because it will put Android in line with other cross-build setups which we are using since 2015.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants