{"record":{"id":"c495c8ae29d59776","repo":"dotnet/runtime","slug":"unsupported-os","errorCode":null,"errorMessage":"Unsupported OS.","messagePattern":"Unsupported OS\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":693,"sourceCode":"\n        Args:\n            coreclr_args (CoreclrArguments) : parsed args\n\n        \"\"\"\n\n        self.core_root = coreclr_args.core_root\n\n        if coreclr_args.host_os == \"osx\":\n            self.collection_shim_name = \"libsuperpmi-shim-collector.dylib\"\n            self.corerun_tool_name = \"corerun\"\n        elif coreclr_args.host_os == \"linux\":\n            self.collection_shim_name = \"libsuperpmi-shim-collector.so\"\n            self.corerun_tool_name = \"corerun\"\n        elif coreclr_args.host_os == \"windows\":\n            self.collection_shim_name = \"superpmi-shim-collector.dll\"\n            self.corerun_tool_name = \"corerun.exe\"\n        else:\n            raise RuntimeError(\"Unsupported OS.\")\n\n        self.collection_shim_path = os.path.join(self.core_root, self.collection_shim_name)\n\n        jit_name = get_jit_name(coreclr_args)\n        self.jit_path = os.path.join(coreclr_args.core_root, jit_name)\n\n        self.superpmi_path = determine_superpmi_tool_path(coreclr_args)\n        self.mcs_path = determine_mcs_tool_path(coreclr_args)\n\n        self.collection_command = coreclr_args.collection_command\n        self.collection_args = coreclr_args.collection_args\n\n        if coreclr_args.pmi:\n            self.pmi_location = determine_pmi_location(coreclr_args)\n            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)\n\n        if coreclr_args.crossgen2:\n            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)","sourceCodeStart":675,"sourceCodeEnd":711,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L675-L711","documentation":"Raised by SuperPMICollect.__init__ in superpmi.py when coreclr_args.host_os is not 'osx', 'linux', or 'windows'. The constructor uses host_os to pick the collector shim name (libsuperpmi-shim-collector.{dylib,so,dll}) and corerun tool; an unrecognized OS has no shim mapping.","triggerScenarios":"Running `superpmi.py collect` with -host_os set to an unsupported/typo value, or on a host whose detected OS string the script does not recognize.","commonSituations":"Capitalized OS strings; using 'mac'/'darwin' instead of 'osx'; running on FreeBSD/other; misconfigured host_os override.","solutions":["Pass -host_os as exactly osx, linux, or windows.","Let the script auto-detect by omitting -host_os.","Confirm the collector shim for your OS actually exists in Core_Root before relying on it."],"exampleFix":"// before\npython superpmi.py collect --core_root <r> -host_os darwin 'cmd'   # 'Unsupported OS.'\n// after\npython superpmi.py collect --core_root <r> -host_os osx 'cmd'","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"osx\", \"linux\", \"windows\"}\nif host_os not in SUPPORTED:\n    raise SystemExit(f\"collect requires -host_os in {sorted(SUPPORTED)}, got {host_os!r}\")","typeGuard":"def is_supported_collect_os(s: str) -> bool:\n    return s in {\"osx\", \"linux\", \"windows\"}","tryCatchPattern":null,"preventionTips":["Omit -host_os to rely on auto-detection.","Confirm the matching collector shim exists in Core_Root for the chosen OS."],"tags":["superpmi","collect","os-detection","argument-validation","python"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}