With the following two patches, I was able to build emacs:
in puresize.h
-#define BASE_PURESIZE (1102000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1235000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
in alloc.c
-#define NSTATICS 1280
+#define NSTATICS 2032
However, I can't type anything into the buffer in the resulting emacs.
I configured it with:
./configure --with-x-toolkit=gtk --enable-font-backend --with-xft
Duncan.