{"record":{"id":"e2ec3d43d07aa58b","repo":"oracle/graal","slug":"the-specjvm2008-environment-variable-was-not-speci","errorCode":null,"errorMessage":"The SPECJVM2008 environment variable was not specified.","messagePattern":"The SPECJVM2008 environment variable was not specified\\.","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":3260,"sourceCode":"            mx.abort(\"Please set the SPECJVM2008 environment variable to a \" +\n                     \"SPECjvm2008 directory.\")\n        jarname = \"SPECjvm2008.jar\"\n        jarpath = os.path.join(specjvm2008, jarname)\n        if not os.path.exists(jarpath):\n            mx.abort(\"The SPECJVM2008 environment variable points to a directory \" +\n                     \"without the SPECjvm2008.jar file.\")\n\n        # copy to newly-created temporary working directory\n        working_dir_jarpath =  os.path.abspath(os.path.join(self.workdir, jarname))\n        if not os.path.exists(working_dir_jarpath):\n            mx.log(\"copying \" + specjvm2008 + \" to \" + self.workdir)\n            shutil.copytree(specjvm2008, self.workdir, dirs_exist_ok=True)\n\n        return working_dir_jarpath\n\n    def validateEnvironment(self):\n        if not self.specJvmPath():\n            raise RuntimeError(\n                \"The SPECJVM2008 environment variable was not specified.\")\n\n    def validateReturnCode(self, retcode):\n        return retcode == 0\n\n    def createCommandLineArgs(self, benchmarks, bmSuiteArgs):\n        if benchmarks is None:\n            # No benchmark specified in the command line, so run everything.\n            benchmarks = self.benchmarkList(bmSuiteArgs)\n\n        vmArgs = self.vmArgs(bmSuiteArgs)\n        runArgs = self.runArgs(bmSuiteArgs)\n        if \"mpegaudio\" in benchmarks:\n            # GR-51015: run the benchmark on one thread\n            # as a workaround for mpegaudio concurrency issues.\n            mx.log(\"Setting benchmark threads to 1 due to race conditions in mpegaudio benchmark\")\n            runArgs += [\"-bt\", \"1\"]\n","sourceCodeStart":3242,"sourceCodeEnd":3278,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L3242-L3278","documentation":"SPECjvm2008 suite validation failure. validateEnvironment() requires specJvmPath() to be resolvable, which reads the SPECJVM2008 environment variable pointing at a directory containing SPECjvm2008.jar. Without it the suite has no benchmark code to run.","triggerScenarios":"Running 'mx benchmark specjvm2008:...' without SPECJVM2008 exported, or with it set to an empty string.","commonSituations":"CI machines where the proprietary SPECjvm2008 archive is not installed; new developers who have not downloaded SPECjvm2008 (license-restricted, not distributed with mx).","solutions":["Download SPECjvm2008 and export SPECJVM2008=/path/to/specjvm2008 (directory containing SPECjvm2008.jar).","Confirm the directory layout: $SPECJVM2008/SPECjvm2008.jar must exist (the jar name may need renaming from the distribution's name).","For CI, gate SPECjvm2008 jobs on presence of the env var and skip otherwise."],"exampleFix":"# before\nmx benchmark specjvm2008:compress   # SPECJVM2008 unset -> RuntimeError\n\n# after\nexport SPECJVM2008=/opt/benchmarks/specjvm2008\nmx benchmark specjvm2008:compress","handlingStrategy":"validation","validationCode":"import os, pathlib\np = os.environ.get(\"SPECJVM2008\")\nassert p and (pathlib.Path(p) / \"SPECjvm2008.jar\").exists(), (\n    \"SPECJVM2008 must point to a directory containing SPECjvm2008.jar\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate SPECjvm2008 CI jobs on the env var being set; skip with a warning instead of failing.","Document the expected directory layout (jar name included) next to benchmark instructions."],"tags":["graalvm","benchmark","specjvm2008","environment","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}