dotnet/runtime · error · RuntimeError
Unsupported OS.
Error message
Unsupported OS.
What it means
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.
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.
Example fix
// before python superpmi.py collect --core_root <r> -host_os darwin 'cmd' # 'Unsupported OS.' // after python superpmi.py collect --core_root <r> -host_os osx 'cmd'
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = {"osx", "linux", "windows"}
if host_os not in SUPPORTED:
raise SystemExit(f"collect requires -host_os in {sorted(SUPPORTED)}, got {host_os!r}") Type guard
def is_supported_collect_os(s: str) -> bool:
return s in {"osx", "linux", "windows"} Prevention
- Omit -host_os to rely on auto-detection.
- Confirm the matching collector shim exists in Core_Root for the chosen OS.
When it happens
Trigger: 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.
Common situations: Capitalized OS strings; using 'mac'/'darwin' instead of 'osx'; running on FreeBSD/other; misconfigured host_os override.
Related errors
- Expected a '.ilc.rsp' file for nativeaot, but got
- Pass only one tiering option.
- Tiering options have no effect for nativeaot collections.
- Tiering options have no effect for pmi or crossgen2…
- Unable to find input file in
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/c495c8ae29d59776.
Report an issue: GitHub.
Appendix: source
Thrown at src/coreclr/scripts/superpmi.py:693
Args:
coreclr_args (CoreclrArguments) : parsed args
"""
self.core_root = coreclr_args.core_root
if coreclr_args.host_os == "osx":
self.collection_shim_name = "libsuperpmi-shim-collector.dylib"
self.corerun_tool_name = "corerun"
elif coreclr_args.host_os == "linux":
self.collection_shim_name = "libsuperpmi-shim-collector.so"
self.corerun_tool_name = "corerun"
elif coreclr_args.host_os == "windows":
self.collection_shim_name = "superpmi-shim-collector.dll"
self.corerun_tool_name = "corerun.exe"
else:
raise RuntimeError("Unsupported OS.")
self.collection_shim_path = os.path.join(self.core_root, self.collection_shim_name)
jit_name = get_jit_name(coreclr_args)
self.jit_path = os.path.join(coreclr_args.core_root, jit_name)
self.superpmi_path = determine_superpmi_tool_path(coreclr_args)
self.mcs_path = determine_mcs_tool_path(coreclr_args)
self.collection_command = coreclr_args.collection_command
self.collection_args = coreclr_args.collection_args
if coreclr_args.pmi:
self.pmi_location = determine_pmi_location(coreclr_args)
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)
if coreclr_args.crossgen2:
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)View on GitHub (pinned to 60108ba66e)