Installed and used a fresh set of the "previous" mame tools, and the mysterious compile errors went away. However, I do still get a build error near the end:
make: *** No rule to make target '../../../../generated/resource/mamevers.rc', needed by '../../../../mingw-gcc/obj/x64/Release/mame.res'. Stop.
make: *** Waiting for unfinished jobs....
makefile:379: recipe for target 'mamearcade' failed
make: *** [mamearcade] Error 2
makefile:782: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2
This is right after starting to compile version.cpp. I downloaded a fresh copy of the repo and tried comiling again, to be sure, and the same error appears. Not expecting any fix, just wanted to mention it. Please let me know if there is a more appropriate thread to put this in.