Uh oh!
There was an error while loading. Please reload this page.
Add suggestions for "undefined reference" link errors - #86558
Conversation
rust-highfive
commented
Jun 22, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
If you get to the The |
petrochenkov
commented
Jun 30, 2021
You can add a test that will run only on Linux using the |
syvb
commented
Jun 30, 2021
@petrochenkov I've adjusted the error message to recommend The problem with lacking tests goes beyond the output changing between systems -- it's possible that the user has a linker that uses a different error format on their system. While the current version of GCC |
petrochenkov
commented
Jun 30, 2021
Ok, looks like we don't need to consider arbitrary future, even LLD produces a different message now: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Jun 30, 2021
r=me after updating the wording and squashing commits. |
petrochenkov
commented
Jun 30, 2021
@bors r+ rollup |
bors
commented
Jun 30, 2021
📌 Commit ce63d55 has been approved by |
…laumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#86558 (Add suggestions for "undefined reference" link errors) - rust-lang#86616 (rustc_span: Explicitly handle crates that differ from package names) - rust-lang#86652 (Add support for leaf function frame pointer elimination) - rust-lang#86666 (Fix misleading "impl Trait" error) - rust-lang#86762 (mailmap: Add my work email address) - rust-lang#86773 (Enable the tests developed with rust-lang#86594) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This adds a suggestion for "undefined reference to ..." linking errors to install or specify the location to an external library. Since there is no defined error format for linkers, we just check if there was a failure and if that failure contains the string
undefined reference to. This also makes it impossible to test this, since the output depends on the system linker. The output now looks like: