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

link error: undefined reference to `<T as core::convert::From<T>>::from' #87992

Closed
Tracked by #87749
tmandry opened this issue Aug 12, 2021 · 6 comments
Closed
Tracked by #87749
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tmandry
Copy link
Member

tmandry commented Aug 12, 2021

From the 1.55 crater run #87749, while building the crate issue-macros-0.1.4:

[INFO] [stdout]   = note: /usr/bin/ld: /opt/rustwide/target/debug/deps/issue_macros-597542d719c97701.issue_macros.be0037e3-cgu.4.rcgu.o: in function `<T as core::convert::Into<U>>::into':
[INFO] [stdout]           /rustc/53fd98ca776cb875bc9e5514f56b52eb74f9e7a9/library/core/src/convert/mod.rs:540: undefined reference to `<T as core::convert::From<T>>::from'
[INFO] [stdout]           collect2: error: ld returned 1 exit status

Full log

This doesn't happen in 1.54. I'm not sure what's going on yet, next step is probably to reproduce locally.

Possibly related to #87002 (but that's for 1.54 and is fixed in 1.55)

@tmandry tmandry added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 12, 2021
@apiraino
Copy link
Contributor

@tmandry I was curious to bisect this, but I can't find a code repository for the crate issue-macro. Any idea? thanks :)

@Friz64
Copy link

Friz64 commented Aug 13, 2021

It's macros in https://github.com/KaiserKarel/issue-rs.

@apiraino
Copy link
Contributor

apiraino commented Aug 13, 2021

ah thanks. I've bisected with cargo test (because cargo build does not trigger the crash) and the bisection seems to point to nightly-2021-08-11 but the tarball is not yet available (will update this comment later).

EDIT: bisection results seems to point to commit 4e90017

searched nightlies: from nightly-2021-08-01 to nightly-2021-08-16
regressed nightly: nightly-2021-08-13
searched commits: from ccffcaf to 0fa3190
regressed commit: 4e90017

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2021-08-01 --script=./test.sh 

@tmiasko
Copy link
Contributor

tmiasko commented Aug 13, 2021

With -Clink-args=-Wl,--no-demangle and extra logging one can determine that undefined symbol is supposed to be provided by the hyper crate. The hyper crate is linked as dylib, at the same time in it was build only as crate-type = ["lib", "staticlib", "cdylib"]. The problem seems to be that cdylib is being misidentified by crate locator as dylib.

The issue appears to be pre-existing and merely exposed by changes in the standard library. Seems like a duplicate of #82972.

@tmandry tmandry mentioned this issue Aug 19, 2021
7 tasks
@apiraino
Copy link
Contributor

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 19, 2021
@Mark-Simulacrum
Copy link
Member

Closing as essentially a duplicate of #82972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-medium Medium priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants