Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Linker invocation failed

plc could not spawn the linker subprocess, or the OS rejected the assembled command line before the linker had a chance to run.

The diagnostic body includes the linker that was selected, the number of arguments, the assembled command-line length in bytes, and the longest single argument (and its value). These numbers usually point at the cause.

Common causes:

  • Windows CreateProcess command-line limit (32,767 bytes; 8,191 if the spawn went through cmd.exe). Visible as os error 206. plc already routes long command lines through a @response_file to avoid this, but the response file can itself fail if the temp directory is unwritable — consult any preceding warn log lines.
  • Windows MAX_PATH (260 chars) on a single path argument without the \\?\ prefix. Also surfaces as os error 206. Shorten paths or relocate the build closer to the drive root.
  • Linker binary not on PATH / not executable. os error 2 or os error 13. Check which <linker> or pass --linker=<path>.
  • Insufficient permissions on the temp directory used for the response file. Set TMPDIR (Linux/macOS) or TEMP (Windows) to a writable path.

If none of the above apply the error string returned by the OS is reproduced verbatim and is the primary clue.