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: "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:
Type: compile error Stage:
Components: Build, macOS Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, lukasz.langa, ned.deily, pablogsal, ronaldoussoren, sberg
Priority: normal Keywords:

Created on 2021-05-07 06:45 by sberg, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg393167 - (view) Author: Stephan Bergmann (sberg) Date: 2021-05-07 06:45
I experienced this with Python 3.8 when building it as part of LibreOffice (see <https://git.libreoffice.org/core/+/b0a4b49a88aacfbc127965c0c6fe50a065eb3a0f%5E%21> "external/python3: Clang 13 trunk implements --print-multiarch now", quoting from its commit message below) but from the sources it looks like it would still be an issue with the latest cpython main branch:

Clang 13 trunk implements --print-multiarch now since <https://github.com/llvm/llvm-project/commit/a921d2d2fb46b898794091e7410426c518a4f0cc> "[Driver] Add -print-multiarch", which causes an issue when building with such a compiler on macOS:

> checking build system type... x86_64-apple-darwin19.6.0
> checking host system type... x86_64-apple-darwin19.6.0
[...]
> checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report

as configure.ac computes PLATFORM_TRIPLET as "darwin", and instead of computing MULTIARCH as empty (as `$CC --print-multiarch` used to just print

> clang: error: unsupported option '--print-multiarch'
> clang: error: no input files

to stderr), it now computes it as e.g. "x86_64-apple-darwin19.6.0" (or whatever -target is explicitly set to in $CC), so the check that they have equal values if they are both nonempty fails now when building against Clang 13 trunk.  (This does not yet appear to be an issue with any Apple Clang version, though.)
msg393169 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-07 06:50
Python 3.8 is in security fix-only mode and does no longer updates for non-security fixes. Are Python 3.9 and 3.10 beta affected, too?
msg393171 - (view) Author: Stephan Bergmann (sberg) Date: 2021-05-07 07:34
"from the sources it looks like it would still be an issue with the latest cpython main branch", and if I check out current main branch and run `CC='/path-to-local-llvm-trunk/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk' ./configure` it indeed still fails with that "configure: error: internal configure error for the platform triplet, please file a bug report"
msg393204 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-07 18:52
We don't recommend nor do we test building Python for macOS with anything but the Apple-supplied compilers in either Xcode or the Command Line Tools and this hasn't been a problem with the clang versions in them so far but, if someone wants to provide a PR to avoid this, we can certainly look at applying it.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88231
2021-05-07 18:52:47ned.deilysetmessages: + msg393204
2021-05-07 07:41:34christian.heimessetnosy: + ned.deily, pablogsal, ronaldoussoren, lukasz.langa

components: + macOS
versions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.8
2021-05-07 07:34:35sbergsetmessages: + msg393171
2021-05-07 06:50:37christian.heimessetnosy: + christian.heimes
messages: + msg393169
2021-05-07 06:45:46sbergcreate