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

xz (Lzma) #1275

Closed
wants to merge 14 commits into from
Closed

xz (Lzma) #1275

wants to merge 14 commits into from

Conversation

Attempt3035
Copy link
Contributor

@Attempt3035 Attempt3035 commented Jan 6, 2024

Hi All!

I'm looking to get help adding the xz project (previously lzma) to bazel central registry. My main motivation for this is that I'm working on build rules for the entire Boost project for bzlmod, and one of the libraries has a dependency on lzma. I've adapted the lzma build rules from rules_boost (which is for the workspace system) and also based loosely on the cmake from the project source. The intent was to provide a way to use xz as a dependency in bzlmod that grabs from the original source and just applies a patch.

The current configuration passes all tests except the fuzz test, which I haven't currently got the experience to know how to get working (I just didn't have any of the fuzzing libs to be linked against). I've been testing on osx. A couple things I'm unsure of:

  • I haven't tested the tests on other operating systems
  • I haven't built projects using the lib apart from boost libraries, but it would be great if someone else could help verify everything is working in practice as well as unit tests
  • I'm not quite sure on what use cases there are for the xz, xzdec & lzmadec rules, as they would just build an executable to be run. I only see a need for the lzma rule to use as a library (which has a public api header, the others currently don't have it but maybe they should??), but wanted to add in the other targets for completeness.

Let me know any thoughts, or anything I need to work further on! Pretty new to this, so any tips or pointers are greatly appreciated :)

Edit:
Working on getting just the lzma lib working on all platforms, as I believe that would be the main useful part here, and I need someone with more experience to get the other targets working, if they are really needed at all?

@fmeum fmeum added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Jan 6, 2024
@dzbarsky
Copy link
Contributor

dzbarsky commented Jan 12, 2024

I have bazel configs for bsdtar and xz compression was one I couldn't get working, I can try looking against this version and see if that helps. Might take me a bit of time to try it out though

@Attempt3035
Copy link
Contributor Author

Sure thing! I'm pretty sure the lzma target works properly across all systems as it's closely adapted from what was being used at rules_boost with the workspace system. The issue with the build here is I just haven't got the copy command working for windows which copies the test files into the root directory so the tests can reference the paths properly. Setting up a windows vm so I can try things out much faster😝 As far as XZ, that would be really helpful if you did have it working and we could compare, I'm sure the xz target will be needed by someone at some point. As for bsdtar can't say I've used it, was mainly adding lzma as a prerequisite for #1280

@Attempt3035 Attempt3035 closed this by deleting the head repository Jan 16, 2024
@Attempt3035
Copy link
Contributor Author

Merging with PR #1280

@dzbarsky
Copy link
Contributor

dzbarsky commented Feb 9, 2024

@Attempt3035 hi is it possible to submit this as a module separately from #1280 if it works? I'd like to start using it even while #1280 is still in progress

@Attempt3035 Attempt3035 mentioned this pull request Feb 10, 2024
fmeum pushed a commit that referenced this pull request Feb 29, 2024
@dzbarsky 

Do you think the xz, xzdec and lzmadec targets are needed too? I had
them disabled as only lzma was building, but I think lzma is the only
target that gets linked into any builds and xz is just for building a
standalone binary? Let me know your thoughts and I'll clean up this pr
to finalise.

resolves #1275

---------

Co-authored-by: Yun Peng <pcloudy@google.com>
Co-authored-by: Vertexwahn <julian.amann@tum.de>
Wyverald pushed a commit to Wyverald/bazel-central-registry that referenced this pull request Mar 7, 2024
@dzbarsky 

Do you think the xz, xzdec and lzmadec targets are needed too? I had
them disabled as only lzma was building, but I think lzma is the only
target that gets linked into any builds and xz is just for building a
standalone binary? Let me know your thoughts and I'll clean up this pr
to finalise.

resolves bazelbuild#1275

---------

Co-authored-by: Yun Peng <pcloudy@google.com>
Co-authored-by: Vertexwahn <julian.amann@tum.de>
aiuto pushed a commit to aiuto/bazel-central-registry that referenced this pull request Jun 3, 2024
@dzbarsky 

Do you think the xz, xzdec and lzmadec targets are needed too? I had
them disabled as only lzma was building, but I think lzma is the only
target that gets linked into any builds and xz is just for building a
standalone binary? Let me know your thoughts and I'll clean up this pr
to finalise.

resolves bazelbuild#1275

---------

Co-authored-by: Yun Peng <pcloudy@google.com>
Co-authored-by: Vertexwahn <julian.amann@tum.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants