{"record":{"id":"df00dc140bdcc9e9","repo":"oracle/graal","slug":"neither-dacapoclasspathenvvarname-variable-nor","errorCode":null,"errorMessage":"Neither {daCapoClasspathEnvVarName} variable nor {daCapoLibraryName} library specified.","messagePattern":"Neither (.+?) variable nor (.+?) library specified\\.","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2574,"sourceCode":"\n    def daCapoIterations(self):\n        raise NotImplementedError()\n\n    def daCapoSizes(self):\n        raise NotImplementedError()\n\n    def completeBenchmarkList(self, bmSuiteArgs):\n        return sorted([bench for bench in self.daCapoIterations().keys() if self.workloadSize() in self.daCapoSizes().get(bench, [])])\n\n    def existingSizes(self):\n        return list(dict.fromkeys([s for bench, sizes in self.daCapoSizes().items() for s in sizes]))\n\n    def workloadSize(self):\n        raise NotImplementedError()\n\n    def validateEnvironment(self):\n        if not self.daCapoPath():\n            raise RuntimeError(\n                \"Neither \" + self.daCapoClasspathEnvVarName() + \" variable nor \" +\n                self.daCapoLibraryName() + \" library specified.\")\n\n    def validateReturnCode(self, retcode):\n        return retcode == 0\n\n    def postprocessRunArgs(self, benchname, runArgs):\n        parser = argparse.ArgumentParser(add_help=False)\n        parser.add_argument(\"-n\", \"--iterations\", default=None)\n        parser.add_argument(\"-sf\", default=1, type=float, help=\"The total number of iterations is equivalent to the value selected by the '-n' flag scaled by this factor.\")\n        parser.add_argument(\"-s\", \"--size\", default=None)\n        args, remaining = parser.parse_known_args(runArgs)\n\n        if args.size:\n            if args.size not in self.existingSizes():\n                mx.abort(f\"Unknown workload size '{args.size}'. Existing benchmark sizes are: {','.join(self.existingSizes())}\")\n\n            if args.size != self.workloadSize():","sourceCodeStart":2556,"sourceCodeEnd":2592,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2556-L2592","documentation":"DaCapo benchmark suite environment validation failure. validateEnvironment() checks daCapoPath(); when neither the suite's DaCapo classpath environment variable (e.g. DACAPO_23_11_MR2_CHOPIN) nor the DaCapo mx library is available, the suite cannot locate the benchmark JARs and aborts.","triggerScenarios":"Running a DaCapo benchmark (mx benchmark dacapo-chopin:...) without the DaCapo classpath env var set and without the DaCapo library present/resolved in the mx suite's library dependencies.","commonSituations":"Fresh machine without the DaCapo archive downloaded; CI jobs that do not export the env var; suite.py library entry for DaCapo not loaded because the wrong suite is on the classpath.","solutions":["Set the DaCapo classpath environment variable for your suite version, e.g. export DACAPO_23_11_MR2_CHOPIN=/path/to/dacapo-23.11-MR2-chopin","Alternatively ensure the DaCapo library is declared and downloadable in the mx suite (mx benchmark resolves it via daCapoLibraryName()) so daCapoPath() returns the library location.","Verify with a quick check that the path/JAR actually exists before re-running the benchmark."],"exampleFix":"# before\nmx benchmark dacapo-chopin:fop   # env var unset, library absent\n\n# after\nexport DACAPO_23_11_MR2_CHOPIN=/opt/benchmarks/dacapo-23.11-MR2-chopin\nmx benchmark dacapo-chopin:fop","handlingStrategy":"validation","validationCode":"import os\nname = suite.daCapoClasspathEnvVarName()\nif not os.environ.get(name) and suite.daCapoLibraryName() is None:\n    raise SystemExit(f\"Set {name} or provide the {suite.daCapoLibraryName()} library before running DaCapo.\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Export the DaCapo env var in the shell profile / CI environment template.","Add a preflight env-var check to benchmark scripts before invoking mx.","Keep the DaCapo archive at a stable path referenced by the env var."],"tags":["graalvm","benchmark","dacapo","environment","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}