I'm running macOS 11.6 on Intel and it's giving errors when I try to install multiple versions of Python. I did see a similar problem but it doesn't appear I'm using a non-standard compiler as neither llvm or clang are installed with homebrew.
~ % clang --version
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
~ % pyenv install 3.10.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Installing Python-3.10.0...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/t5/gx_568vj4w958qgxx_hhklvc0000gn/T/python-build.20211008082840.53425
Results logged to /var/folders/t5/gx_568vj4w958qgxx_hhklvc0000gn/T/python-build.20211008082840.53425.log
Last 10 log lines:
config.status: creating pyconfig.h
creating Modules/Setup.local
creating Makefile
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
Makefile:222: *** missing separator. Stop.