Swift Subprocess - Failed to spawn UnderlyingError(rawValue: 20

Probably this assertions issue? Try running the build command in verbose mode with -v and make sure which Swift compiler is being pulled in: the Xcode one you showed above or some other OSS compiler version, which have assertions enabled.