rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97k stars 12.54k forks source link

regression: linking with `cc` failed #130581

Open BoxyUwU opened 3 days ago

BoxyUwU commented 3 days ago

there was far more than just these listed crates that had linker errors. It seems like significantly more than prior crater runs which is odd

ChrisDenton commented 3 days ago

cc @NobodyXu in case you have any ideas

saethlin commented 3 days ago

Something very fishy is going on here. libwebp-sys is small, well-maintained and has quite a few downloads, so I'm looking into that.

cargo +beta build --tests fails as crater indicates. I've tried every nightly in 2024-08-XX and 2024-09-XX and all of them can build the crate's tests.

The cc version doesn't seem to matter, I've tried versions back to 1.0.50 which is years old.

saethlin commented 3 days ago

I also cannot reproduce these linker errors using a toolchain that I've built from the beta branch.

saethlin commented 3 days ago

Ah! My confusion is because nightly now uses lld by default, which is a good little linker and takes care of you even if you give it a confusing argument order.

saethlin commented 3 days ago

Bisects to https://github.com/rust-lang/rust/pull/128400

A crater run was done in that PR but the results were ignored because of the same confusion I ran into above https://github.com/rust-lang/rust/pull/128400#issuecomment-2278764127