Failed to build toolchain due to architecture error

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:

  1. brew uninstall zstd, which means build-script will no longer pick up zstd build from Homebrew, which doesn't have universal binaries supplied that are required for universal toolchain binaries produced by build-toolchain.
  2. Or don't use build-toolchain script at all and use build-script instead to produce the toolchain, which I personally recommend. Decide which preset you're going to use with build-script and ensure that this preset doesn't have infer-cross-compile-hosts-on-darwin setting 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.
1 Like