-
Notifications
You must be signed in to change notification settings - Fork 13.3k
regression: rust-lld: error: duplicate symbol: crc32␍
etc. on x86_64-pc-windows-msvc
for tests depending on crate libz-sys
#139821
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
Comments
This comment has been minimized.
This comment has been minimized.
rust-lld: error: duplicate symbol: crc32␍
etc. on x86_64-pc-windows-msvc
for tests depending on crate libz-sys-1.1.19
rust-lld: error: duplicate symbol: crc32␍
etc. on x86_64-pc-windows-msvc
for tests depending on crate libz-sys-1.1.19
rust-lld: error: duplicate symbol: crc32␍
etc. on x86_64-pc-windows-msvc
for tests depending on crate libz-sys-1.1.19
rust-lld: error: duplicate symbol: crc32␍
etc. on x86_64-pc-windows-msvc
for tests depending on crate libz-sys
Not going past 2024-04-05 due to rustc linker regression on windows: rust-lang/rust#139821
I redid the bisection on searched nightlies: from nightly-2025-04-05 to nightly-2025-04-10 bisected with cargo-bisect-rustc v0.6.9Host triple: x86_64-pc-windows-msvc cargo bisect-rustc --end=2025-04-10 --regress=error --host=x86_64-pc-windows-gnu --target=x86_64-pc-windows-gnu -vv -- test -p hydro_deploy |
cc @folkertdev |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The cargo bump PR doesn't seem to contain the flate2 update. |
This comment has been minimized.
This comment has been minimized.
This linker error is exactly the opposite. The linker complains about duplicate definitions, not missing definitions. One of them is from libz-rs-sys, but the cargo update PR doesn't yet have libz-rs-sys in its Cargo.lock. Ah, this is not for building cargo. This is for a project that depends on cargo as library. You may need to update to flate2 1.1.1 which is the first version using libz-rs-sys 0.5 that avoids symbol conflicts. |
Ah... |
Current cargo does have the right version of flate2: https://github.com/rust-lang/cargo/blob/7918c7eb59614c39f1c4e27e99d557720976bdd7/Cargo.toml#L48 So I suspect this just fixed itself as things got updated? |
I can confirm this issue is no longer happening on rust version |
Since this is fixed and we have an explanation for how I think this can just be closed now, thanks! It can always be re-opened if something else comes up. |
Ok I may have jumped the gun on this, seems it still happens on the windows gh-actions runner even though it doesn't on my desktop, I'll try to make a minimal reproducer |
I'll reopen in the meantime. |
Trying to compile on latest nightlies (see bisect below) emits many of the following error within libz-sys:
error output
bisect
searched nightlies: from nightly-2025-03-10 to nightly-2025-04-14
regressed nightly: nightly-2025-04-06
searched commit range: 17ffbc8...5e17a2a
regressed commit: 0e9c3e5
bisected with cargo-bisect-rustc v0.6.9
Host triple: x86_64-pc-windows-msvc
Reproduce with:
cargo bisect-rustc --start=2025-03-10 --end=2025-04-14 -- test -p hydro_deploy
cargo.lock snippet
Code
I don't have a MRE at this time, code is here: https://github.com/hydro-project/hydro/tree/lld-error-2025-04
Only building via
cargo test
fails,cargo build
succeeds:cargo test -p hydro_deploy
The text was updated successfully, but these errors were encountered: