cross-rs/cross · error
toolchain ` ` may not run on image
Error message
toolchain `{toolchain}` may not run on image `{image}` What it means
Warning in run after setup: the selected image's platform architecture differs from the host architecture of the chosen toolchain (e.g. an aarch64 Docker image with an x86_64 toolchain), so the toolchain binaries may not execute inside the container even though the target itself is supported. Cross proceeds but warns that the combination is likely broken.
Solutions
- Pick a toolchain whose host architecture matches the image platform architecture
- Choose or build a cross image whose platform matches the toolchain host
- Use a toolchain installed inside the image rather than mounting a host-architecture toolchain
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/lib.rs:553 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cross-rs/cross@8c1a8aa4b6 (2026-09-13).
Data as JSON: /api/errors/e62118ad161aa4a5.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib.rs:553
toolchain,
is_remote,
engine,
image,
} = match setup(&host_version_meta, &metadata, &args, target_list, msg_info)? {
Some(setup) => setup,
_ => {
return Ok(None);
}
};
config.confusable_target(&target, msg_info)?;
let picked_generic_channel =
matches!(toolchain.channel.as_str(), "stable" | "beta" | "nightly");
if image.platform.target.is_supported(Some(&target)) {
if image.platform.architecture != toolchain.host().architecture {
msg_info.warn(format_args!(
"toolchain `{toolchain}` may not run on image `{image}`"
))?;
}
let mut is_nightly = toolchain.channel.contains("nightly");
let mut rustc_version = None;
if let Some((version, channel, commit)) = toolchain.rustc_version()? {
if picked_generic_channel && toolchain.date.is_none() {
warn_host_version_mismatch(
&host_version_meta,
&toolchain,
&version,
&commit,
msg_info,
)?;
}
is_nightly = channel == Channel::Nightly;
rustc_version = Some(version);
}View on GitHub (pinned to 8c1a8aa4b6)