-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Determine how to package native shims #14821
Comments
Looking at this project: https://www.nuget.org/profiles/MonoGame, IMO it will be better to package
This will keep the package size minimal with no extra/unrelated platform binaries bundled together (like some NuGet packages are bundling Mono targets when installing on Windows). If the conditional (platform-based) dependency is not possible in NuGet/MyGet infrastructure, then bundling them as one System.IO.Native is the only option I imagine. In either case, CI build artifacts can be leveraged to build all the combinations of binary without hassling the release team to arrange VMs for all the (growing) OS set. On this note, it would be really cool to use GitHub tags with semver and set the CI to trigger the release assets build binaries with current master, only when new tags are pushed right after the "last commit which should go in the vNext release". |
Temporarily I've added these shim assemblies to our runtime package (Microsoft.NETCore.Runtime.CoreCLR) until we figure out the exact packaging strategy. |
We were actually planning to package as follows,
|
We have to move away from individual packages and towards the lineup file for these types of packages. |
Thank you for agreeing with the proposal @davidfowl |
@ericstj Yep. I don't want rely on this NuGet/Home#1660 for these specific packages even when it becomes available 😄 |
Yeah, we won't rely on it that feature. Just wanted to point out why it's required. For the .NET framework we have the nice benefit of always being able to put that lineup in the compile graph. For regular 3rd party devs they cannot so they need NuGet/Home#1660. |
What is "the lineup"? I don't think a lot of people are familiar with some of this new jargon, so it's a bit hard to understand the discussion 😄 . And just to clarify/discuss: since a lot of different assemblies are dependent on System.Native, does this mean that once we release a stable version, we have to maintain that ABI forever? Otherwise you will be required to choose various versions of libraries that are all compatible with the version of the shim you use (or rather, all libraries must depend on the same version of the shim). Lots of libraries depend on System.Native, and I'm pretty sure we've made at least a few binary breaking changes so far. Just trying to figure out our thoughts on this, I didn't see it written down anywhere yet. |
I do think we'll have to keep the ABI stable post-RTM, but I think this is less burdensome than with public managed API. We don't care about the aesthetics of the API as they are implementation details and we can always define Foo2(), etc. If absolutely necessary, we can also rename the .so and package and allow different, incompatible versions to live SxS. |
Lineup is a central representation of all the RID-specific associations of our packages. Each package represents its RID-specific implementation locally in our build system, but that all gets merged into a central runtime.json: the lineup. |
Why would we want to have CentOS, Ubuntu, Fedora, segregation? I mean if you build something on CentOS5 (5.11 is currently officially supported in 5x branch for example), it will definitely run on 95+% of linux running on servers and probably 99% of clients (only if someone is still running very old linux with libc version older than the one packed with CentOS, then it wont work).
Large amount of web hosting server till date are running CentOS 5, but that is not the real answer. I have experienced it and it is a proven fact from many C library folks including node.js guys, that binary built on CentOS5 is qualified as "ultimate cross linux distribution compatible". To simplify your build system and save time, I would highly recommend a Docker recipe setup (which i can provide if you are interested as I have done it more than once). Only In case of BSD though, we will have to target each kind of BSD separately: Free, Net, DragonFly yada yada (but BSD community can always wait and they are very cool about it 😄). |
Because this issue isn't about just 'libc', it is about the set of native libraries that we are using: libc, libcurl, openSSL, zlib. For example, the version of libcurl used on our CentOS CI servers is v7.29, but on Ubuntu is v7.35, and we can have differing code based on which version we are compiling against. |
One approach could be to bundle the dependent bins or compile them statically, so To recap, it boils down to three choices (maybe there are more?):
The third one is most cumbersome, One strong point about the third one is that for distributions which are very different (like Apline Linux, which doesn't even uses libc but microlibC OR other kinds of libc's which target RISC and their consumer distros), the drastic code variation will not impact the general, more commonly used, distributions. |
This feature was checked in. We now have native packages for these native libraries which are referenced by the "identity" package. |
For issue #14752, we'll be creating native libraries that need to be compiled for each unix flavor we support. We need to figure out how these are distributed (e.g. alongside corefx nuget packages? with the runtime? etc.)
The text was updated successfully, but these errors were encountered: