{"record":{"id":"e62118ad161aa4a5","repo":"cross-rs/cross","slug":"toolchain-toolchain-may-not-run-on-image-image","errorCode":null,"errorMessage":"toolchain `{toolchain}` may not run on image `{image}`","messagePattern":"toolchain `(.+?)` may not run on image `(.+?)`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib.rs","lineNumber":553,"sourceCode":"            toolchain,\n            is_remote,\n            engine,\n            image,\n        } = match setup(&host_version_meta, &metadata, &args, target_list, msg_info)? {\n            Some(setup) => setup,\n            _ => {\n                return Ok(None);\n            }\n        };\n\n        config.confusable_target(&target, msg_info)?;\n\n        let picked_generic_channel =\n            matches!(toolchain.channel.as_str(), \"stable\" | \"beta\" | \"nightly\");\n\n        if image.platform.target.is_supported(Some(&target)) {\n            if image.platform.architecture != toolchain.host().architecture {\n                msg_info.warn(format_args!(\n                    \"toolchain `{toolchain}` may not run on image `{image}`\"\n                ))?;\n            }\n            let mut is_nightly = toolchain.channel.contains(\"nightly\");\n            let mut rustc_version = None;\n            if let Some((version, channel, commit)) = toolchain.rustc_version()? {\n                if picked_generic_channel && toolchain.date.is_none() {\n                    warn_host_version_mismatch(\n                        &host_version_meta,\n                        &toolchain,\n                        &version,\n                        &commit,\n                        msg_info,\n                    )?;\n                }\n                is_nightly = channel == Channel::Nightly;\n                rustc_version = Some(version);\n            }","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/cross-rs/cross/blob/8c1a8aa4b661711f4b7b6ac07c2e8929ce2f7d27/src/lib.rs#L535-L571","documentation":"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.","triggerScenarios":"Thrown at src/lib.rs:553 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c1a8aa4b661711f4b7b6ac07c2e8929ce2f7d27","analyzedAt":"2026-09-13T15:10:43.988Z","contentChangedAt":"2026-09-13T15:10:43.988Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}