I somehow got myself into a situation where I can’t install many packages from source. devtools::has_devel() says “Your system is ready to build packages!”, but install.packages("lme4", type = "source"), for example, errors:
I think I had installed some compilers with homebrew and they were conflicting with Xcode or something. I deleted the usr/local/include directory (which is apparently safe, but like, do your own research please) and now I can install packages from source.