Linux-bionic (Android libc w/o Android interop) initial implementation#66147
Linux-bionic (Android libc w/o Android interop) initial implementation#66147directhex merged 209 commits intodotnet:mainfrom
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @directhex Issue DetailsI expect I broke something along the way, so let's see just how badly. Closes: #66027
|
…into joshield/linux-bionic
src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
Outdated
Show resolved
Hide resolved
|
Urgh, horrible merge failure means I spent hours cleaning up unneeded changes, and they reappeared anyway |
|
New regression: SSL doesn't work because an Android System.Net.Security is being used instead of a Linux one, which causes it to forcibly load Android SSL instead of OpenSSL. |
I don't think parts of System.Net.Security are going to work on Android anyway. At least not in .NET 6. |
That's kinda the point. It worked yesterday when the build system assumed Bionic was Linux, and it's broken today now the build system thinks Bionic is Android, and I'm trying to figure out how to massage that in the build system to behave better (msbuild log viewer shows none of my properties in System.Net.Security.csproj are getting resolved, something odd is going on) |
You'd think! And yet Hence "and something odd is going on" |
|
Looks like the problem is with the structured log viewer, I see more via |
|
Okay, so, need help from someone who understands the libraries build a little better here (@ericstj?)
|
|
Okay, there's a few small bits & pieces to clean up, but the broad strokes are there (e.g. the on-device build is green and the tests are published), so I'm gonna mark this ready for review. Hopefully we can nail down any lingering issues by the end of the week, and clean up any questionable conditions to everyone's satisfaction. |
akoeplinger
left a comment
There was a problem hiding this comment.
Great jobs, I left a couple comments but this is really close :)
| #define FALLBACK_HOST_RID _X("solaris") | ||
| #elif defined(TARGET_LINUX_MUSL) | ||
| #define FALLBACK_HOST_RID _X("linux-musl") | ||
| #elif defined(TARGET_ANDROID) |
There was a problem hiding this comment.
it'd probably be better to introduce a TARGET_LINUX_BIONIC define instead.
| </PropertyGroup> | ||
| <ItemGroup Condition="'$(TargetsAndroid)' == 'true'"> | ||
| <ItemGroup Condition="'$(TargetsLinuxBionic)' == 'true'"> | ||
| <_MonoCPPFLAGS Include="-DANDROID_FORCE_ICU_DATA_DIR" /> |
There was a problem hiding this comment.
nit: call this FORCE_ANDROID_ICU_DATA_DIR to make it consistent with FORCE_ANDROID_OPENSSL (or change the other one, I don't have a preference)
There was a problem hiding this comment.
probably better to move this to the src/native CMakeFiles anyway though.
src/native/libs/System.Security.Cryptography.Native/extra_libs.cmake
Outdated
Show resolved
Hide resolved
src/native/libs/System.Security.Cryptography.Native/opensslshim.c
Outdated
Show resolved
Hide resolved
akoeplinger
left a comment
There was a problem hiding this comment.
Thanks, the rest of my comments can be addressed in followup-PRs

Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario.
shelluser executing tests viaadb shellin the world-writable/data/local/tmpdirectory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones)Closes: #66027