Closed
Description
This is a recent regression, starting with #124129: when --sysroot
is set, in my case to /home/r/.cache/cargo-careful
where I have prepared a locally built sysroot (that's https://github.com/RalfJung/cargo-careful), then rustc now assumes it can find the linker in the sysroot, which does not work. See RalfJung/cargo-careful#31 for some more details.
It is new to me that the sysroot is supposed to contain the linker as well, is that expected behavior?
Also the error message in that case is really unhelpful.^^
= note: collect2: fatal error: cannot find 'ld'
compilation terminated.
Maybe rustc should check that the path it sets for -B
actually exists before starting cc
?