Skip to content
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

"configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch: #88231

Closed
sberg mannequin opened this issue May 7, 2021 · 6 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes build The build process and cross-build OS-mac

Comments

@sberg
Copy link
Mannequin

sberg mannequin commented May 7, 2021

BPO 44065
Nosy @ronaldoussoren, @tiran, @ned-deily, @ambv, @pablogsal

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-05-07.06:45:46.943>
labels = ['OS-mac', 'build', '3.9', '3.10', '3.11']
title = '"configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:'
updated_at = <Date 2021-05-07.18:52:47.709>
user = 'https://bugs.python.org/sberg'

bugs.python.org fields:

activity = <Date 2021-05-07.18:52:47.709>
actor = 'ned.deily'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build', 'macOS']
creation = <Date 2021-05-07.06:45:46.943>
creator = 'sberg'
dependencies = []
files = []
hgrepos = []
issue_num = 44065
keywords = []
message_count = 4.0
messages = ['393167', '393169', '393171', '393204']
nosy_count = 6.0
nosy_names = ['ronaldoussoren', 'christian.heimes', 'ned.deily', 'lukasz.langa', 'pablogsal', 'sberg']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue44065'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

@sberg
Copy link
Mannequin Author

sberg mannequin commented May 7, 2021

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 <llvm/llvm-project@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.)

@sberg sberg mannequin added 3.8 only security fixes build The build process and cross-build labels May 7, 2021
@tiran
Copy link
Member

tiran commented May 7, 2021

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?

@sberg
Copy link
Mannequin Author

sberg mannequin commented May 7, 2021

"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"

@tiran tiran added OS-mac 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes and removed 3.8 only security fixes labels May 7, 2021
@ned-deily
Copy link
Member

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@mansourmoufid
Copy link

Yeah I ran into this recently trying to rebuild 3.7 which used to build just fine.

For anyone else here from Google: this is a duplicate of #89568 and fixed with #31890.

@ned-deily
Copy link
Member

@eliteraspberries, thanks for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes build The build process and cross-build OS-mac
Projects
None yet
Development

No branches or pull requests

3 participants