You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just spent a about an hour debugging a build failure in the rustc workspace that boils down to this issue:
the anyhow build script uses a build probe to determine if it can use std::backtracke::Backtrace.
if the TARGET env var is set, it runs the build probe with --target passed to rustc, meaning this is conceptually a target build (this is the right thing to do, it is needed to make build probes work in cross-compilation settings when anyhow is used by the target code)
however, since anyhow is a dependency of a build dependency, we actually need to know if the build probe would succeed on the host
In the case of bootstrap, the target sysroot has the backtrace feature stable but the host (beta) sysroot does not. So this means that anyhow enables the backtrace feature and later fails to use the backtrace feature.
I think it is a cargo bug that the TARGET env var is set for a build script that does not run on the target. Cargo should unset that env var for host build script builds.