devel/wasi-compiler-rt13 doesn't exist in 2021Q4, but is listed in devel/Makefile and causes synth, and possibly other tools to fail when trying to build ports.
I get exactly the same: Regenerating flavor index: this may take a while ... Scanning entire ports tree. progress: 35.24% culprit: devel/wasi-compiler-rt13 Scan aborted because 'make' encounted an error in the Makefile. devel/wasi-compiler-rt13 (return code = 2) Flavor index generation failed: ports scan