-
Notifications
You must be signed in to change notification settings - Fork 13.3k
regression: duplicate symbol definition #137891
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 may have been #137035 -- @Mark-Simulacrum, does the beta you're triaging include that PR or not? Not sure how the timing worked out. |
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. |
Yeah, 137035 is included in beta (commit 42212a5 is what was tested here). |
The crate in question uses a proc macro, and with that expanded, I can minimize the crate to this: use spin_sdk;
#[export_name = "handle-http-request"]
unsafe extern "C" fn __wit_bindgen_handle_http_request() {
let layout = core::alloc::Layout::from_size_align_unchecked(1, 1);
let result = std::alloc::alloc(layout);
if result.is_null() {}
wit_bindgen_rust::rt::as_i32(0);
std::hint::black_box(RET_AREA);
}
static RET_AREA: u8 = 0; with [lib]
crate-type = [ "cdylib" ]
[dependencies]
spin-sdk = { git = "https://github.com/fermyon/spin", tag = "v0.3.0" }
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "e9c7c0a3405845cecd3fe06f3c20ab413302fc73" } Linkage minimizations are always trippy, so bear with me. We have a few layers to go. |
Ah-ha! I tried a bunch of |
Minimized a bit farther: (note that I turned spin-sdk into two of its transitive dependencies) use spin_sdk;
#[export_name = "handle-http-request"]
pub unsafe extern "C" fn __wit_bindgen_handle_http_request() {
let layout = core::alloc::Layout::from_size_align_unchecked(1, 1);
let result = std::alloc::alloc(layout);
if result.is_null() {}
wit_bindgen_rust::rt::as_i32(0);
} [lib]
crate-type = [ "cdylib" ]
[dependencies]
anyhow = "1" # required ???
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "e9c7c0a3405845cecd3fe06f3c20ab413302fc73" }
spin-sdk = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "2f46ce4cc072107153da0cefe15bdc69aa5b84d0", package = "wit-bindgen-rust" } |
The regressed crate is depending on multiple versions of 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. |
Yeah. Posted rust-lang/crater#766 |
Ignore the regression from rust-lang/rust#137891
https://crater-reports.s3.amazonaws.com/beta-1.86-3/beta-2025-02-28/gh/ns6251.spin-cookie-token-sample/log.txt
Possibly expected / not actually a problem, but probably good to figure out where this came from.
The text was updated successfully, but these errors were encountered: