nodejs/node · error · NotImplementedError
stabs debug format is not supported yet.
Error message
stabs debug format is not supported yet.
What it means
Raised by XcodeSettings._GetDebuggingFlags when the build target's xcode_settings specify DEBUG_INFORMATION_FORMAT as 'stabs'. GYP's Xcode emulation only supports the 'dwarf' and 'dwarf-with-dsym' debug info formats; the legacy 'stabs' format was deprecated by Apple and is not implemented. This surfaces when generating a Makefile/ninja project from a .gyp file that carries stabs-format settings inherited from an old Xcode project.
Source
Thrown at tools/gyp/pylib/gyp/xcode_emulation.py:613
if self._Settings()["GCC_DYNAMIC_NO_PIC"] == "YES":
cflags.append("-mdynamic-no-pic")
else:
pass
# TODO: In this case, it depends on the target. xcode passes
# mdynamic-no-pic by default for executable and possibly static lib
# according to mento
if self._Test("GCC_ENABLE_PASCAL_STRINGS", "YES", default="YES"):
cflags.append("-mpascal-strings")
self._Appendf(cflags, "GCC_OPTIMIZATION_LEVEL", "-O%s", default="s")
if self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES"):
dbg_format = self._Settings().get("DEBUG_INFORMATION_FORMAT", "dwarf")
if dbg_format == "dwarf":
cflags.append("-gdwarf-2")
elif dbg_format == "stabs":
raise NotImplementedError("stabs debug format is not supported yet.")
elif dbg_format == "dwarf-with-dsym":
cflags.append("-gdwarf-2")
else:
raise NotImplementedError("Unknown debug format %s" % dbg_format)
if self._Settings().get("GCC_STRICT_ALIASING") == "YES":
cflags.append("-fstrict-aliasing")
elif self._Settings().get("GCC_STRICT_ALIASING") == "NO":
cflags.append("-fno-strict-aliasing")
if self._Test("GCC_SYMBOLS_PRIVATE_EXTERN", "YES", default="NO"):
cflags.append("-fvisibility=hidden")
if self._Test("GCC_TREAT_WARNINGS_AS_ERRORS", "YES", default="NO"):
cflags.append("-Werror")
if self._Test("GCC_WARN_ABOUT_MISSING_NEWLINE", "YES", default="NO"):
cflags.append("-Wnewline-eof")View on GitHub (pinned to 1b2de5e052)
Solutions
- Set DEBUG_INFORMATION_FORMAT to 'dwarf' in the target's xcode_settings (the modern default).
- If you need separate dSYM bundles, set DEBUG_INFORMATION_FORMAT to 'dwarf-with-dsym'.
- Remove the DEBUG_INFORMATION_FORMAT key entirely so it falls back to the 'dwarf' default.
- If you genuinely need stabs, you must patch xcode_emulation.py to add a cflags mapping for it, but this is not recommended.
Example fix
# before
'xcode_settings': {
'DEBUG_INFORMATION_FORMAT': 'stabs',
}
# after
'xcode_settings': {
'DEBUG_INFORMATION_FORMAT': 'dwarf',
} Defensive patterns
Strategy: validation
Validate before calling
# Before generating, validate xcode_settings debug format
fmt = target_config.get('xcode_settings', {}).get('DEBUG_INFORMATION_FORMAT')
if fmt == 'stabs':
raise ValueError('stabs is unsupported; use dwarf or dwarf-with-dsym') Try / catch
try:
gyp.ProcessFile(...)
except NotImplementedError as e:
if 'stabs' in str(e):
# fix config and retry
... Prevention
- Always set DEBUG_INFORMATION_FORMAT to 'dwarf' (or omit it) in modern gyp configs.
- Avoid importing legacy Xcode debug settings verbatim into gyp.
When it happens
Trigger: A gyp target configuration has xcode_settings containing 'DEBUG_INFORMATION_FORMAT': 'stabs' while GCC_GENERATE_DEBUGGING_SYMBOLS is 'YES' (or unset, since it defaults to YES). The _Appendcflags logic hits the elif branch for 'stabs' and raises NotImplementedError.
Common situations: Porting an old Xcode project (pre-LLDB era) into gyp where stabs was the default debug format. Copying legacy xcconfig settings into a .gyp file without modernizing them. Stabs has been effectively unsupported on macOS since the move to LLDB/dwarf.
Related errors
- Unknown debug format %s
- Xcode environment variables are cyclically dependent: ${node
- Multiple toolsets not supported in xcode build (target %s)
- xcodebuild returned unexpected results
- No Xcode or CLT version detected!
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/a2307c5e5c730e57.
Report an issue: GitHub.