{"record":{"id":"b16aa0e0414028be","repo":"rust-lang/rust","slug":"unrecognized-host-architecture-machine","errorCode":null,"errorMessage":"Unrecognized host architecture {machine}","messagePattern":"Unrecognized host architecture (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"src/ci/docker/scripts/fuchsia-test-runner.py","lineNumber":335,"sourceCode":"            \"host\",\n            \"stage2\",\n            \"lib\",\n        )\n\n    def rustlibs_dir(self) -> Path:\n        return self.libs_dir().joinpath(\n            \"rustlib\",\n            self.target,\n            \"lib\",\n        )\n\n    def sdk_arch(self):\n        machine = platform.machine()\n        if machine == \"x86_64\":\n            return \"x64\"\n        if machine == \"arm\":\n            return \"a64\"\n        raise Exception(f\"Unrecognized host architecture {machine}\")\n\n    def tool_path(self, tool) -> Path:\n        return Path(self.sdk_dir).joinpath(\"tools\", self.sdk_arch(), tool)\n\n    def host_arch_triple(self):\n        machine = platform.machine()\n        if machine == \"x86_64\":\n            return \"x86_64-unknown-linux-gnu\"\n        if machine == \"arm\":\n            return \"aarch64-unknown-linux-gnu\"\n        raise Exception(f\"Unrecognized host architecture {machine}\")\n\n    def zxdb_script_path(self) -> Path:\n        return Path(self.tmp_dir(), \"zxdb_script\")\n\n    @property\n    def ffx_daemon_log_path(self):\n        return self.tmp_dir().joinpath(\"ffx_daemon_log\")","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/ci/docker/scripts/fuchsia-test-runner.py#L317-L353","documentation":"Raised by TestEnvironment.sdk_arch() when platform.machine() returns a value other than 'x86_64' or 'arm'. sdk_arch() maps the host machine to the SDK's arch subdirectory name ('x64' / 'a64'), which is used to locate ffx and other SDK host tools. An unrecognized machine means the SDK layout for that host is unknown.","triggerScenarios":"Any call path that resolves an SDK host tool path (tool_path at line 337, used pervasively) on a machine where platform.machine() returns e.g. 'aarch64', 'arm64', 'riscv64', or 'ppc64le'.","commonSituations":"Running on Apple Silicon or native aarch64 Linux where platform.machine() returns 'aarch64' (not 'arm'); running under QEMU emulation that reports an unexpected machine string; running on RISC-V or other unsupported hosts.","solutions":["Run the script on x86_64 or on a 32-bit arm host (the two currently mapped values).","Patch sdk_arch() to also map 'aarch64' -> 'a64' (and/or 'arm64') if your SDK ships those host tools.","Cross-check the SDK's tools/ directory to see which arch subdirs actually exist and add the matching branch.","If emulated, set the platform via an environment that reports x86_64 or run under an x86_64 container."],"exampleFix":"// before (fuchsia-test-runner.py:329)\n    def sdk_arch(self):\n        machine = platform.machine()\n        if machine == \"x86_64\":\n            return \"x64\"\n        if machine == \"arm\":\n            return \"a64\"\n        raise Exception(f\"Unrecognized host architecture {machine}\")\n\n// after\n    def sdk_arch(self):\n        machine = platform.machine()\n        if machine in (\"x86_64\", \"amd64\"):\n            return \"x64\"\n        if machine in (\"arm\", \"aarch64\", \"arm64\"):\n            return \"a64\"\n        raise Exception(f\"Unrecognized host architecture {machine}\")","handlingStrategy":"validation","validationCode":"import platform\nSUPPORTED_SDK_ARCH = {\"x86_64\": \"x64\", \"arm\": \"a64\"}\n\nmachine = platform.machine()\nif machine not in SUPPORTED_SDK_ARCH:\n    raise SystemExit(\n        f\"Host {machine!r} unsupported; supported: {sorted(SUPPORTED_SDK_ARCH)}. \"\n        \"Run on x86_64/arm or extend sdk_arch().\"\n    )\n# safe to call sdk_arch()\nenv.sdk_arch()","typeGuard":"def is_supported_sdk_host(machine: str) -> bool:\n    return machine in (\"x86_64\", \"arm\")","tryCatchPattern":"try:\n    arch = env.sdk_arch()\nexcept Exception as e:\n    if \"Unrecognized host architecture\" in str(e):\n        sys.exit(f\"Run on x86_64 or arm; this host is unsupported by the Fuchsia SDK layout.\")\n    raise","preventionTips":["Run the Fuchsia test runner on x86_64 (or arm) hosts only.","If you need aarch64 hosts, patch sdk_arch() and contribute the mapping upstream.","Check platform.machine() in CI matrix configuration to fail fast on unsupported hosts."],"tags":["fuchsia","architecture","platform","sdk"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}