-
Notifications
You must be signed in to change notification settings - Fork 77
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
Compile error on Windows 11 (and Github actions) when using libz-ng-sys 1.1.20 #225
Comments
Thanks for reporting.
The dependency specification in Did you try to Otherwise, the changes between the versions don't show anything obvious to me that could be causing these missing symbols: |
So I tried: I also tried on a separate Windows 10 VM and get the same issue. And as mentioned I get the same error when running the default Windows Github actions runner |
That's interesting! Could you minimize and contribute this setup? I think if that would happen here a release could have been prevented. And yes, the link error is due to the missing symbols, they look a bit strange and are very basic, maybe they have been renamed somehow. By default, compilation succeeds though, the CI here works fine, so maybe there is more to the particular setup needed to trigger the issue. PS: If you could share the project/code I could try to compile it on my machine, maybe it's a similar issue there. |
The project repo - https://github.com/puffyCid/artemis
GitHub Actions Windows runner failure - https://github.com/puffyCid/artemis/actions/runs/11547850661/job/32138376614 As look at it more, I think this may be related to one of my tests or something. Cargo is able to build the project fine via cargo build I will continue to investigate, but if you like to try to compiling the project, the server workspace does require some additional tools besides Rust:
If you clone the repo there a Steps to reproduce issue
|
After building just the WASM part which gets done after running
So it seems to be something Windows specific. Here is my Cargo.lock after the update. diff --git a/Cargo.lock b/Cargo.lock
index 96953d8..1bc25f4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2126,9 +2126,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
-version = "2.3.0"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
+checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210"
dependencies = [
"fastrand",
"futures-core",
@@ -2625,9 +2625,9 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
dependencies = [
"bytes",
"futures-channel",
@@ -3119,9 +3119,9 @@ dependencies = [
[[package]]
name = "libm"
-version = "0.2.9"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bda4c6077b0b08da2c48b172195795498381a7c8988c9e6212a6c55c5b9bd70"
+checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
[[package]]
name = "libredox"
@@ -3146,9 +3146,9 @@ dependencies = [
[[package]]
name = "libz-ng-sys"
-version = "1.1.16"
+version = "1.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4436751a01da56f1277f323c80d584ffad94a3d14aecd959dd0dff75aa73a438"
+checksum = "8f0f7295a34685977acb2e8cc8b08ee4a8dffd6cf278eeccddbe1ed55ba815d5"
dependencies = [
"cmake",
"libc",
@@ -4450,9 +4450,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "reqwest"
-version = "0.12.8"
+version = "0.12.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b"
+checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [
"base64 0.22.1",
"bytes",
@@ -4678,9 +4678,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.15"
+version = "0.23.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993"
+checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e"
dependencies = [
"once_cell",
"rustls-pki-types",
@@ -4857,9 +4857,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.213"
+version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
+checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5"
dependencies = [
"serde_derive",
]
@@ -4877,9 +4877,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.213"
+version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
+checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766"
dependencies = [
"proc-macro2",
"quote", |
Understood thanks for checking Thanks! |
For reference, we're seeing the same thing in uv, though I haven't had a chance to debug it yet: https://github.com/astral-sh/uv/actions/runs/11598373662/job/32295408945?pr=8703#step:6:194 |
@Byron, I have this same issue as well. Here's an example project where it happens: https://github.com/git-g00d/zip-test/tree/main. The project is set to use v1.1.20 by default and will fail to compile like others mentioned. If you set the lib-ng-sys version to "=1.1.16" in the Cargo.toml, it compiles without issue. Also, if you force statically linking to the C runtime for Windows, which @puffyCid has in their project's ./cargo/config.toml, then lib-ng-sys will fail to compile when using v1.1.20. If you remove this static linking, then the code compiles successfully. As a side note, if you build for release, you'll get the 3 or so errors that @puffyCid mentioned:
And if building for debug, you get another error (4 in total) and a lot more warnings:
If you cannot reproduce the things I have mentioned with the zip-test project, then let me know and I'll be happy to help. |
Thanks for researching this! I hear that when compiling with static CRT on Windows one will see these results. Once again, the changes between the two releases only indicate relevant changes in zlib-ng, for all I can tell, so that's probably where the breakage was introduced. Maybe you would be able to reproduce the issue in their test-suite by trying to add the static-CRT flag, and from there I'd think a fix should be doable upstream. Of course, the same could be done here if you think the problem was introduced here. |
Ah, sorry I missed that detail earlier, I'll see if I can do that |
I noticed miniz_oxide appears in perf samples. While miniz_oxide is safer, I think zlib-ng is pretty reliable. https://docs.rs/gix/latest/gix/#performance libz-ng-sys is downgraded to 1.1.16 due to the Windows linking issue. The benchmark result is obtained with libz-ng-sys 1.1.20. rust-lang/libz-sys#225 ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ 'target/release-with-debug/{bin} --ignore-working-copy log README.md' Benchmark 1: target/release-with-debug/jj-0 .. Time (mean ± σ): 256.6 ms ± 4.3 ms [User: 214.1 ms, System: 38.6 ms] Range (min … max): 245.4 ms … 261.2 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 .. Time (mean ± σ): 223.0 ms ± 4.2 ms [User: 174.7 ms, System: 44.4 ms] Range (min … max): 212.4 ms … 225.8 ms 10 runs ```
I noticed miniz_oxide appears in perf samples. While miniz_oxide is safer, I think zlib-ng is pretty reliable. https://docs.rs/gix/latest/gix/#performance libz-ng-sys is downgraded to 1.1.16 due to the Windows linking issue. The benchmark result is obtained with libz-ng-sys 1.1.20. rust-lang/libz-sys#225 ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ 'target/release-with-debug/{bin} --ignore-working-copy log README.md' Benchmark 1: target/release-with-debug/jj-0 .. Time (mean ± σ): 256.6 ms ± 4.3 ms [User: 214.1 ms, System: 38.6 ms] Range (min … max): 245.4 ms … 261.2 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 .. Time (mean ± σ): 223.0 ms ± 4.2 ms [User: 174.7 ms, System: 44.4 ms] Range (min … max): 212.4 ms … 225.8 ms 10 runs ```
I noticed miniz_oxide appears in perf samples. While miniz_oxide is safer, I think zlib-ng is pretty reliable. https://docs.rs/gix/latest/gix/#performance libz-ng-sys is downgraded to 1.1.16 due to the Windows linking issue. The benchmark result is obtained with libz-ng-sys 1.1.20. rust-lang/libz-sys#225 ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ 'target/release-with-debug/{bin} --ignore-working-copy log README.md' Benchmark 1: target/release-with-debug/jj-0 .. Time (mean ± σ): 256.6 ms ± 4.3 ms [User: 214.1 ms, System: 38.6 ms] Range (min … max): 245.4 ms … 261.2 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 .. Time (mean ± σ): 223.0 ms ± 4.2 ms [User: 174.7 ms, System: 44.4 ms] Range (min … max): 212.4 ms … 225.8 ms 10 runs ```
I noticed miniz_oxide appears in perf samples. While miniz_oxide is safer, I think zlib-ng is pretty reliable. https://docs.rs/gix/latest/gix/#performance libz-ng-sys is downgraded to 1.1.16 due to the Windows linking issue. The benchmark result is obtained with libz-ng-sys 1.1.20. rust-lang/libz-sys#225 ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ 'target/release-with-debug/{bin} --ignore-working-copy log README.md' Benchmark 1: target/release-with-debug/jj-0 .. Time (mean ± σ): 256.6 ms ± 4.3 ms [User: 214.1 ms, System: 38.6 ms] Range (min … max): 245.4 ms … 261.2 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 .. Time (mean ± σ): 223.0 ms ± 4.2 ms [User: 174.7 ms, System: 44.4 ms] Range (min … max): 212.4 ms … 225.8 ms 10 runs ```
I noticed miniz_oxide appears in perf samples. While miniz_oxide is safer, I think zlib-ng is pretty reliable. https://docs.rs/gix/latest/gix/#performance libz-ng-sys is downgraded to 1.1.16 due to the Windows linking issue. The benchmark result is obtained with libz-ng-sys 1.1.20. rust-lang/libz-sys#225 ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-0,jj-1 \ 'target/release-with-debug/{bin} --ignore-working-copy log README.md' Benchmark 1: target/release-with-debug/jj-0 .. Time (mean ± σ): 256.6 ms ± 4.3 ms [User: 214.1 ms, System: 38.6 ms] Range (min … max): 245.4 ms … 261.2 ms 10 runs Benchmark 2: target/release-with-debug/jj-1 .. Time (mean ± σ): 223.0 ms ± 4.2 ms [User: 174.7 ms, System: 44.4 ms] Range (min … max): 212.4 ms … 225.8 ms 10 runs ```
👋 Hello I am getting an odd compile error when trying version 1.1.20 for libz-ng-sys. I was updating dependencies for my project. I ran
cargo update
which updated libz-ng-sys to 1.1.20. When I then tried to compile my project I get the error below on Windows:I downgraded back to version 1.1.16 and my project compiles fine again. I use flate2-rs in my project and I noticed it still uses 1.1.16. So this may be an issue of using
cargo update
too hastily?I just wanted to check if I need to install another dependency similar to cmake?
Let me know if more info is required
The text was updated successfully, but these errors were encountered: