-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
./configure and make failed on macOS Monterey #99337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A quick workaround is to use the system compiler (e.g. /usr/bin/clang) instead of homebrew GCC to perform the build. |
Looks like this is a fairly shallow issue, a number of macros include I'm currently installing homebrew and gcc-11 in a VM to create a fix for this. |
"brew install gcc-11" didn't work for me, I used "brew install gcc" instead and that installed gcc-12. That results in a compile error in pylifecycle.c due to the expansion of _Py_COMP_DIAG_PUSH on line 101. Moving those lines a bit earlier fixes that (will become a bit clearer when I create a PR) |
@jchnxu : W.r.t. the first error ( |
I've created a PR for the problems with GCC-12 that I found. It is a draft for now for two reasons:
UPDATE: Said PR is now ready for review. |
I noticed the same error in a CI build while working on my PR, but don't get this error while building in VM with Xcode 13.4 (same clang version as in this issue) or Xcode 14 (clang 14.0). |
It's the same
I didn't spot it. Can you tell me the location?
|
It's the 8th line from the bottom, 'config.log'. |
Forgive me for ignoring it. Here it is
|
Which version of Python are you trying to build? Given the config.log it is a version of Python 3.8, but doesn't mention the micro release. I cannot reproduce the issue with the latest 3.8 version, but can do so using an older micro version (I checked with 3.8.0 and 3.8.4). Also: Did you rebuild the configure script? The line number for |
Fix a number of compile errors with GCC-12 on macOS: 1. In pylifecycle.c the compile rejects _Pragma within a declaration 2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS 3. _ctypes assumed that __builtin_available is always present on macOS
Fix a number of compile errors with GCC-12 on macOS: 1. In pylifecycle.c the compile rejects _Pragma within a declaration 2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS 3. _ctypes assumed that __builtin_available is always present on macOS (cherry picked from commit cdde29d) Co-authored-by: Ronald Oussoren <[email protected]>
…99638) gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) Fix a number of compile errors with GCC-12 on macOS: 1. In pylifecycle.c the compile rejects _Pragma within a declaration 2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS 3. _ctypes assumed that __builtin_available is always present on macOS (cherry picked from commit cdde29d) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Ronald Oussoren <[email protected]>
The GCC 12 build error will be fixed for 3.12 and 3.11, I've just merged my PRs for that. The automatic back port to 3.10 failed and I don't care enough about GCC to try to do a manual back port. The configure error with clang is likely due to using a old version of Python 3.8, see my previous message. I'm therefore closing this issue. |
Caught up in other project these days. We eventually kinda moved to using scripts built by a mature 3rd party. Thanks anyway. |
This was not fixed for 3.10? Just got this error:
|
Bug report
When using
./configure
it let me file a bug reportWhen I used
brew install gcc-11 & CC=gcc-11 ./configure
the configure passed but the make failed.Which I believe the GNU gcc is missing the
HAVE_BUILTIN_AVAILABLE
macro?Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: