{"record":{"id":"b8a37dde0bd89cc3","repo":"nodejs/node","slug":"zoslib-includes-is-not-set-to-a-valid-location","errorCode":null,"errorMessage":"ZOSLIB_INCLUDES is not set to a valid location\n","messagePattern":"ZOSLIB_INCLUDES is not set to a valid location\n","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/install.py","lineNumber":376,"sourceCode":"\n  if 'true' == options.variables.get('node_use_openssl') and \\\n     'false' == options.variables.get('node_shared_openssl'):\n    subdir_files(options, 'deps/openssl/openssl/include/openssl', 'include/node/openssl/', action)\n    subdir_files(options, 'deps/openssl/config/archs', 'include/node/openssl/archs', action)\n    subdir_files(options, 'deps/openssl/config', 'include/node/openssl', action)\n\n  if 'false' == options.variables.get('node_shared_zlib'):\n    action(options, [\n      'deps/zlib/zconf.h',\n      'deps/zlib/zlib.h',\n    ], 'include/node/')\n\n  if sys.platform == 'zos':\n    zoslibinc = os.environ.get('ZOSLIB_INCLUDES')\n    if not zoslibinc:\n      raise RuntimeError('Environment variable ZOSLIB_INCLUDES is not set\\n')\n    if not os.path.isfile(zoslibinc + '/zos-base.h'):\n      raise RuntimeError('ZOSLIB_INCLUDES is not set to a valid location\\n')\n    subdir_files(options, zoslibinc, 'include/node/zoslib/', wanted_zoslib_headers)\n\ndef run(options):\n  if options.headers_only:\n    if options.command == 'install':\n      headers(options, install)\n      return\n    if options.command == 'uninstall':\n      headers(options, uninstall)\n      return\n  else:\n    if options.command == 'install':\n      files(options, install)\n      return\n    if options.command == 'uninstall':\n      files(options, uninstall)\n      return\n","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/install.py#L358-L394","documentation":"After confirming ZOSLIB_INCLUDES is set on z/OS, install.py checks that <ZOSLIB_INCLUDES>/zos-base.h is a real file. A value pointing at a non-existent or wrong directory is rejected so the header copy does not silently fail.","triggerScenarios":"ZOSLIB_INCLUDES is exported but the directory lacks zos-base.h (typo, wrong release, not yet installed, points at a build dir rather than the install dir).","commonSituations":"zoslib not yet built/installed; path points at the zoslib source root instead of its include dir; trailing slash or casing mistake on a case-sensitive filesystem.","solutions":["Install zoslib, then point ZOSLIB_INCLUDES at the include directory that holds zos-base.h.","Verify directly: `ls $ZOSLIB_INCLUDES/zos-base.h` must succeed.","Re-export the corrected value and rerun install."],"exampleFix":"// before\nexport ZOSLIB_INCLUDES=/opt/zoslib        # no zos-base.h here\n// after\nexport ZOSLIB_INCLUDES=/opt/zoslib/include  # contains zos-base.h\nls $ZOSLIB_INCLUDES/zos-base.h","handlingStrategy":"validation","validationCode":"import os, pathlib\nv=os.environ['ZOSLIB_INCLUDES']\nassert pathlib.Path(v,'zos-base.h').is_file(), f'{v}/zos-base.h not found'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate ZOSLIB_INCLUDES/zos-base.h exists before invoking install.","Point env vars at install (not build/source) directories."],"tags":["install","zos","environment","validation"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}