Add Lzma library files to the repository#124003
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the XZ Utils library (version 5.8.2) to the dotnet/runtime repository as preparatory work for issue #1542. The addition includes the complete LZMA compression library source code, build configurations, documentation, and integration scripts.
Changes:
- Adds XZ Utils 5.8.2 library files from the tukaani-project/xz repository
- Includes CMake and Autotools build system configurations
- Adds documentation, examples, and internationalization support files
- Configures the library for static linking with multithreading disabled
Reviewed changes
Copilot reviewed 75 out of 497 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/native/external/xz/* | Complete XZ Utils 5.8.2 library source code including build scripts, documentation, examples, and localization files |
| src/native/external/xz.cmake | CMake configuration to integrate XZ Utils into dotnet/runtime build system with specific feature flags |
| src/native/external/xz.version | Version tracking file indicating XZ Utils v5.8.2 from tukaani-project |
| src/native/external/cgmanifest.json | Component governance manifest entry for XZ Utils dependency |
|
Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression |
|
I am getting compile errors on linux: Seems like there is something wrong with the exports specification: System.IO.Compression.Native$ nm libSystem.IO.Compression.Native.so | grep " lzma_stream_decoder"
00000000003c51c0 t lzma_stream_decoder
00000000003c4410 t lzma_stream_decoder_initAll the other exported entries have But the exports file seems to be generated correctly: I am not sure what is going on here, maybe there is a problem because the library functions are declared as runtime/src/native/external/xz/src/liblzma/api/lzma/container.h Lines 838 to 840 in d8731e0 I will need to investigate a bit more |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Should be working now |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Build is passing, but no new functionality was introduced yet, so the build failures are not related |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Show resolved
Hide resolved
…e.Unix.targets Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| @@ -0,0 +1,70 @@ | |||
|
|
|||
| XZ Utils Licensing | |||
| ================== | |||
There was a problem hiding this comment.
This is a non-traditional license. We should make sure to review this with our OSS team and understand what's required to use this. I didn't see an update to our repo's third-party-notices.
I see we are subsetting what we copy - does that mean we've omitted all the things under GPL? If so, can those licenses be omitted? IANAL but this makes me a little nervous and is the sort of thing we want to make doubly sure we have correct so that we understand that our usage / copying is permitted by the license and we are meeting all the requirements set out by that license.
There was a problem hiding this comment.
I removed all the code that we don't use, the parts that are left (liblzma, common) are under 0BSD license. I also added third party notice
|
What sort of size increase do we see to our system.io.compression.native with this, across different platforms? Have you confirmed we are linking correctly and getting the minimal set of things we need? |
the PR as-is increases the native .so by about 60 kB in release on my desktop, there is a reference to |
| @@ -0,0 +1,302 @@ | |||
| #!@POSIX_SHELL@ | |||
| # SPDX-License-Identifier: GPL-2.0-or-later | |||
There was a problem hiding this comment.
Do we really need these GPL licensed sources?
Does FWIW, I do not see a problem with the extra code that this brings. We add several megabytes of code to netcoreapp every release. The problem I see is that the overall compression design is not trimming friendly. The moment you enable compression for your HttpClient, you get all compression algorithms in our portfolio in your (AOT compiled) binary - discussed at #123531 (comment) . |
Preparatory PR for #1542
libSystem.IO.Compression.Native.so size (Release)