Gromacs-2023.2 fails to build properly but 2023.1 and 2023 builds do

You can attach the logs as files, or upload them to an external server like Google Drive or Pastebin. Please include everything, starting from a cmake invocation in a clean directory. There are a lot of ways to set up the environment (as you yourself described with the fftw installation), so it is helpful to see it from the beginning till the end.

Also, one of the things listed in the thread requires modifying GROMACS source code with a work-in-progress patch (hopefully to be part of the next, 2023.3, release). Have you applied that patch?