-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
failing configure command #95283
Comments
From
|
While you shouldn't have to by default, you can always override the deployment target as a workaround. Try appending it to your ./configure command:
|
Hm, do we need to make adjustments for this in Also, I see we're passing on |
@BizarreBits : What's the output of Also, does @ned-deily's suggestion of overriding the deployment target work for you? If you do have an older version of Xcode installed it may be necessary to specify an older deployment target as well. That's something I've never experimented with myself. Our build system assumes that the compiler can target the current system version. That might be a problem if an old version of Xcode is installed on a newer version of macOS. I've check that using the current Xcode beta on macOS 12.3 is not a problem (as expected). @erlend-aasland : I don't know if it is necessary to make adjustments to the configure script. If this is indeed an older Xcode version on a newer OS it might be possible to detect this and bail out, but I don't know if it is worthwhile to do this. It might be better to just document the assumption I mention earlier (but more clearly). |
To answer my own question, config.log contains:
According to https://gist.github.com/yamaya/2924292 this is the compiler shipped with Xcode 11 (and the corresponding command line tools), while the system runs macOS 12.3 ( The compiler on the system is too old to understand the new macOS numbering scheme introduced in macOS 11, which likely explain this error. @BizarreBits : Why do you use an old version of Xcode to build on this system? In general it is better to use a newer compiler and explicitly target older macOS versions ("MACOSX_DEPLOYMENT_TARGET=10.15") when needed. CPython supports building on macOS 12.x while targeting older versions (the oldest deployment target that will work is macOS 10.9). @ned-deily, @erlend-aasland: I propose closing this issue. Our support matrix is already fairly large when only supporting the latest compiler that Apple supports on the platform. Adding support for this variant will end up untested unless we (realistically, Ned) set up a VM with this configuration and include that in pre-release testing. |
+1
I agree that is not worth it to make adjustments to |
Documenting this is useful. We basically require the Xcode, or corresponding Command Line Tools, released with the OS, or a later one that's supported on the OS (generally the next major version). |
I'll see if I can find the time to produce a PR for I'll ping you and Ned for review when I've got something. |
The build machinery assumes that the compiler that's used to build on macOS includes an SDK that's at least as new as the OS version on the build machine. Explicitly mention this in Mac/README.txt.
I've added a PR with some documentation about this. @ned-deily are notes like this something you prefer to back-port to 3.11 and 3.10? Btw. Longer term it is probably better to merge most of Mac/README.txt into https://docs.python.org/3/using/index.html for increased visibility. But that's something for another |
The build machinery assumes that the compiler that's used to build on macOS includes an SDK that's at least as new as the OS version on the build machine. Explicitly mention this in Mac/README.txt.
The build machinery assumes that the compiler that's used to build on macOS includes an SDK that's at least as new as the OS version on the build machine. Explicitly mention this in Mac/README.txt. (cherry picked from commit 8f024a0) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
The build machinery assumes that the compiler that's used to build on macOS includes an SDK that's at least as new as the OS version on the build machine. Explicitly mention this in Mac/README.txt. (cherry picked from commit 8f024a0) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
The supported Xcode versions are now documented in Mac/README.txt, I'm closing the issue. |
Bug report
When trying to build Python from source code on Mac, the configure command fails.
config.log
Your environment
Python Version: 3.10.5
Operating System:
MacOS Monterey 12.3
64 Bit x68, Intel core CPU
Linked PRs
The text was updated successfully, but these errors were encountered: