oracle/graal · error · ValueError
Could not resolve 'graalos-config-util' from PATH!
Error message
Could not resolve 'graalos-config-util' from PATH!
What it means
Raised in _resolve_graalos_config_util: the graalos-config-util command line tool must be findable on PATH because the run stage shells out to it to generate the staged benchmark's endpoint config. If shutil.which('graalos-config-util') returns None, the harness raises ValueError immediately.
Source
Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2275
@staticmethod
def _require_executable(path: Path, description: str) -> Path:
if not path.is_file():
raise ValueError(f"{description} '{path}' does not exist!")
if not os.access(path, os.X_OK):
raise ValueError(f"{description} '{path}' is not executable!")
return path
@staticmethod
def _resolve_graalhost_binary(build_dir: Path) -> Path:
"""Resolve the GraalHost binary from the GraalOS build directory."""
return GraalHostPolyBenchStagingVm._require_executable(build_dir / "graalhost" / "graalhost", "GraalHost binary")
@staticmethod
def _resolve_graalos_config_util() -> Path:
"""Resolve the graalos-config-util CLI from PATH."""
config_util = shutil.which("graalos-config-util")
if config_util is None:
raise ValueError("Could not resolve 'graalos-config-util' from PATH!")
return GraalHostPolyBenchStagingVm._require_executable(Path(config_util).resolve(), "graalos-config-util")
def _get_staged_benchmark_run_config_path(self) -> Path:
return self.output_dir / "staged_benchmark_run_config.json"
@staticmethod
def _merge_graalhost_config_values(base: object, extra: object) -> object:
if isinstance(base, dict) and isinstance(extra, dict):
merged = dict(base)
for key, value in extra.items():
if key == "fsmappings" and isinstance(merged.get(key), list) and isinstance(value, list):
merged[key] = [*merged[key], *value]
elif key in merged:
merged[key] = GraalHostPolyBenchStagingVm._merge_graalhost_config_values(merged[key], value)
else:
merged[key] = value
return merged
return extraView on GitHub (pinned to a66e9ccd1d)
Solutions
- Install graalos-config-util (from the GraalOS tooling build) and verify 'which graalos-config-util'.
- Prepend its bin directory to PATH in the shell/CI step that invokes mx benchmark.
- Ensure the PATH export happens before mx spawns subprocesses (no per-command env stripping).
Example fix
# before $ mx benchmark polybench-graalhost # ValueError: could not resolve graalos-config-util # after $ export PATH="$GRAALOS_BUILD/tools/bin:$PATH" && mx benchmark polybench-graalhost
Defensive patterns
Strategy: validation
Validate before calling
import shutil
assert shutil.which('graalos-config-util'), 'graalos-config-util not on PATH; install it or extend PATH' Try / catch
try/except ValueError; report PATH and expected install location of graalos-config-util to the operator.
Prevention
- Add a 'which graalos-config-util' preflight to benchmark scripts.
- Install the tool into a directory already on PATH in CI images.
When it happens
Trigger: Running the GraalHost PolyBench run stage in an environment where the graalos-config-util package was never installed or its bin dir is not on PATH.
Common situations: Fresh CI images; PATH set inside a virtualenv/conda env that mx subprocesses do not inherit; tool installed only for another user.
Related errors
- Launcher '{self.launcher}' does not resolve to an executable
- Environment variable 'GRAALOS_BUILD' is unset! It must point
- Environment variable 'GRAALOS_BUILD' points to '{build_dir}'
- Environment variable 'ROOTFS' is unset! It must point to the
- Environment variable 'ROOTFS' points to '{rootfs}' which is
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/896ad2deb076ac83.
Report an issue: GitHub.