If the Path value in either of these registry entries
is declared REG_SZ instead of REG_EXPAND_SZ, and contains %-delimited references to environment variables, then the final generated Path environment variable will contain unexpanded environment variable references.
This will cause the GnuWin32 Bison port to generate calls to _spawnvp() that tickle a bug in the Microsoft C runtime, and lead to the unhelpful error:
m4: invalid argument
The solution? Easy peasy:
- Set both Path entries to REG_EXPAND_SZ. This won’t actually help, but it’s tidy.
- Remove all environment variable references from your path.
- Restart your computer, because Windows caches things & isn’t too good at noticing when its cache is no longer valid.
- Hope for the best.