The problem being that devQuartz.c uses a deprecated and now removed interface (ATS). Building with --without-aqua will work. I am sure that Simon will fix this, but not in time for 4.2.2 which is in code freeze. Note this only affects building: as the CRAN binary distributions are built on much older versions of macOS they should continue to build. This is purely a heads up for those building from source that they may want to delay upgrading to Ventura (but someone needed to to find the issue). For the first time for quite a while, upgrading to Ventura removes the Command Line Tools which need reinstalling.
Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford