On netbsd 9.3, the following configure options will let gmake build to completion. > ./configure --without-all --without-x --without-compress-install --localstatedir=/var --disable-autodepend --prefix=/path/to/emacs-29.0.92 --build=x86_64--netbsd --host=x86_64--netbsd --enable-option-checking=yes --without-pop --without-mailutils 'CFLAGS=-O2 -D_FORTIFY_SOURCE=2 -I/usr/include' 'CPPFLAGS=-DTERMINFO -I/usr/include' 'LDFLAGS=-L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib' The following steps in the build process fail after unpacking the source distribution files. > $ sh ./autogen.sh > $ ./configure --without-x > $ gmake > > ... > > *** > *** "make all" failed with exit status 2. > *** > *** You could try to: > *** - run "make bootstrap", which might fix the problem > *** - run "make V=1", which displays the full commands invoked by make, > *** to further investigate the problem > *** > gmake[1]: *** [Makefile:414: advice-on-failure] Error 2 > gmake[1]: Leaving directory '/usr/X/23/src/emacs/emacs-29.0.92' > gmake: *** [Makefile:370: all] Error 2 > > $ gmake bootstrap > > ... > > *** > *** "make bootstrap" failed with exit status 2. > *** > *** You could try to: > *** - run "make extraclean" and run "make" again (or, equivalently, run > *** "make bootstrap configure=default"), to rebuild Emacs with the > *** default configuration options, which might fix the problem > *** - run "git clean -fdx" and run "make bootstrap" again, which might > *** fix the problem if "make bootstrap configure=default" did not > *** !BEWARE! "git clean -fdx" deletes all files that are not under > *** !BEWARE! version control, which means that all changes to such > *** !BEWARE! files will be lost and cannot be restored later > *** - run "make V=1", which displays the full commands invoked by make, > *** to further investigate the problem > *** - report the problem and ask for help by sending an email to > *** bug-gnu-emacs@gnu.org, mentioning at least the build error > *** message, the platform, and the repository revision displayed by > *** "git rev-parse HEAD" > *** > gmake[1]: *** [Makefile:414: advice-on-failure] Error 2 > gmake[1]: Leaving directory '/usr/X/23/src/emacs/emacs-29.0.92' > gmake: *** [Makefile:1246: bootstrap] Error 2