Downgrading CMake won't help, this issue is not specific to a CMake version. Although I do agree that using CMake version built with the toolchain is more reliable, as I did see issues with CMake 4.x before, but it didn't cause this exact issue.
This was previously discussed in this thread: Unable to build toolchain due to thin libzstd.dylib
There are two options here:
brew uninstall zstd, which meansbuild-scriptwill no longer pick up zstd build from Homebrew, which doesn't have universal binaries supplied that are required for universal toolchain binaries produced bybuild-toolchain.- Or don't use
build-toolchainscript at all and usebuild-scriptinstead to produce the toolchain, which I personally recommend. Decide which preset you're going to use withbuild-scriptand ensure that this preset doesn't haveinfer-cross-compile-hosts-on-darwinsetting passed, which will also make you build take only half as long, because it won't have to cross-compile anymore for Intel on Apple Silicon or vice versa.