I managed to compile GAWK v 5.2.2 from here
https://ftp.gnu.org/gnu/gawk/ on OpenVMS V9.2-1
I had to unpack the tar.gz on Windows, rename the main folder to something more VMS compatible and re-zip it.
I used @[.VMS]VMSBUILD.COM and I got no errors, just some warnings like:
identification="V5.2.2"
%ILINK-W-COMPWARN, compilation warnings
module: vms_fwrite
file: SYS$SYSDEVICE:[RELEASE.gawk522]vms_fwrite.OBJ;1
%ILINK-W-NUDFSYMS, 3 undefined symbols:
%ILINK-I-UDFSYM, fork
%ILINK-I-UDFSYM, tcgetattr
%ILINK-I-UDFSYM, tcsetattr
%ILINK-W-USEUNDEF, undefined symbol tcgetattr referenced
section: $CODE$
offset: %X000000000000606D
module: io
file: SYS$SYSDEVICE:[RELEASE.gawk522]io.OBJ;1
%CC-W-MACROREDEF, The redefinition of the macro "INT32_MAX" conflicts with a current definition because the replacement lists diffe
r. The redefinition is now in effect.
at line number 49 in file SYS$SYSDEVICE:[RELEASE.gawk410]config.h;1
Versions 5.3.0 and 4.1.0 failed to compile with several errors like:
%CC-E-CLOSEPAREN, Missing ")".
at line number 3518 in file SYS$SYSDEVICE:[RELEASE.gawk-master]awkgram.y;1
%CC-E-UNDEFINEDTYPE, The compiler was expecting a ";", but one was not found. This condition could have occured because "int32_t"
%CC-E-UNDECLARED, In this statement, "INT32_MIN" is not declared.
at line number 3518 in file SYS$SYSDEVICE:[RELEASE.gawk-master]awkgram.y;1
%CC-E-NOSUBTRACT, In this statement, "x" cannot be subtracted from "(unsigned int ...)&x".
at line number 50 in file SYS$SYSDEVICE:[RELEASE.gawk410]floatmagic.h;1