Error: undefined reference to 'fftwf_threads_set_callback

Without knowing more details about exact build configuration, it could be due to newer blender.git codebase, but older libraries folder. Or due to “stale” state of CMakeCache.txt (which somehow got out of sync with what is actually happening in the CMake rules.