This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: compiler detection on macOS seems to be incorrect
Type: behavior Stage: patch review
Components: Build, macOS Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ned.deily, ronaldoussoren, xrisk
Priority: normal Keywords: patch

Created on 2021-05-10 03:01 by xrisk, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 26341 ned.deily, 2021-05-25 02:05
Messages (1)
msg393346 - (view) Author: Rishav Kundu (xrisk) * Date: 2021-05-10 03:01
On macOS devices, the configure script seems to always detect gcc, even though Apple does not ship with gcc — the gcc binary is simply a wrapper around clang (probably llvm-gcc?)

I believe the issue is with these lines.

https://github.com/python/cpython/blob/8e8307d70bb9dc18cfeeed3277c076309b27515e/configure.ac#L630-L635

Concretely, gcc —-version produces this on my computer:

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Perhaps an additional check for “clang” would solve the issue.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88259
2021-05-25 02:05:34ned.deilysetkeywords: + patch
stage: patch review
pull_requests: + pull_request24932
2021-05-10 04:06:31ned.deilysetassignee: ned.deily

components: + macOS
nosy: + ronaldoussoren, ned.deily
2021-05-10 03:01:36xriskcreate