I'm trying to install specific versions of python via x86_64 Homebrew and pyenv
I'm getting an error that looks like its caused by Xcode's CommandLineTools. I used to get a ton of errors when installing on M1 but none like this since Xcode got updated to version 14.
This is the command I'm running:
CC="$(brew --prefix gcc)/bin/gcc-12" pyenv install 3.9.1 -v
And this is the error that's cause it to fail:
In file included from ./Include/tupleobject.h:39,
from ./Include/Python.h:105:
Objects/floatobject.c: In function 'PyFloat_GetInfo':
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/float.h:76:21: error: implicit declaration of function '__builtin_flt_rounds'; did you mean '__builtin_llround'? [-Werror=implicit-function-declaration]
76 | #define FLT_ROUNDS (__builtin_flt_rounds())
| ^~~~~~~~~~~~~~~~~~~~
./Include/cpython/tupleobject.h:30:69: note: in definition of macro 'PyTuple_SET_ITEM'
30 | #define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v)
| ^
Objects/floatobject.c:90:5: note: in expansion of macro 'PyStructSequence_SET_ITEM'
90 | PyStructSequence_SET_ITEM(floatinfo, pos++, PyLong_FromLong(flag))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Objects/floatobject.c:104:5: note: in expansion of macro 'SetIntFlag'
104 | SetIntFlag(FLT_ROUNDS);
| ^~~~~~~~~~
Objects/floatobject.c:104:16: note: in expansion of macro 'FLT_ROUNDS'
104 | SetIntFlag(FLT_ROUNDS);
| ^~~~~~~~~~
Specifically this line: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/float.h:76:21: error: implicit declaration of function '__builtin_flt_rounds'; did you mean '__builtin_llround'?
Is there a workaround for this or is it an error in the latest tooling?
I'm on Monterey 12.6.1, Xcode 14.1, HOMEBREW_VERSION: 3.6.8, pyenv 2.3.5.