You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possibly expected / not actually a problem, but probably good to figure out where this came from.
[INFO] [stdout] = note: /usr/bin/ld: /opt/rustwide/target/debug/deps/libwit_bindgen_rust-7b7d20e188069fd3.rlib(wit_bindgen_rust-7b7d20e188069fd3.wit_bindgen_rust.712e9c6990f0d8a7-cgu.0.rcgu.o): in function `canonical_abi_realloc':
[INFO] [stdout] /opt/rustwide/cargo-home/git/checkouts/wit-bindgen-e92a7091d4f51398/2f46ce4/crates/rust-wasm/src/lib.rs:134: multiple definition of `canonical_abi_realloc'; /opt/rustwide/target/debug/deps/libwit_bindgen_rust-742545eb826378e5.rlib(wit_bindgen_rust-742545eb826378e5.wit_bindgen_rust.ceb23070018b5742-cgu.0.rcgu.o):/opt/rustwide/cargo-home/git/checkouts/wit-bindgen-e92a7091d4f51398/e9c7c0a/crates/rust-wasm/src/lib.rs:134: first defined here
[INFO] [stdout] /usr/bin/ld: /opt/rustwide/target/debug/deps/libwit_bindgen_rust-7b7d20e188069fd3.rlib(wit_bindgen_rust-7b7d20e188069fd3.wit_bindgen_rust.712e9c6990f0d8a7-cgu.0.rcgu.o): in function `canonical_abi_free':
[INFO] [stdout] /opt/rustwide/cargo-home/git/checkouts/wit-bindgen-e92a7091d4f51398/2f46ce4/crates/rust-wasm/src/lib.rs:158: multiple definition of `canonical_abi_free'; /opt/rustwide/target/debug/deps/libwit_bindgen_rust-742545eb826378e5.rlib(wit_bindgen_rust-742545eb826378e5.wit_bindgen_rust.ceb23070018b5742-cgu.0.rcgu.o):/opt/rustwide/cargo-home/git/checkouts/wit-bindgen-e92a7091d4f51398/e9c7c0a/crates/rust-wasm/src/lib.rs:158: first defined here
Ah-ha! I tried a bunch of codegen-units settings and it looks like the reproducer is highly sensitive to the number of codegen-units used in building dependencies. That's probably why this error comes and goes sporadically.
The regressed crate is depending on multiple versions of wit-bindgen-rust, which has an rt module, which exports the canonical_abi_realloc and canonical_abi_free symbols.
So the bigger question here is how does this crate ever build?
I'm going to close this because the crate in question is simply buggy. In an ideal world we would be issuing a warning for this kind of situation; this is now the second time I've root-caused a crater link error regression to a crate which is mistakenly depending on two versions of a library that exports an unmangled symbol.
Activity
compiler-errors commentedon Mar 2, 2025
This may have been #137035 -- @Mark-Simulacrum, does the beta you're triaging include that PR or not? Not sure how the timing worked out.
saethlin commentedon Mar 2, 2025
I got some weird results when trying to bisect this. Looks like the build still fails on nightly so I don't think that PR is it.
Mark-Simulacrum commentedon Mar 2, 2025
Yeah, 137035 is included in beta (commit 42212a5 is what was tested here).
apiraino commentedon Mar 4, 2025
Assigning priority (discussion on Zulip).
@rustbot label -I-prioritize +P-high
saethlin commentedon Mar 5, 2025
The crate in question uses a proc macro, and with that expanded, I can minimize the crate to this:
with
Linkage minimizations are always trippy, so bear with me. We have a few layers to go.
saethlin commentedon Mar 5, 2025
Ah-ha! I tried a bunch of
codegen-unitssettings and it looks like the reproducer is highly sensitive to the number of codegen-units used in building dependencies. That's probably why this error comes and goes sporadically.saethlin commentedon Mar 5, 2025
Minimized a bit farther: (note that I turned spin-sdk into two of its transitive dependencies)
saethlin commentedon Mar 5, 2025
The regressed crate is depending on multiple versions of
wit-bindgen-rust, which has anrtmodule, which exports thecanonical_abi_reallocandcanonical_abi_freesymbols.So the bigger question here is how does this crate ever build?
saethlin commentedon Mar 5, 2025
I'm going to close this because the crate in question is simply buggy. In an ideal world we would be issuing a warning for this kind of situation; this is now the second time I've root-caused a crater link error regression to a crate which is mistakenly depending on two versions of a library that exports an unmangled symbol.
apiraino commentedon Mar 5, 2025
wow thanks @saethlin for the deep dive 👍
Should this crate be excluded from our crater runs?
@rustbot label -P-high
Ignore the regression from rust-lang/rust#137891
saethlin commentedon Mar 5, 2025
Yeah. Posted rust-lang/crater#766
Merge pull request #766 from saethlin/patch-1
Skip 2 crates