lang/gawk fails to compile on FreeBSD-10.1-Release-p9 with ===> Patching for gawk-4.1.2 ===> Applying FreeBSD patches for gawk-4.1.2 1 out of 1 hunks failed--saving rejects to Makefile.in.rej => Patch patch-Makefile failed to apply cleanly. *** Error code 1 Makefile.in.rej less gawk-4.1.2/Makefile.in.rej @@ -1151,7 +1151,7 @@ install-exec-hook: (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ - if [ ! -f awk ]; \ + if ! /usr/bin/which -s awk; \ then $(LN_S) gawk$(EXEEXT) awk; \ fi; exit 0) more details here: https://forums.freebsd.org/threads/lang-gawk.51453/#post-288559