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

No zstd toolchain provided for Windows - blocks usage of downstream rulesets (e.g. rules_oci) on Windows #964

Open
jasonbdly opened this issue Oct 14, 2024 · 5 comments

Comments

@jasonbdly
Copy link

I discovered this issue while attempting to adopt the rules_oci package for building container images.

In short, it looks like a Windows toolchain for zstd is not provided by this package, so any downstream rulesets that use zstd compression (such as for image layers) aren't functional on Windows: https://github.com/bazel-contrib/bazel-lib/blob/main/lib/private/zstd_toolchain.bzl#L31-L46

I noticed that the zstd-prebuilt repo doesn't attempt to build zstd for Windows at all: https://github.com/aspect-build/zstd-prebuilt/blob/main/BUILD.bazel#L3-L7

Is this something that could be supported, but there's some sort of blocker to providing that support?
I'm just hoping to gain some context around this, enough that I could start poking around and hopefully submit a PR that adds that support.

@thesayyn
Copy link
Collaborator

zstd windows builds are non existent, last time i tried i could not get it to cross compile. We probably need to do something similar to aspect-build/bsdtar-prebuilt#6 in https://github.com/aspect-build/zstd-prebuilt/tree/main

@thesayyn
Copy link
Collaborator

Okay now that i got a decent windows machine, i can look into this.

@thesayyn
Copy link
Collaborator

Okay i was able to build zstd on windows; bazelbuild/bazel-central-registry#3237

PS C:\Users\Sahin\Documents\zstd-prebuilt> bazel-bin/external/zstd~/programs/zstd.exe
stdin is a console, aborting

@thesayyn
Copy link
Collaborator

Cool: i was able to successfully build this on CI: https://github.com/aspect-build/zstd-prebuilt/actions/runs/11961976398/job/33349361591?pr=1#step:3:70

@peakschris
Copy link

We are also impacted by this on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants