Mailing List Archive

[issue43878] ./configure fails on Apple Silicon
New submission from Keith Smiley <keithbsmiley@gmail.com>:

It seems that Apple Silicon support has been added in https://github.com/python/cpython/pull/22855, but when I try to build locally I see this error:

```
% ./configure
checking for git... found
checking build system type... Invalid configuration `arm64-apple-darwin20.3.0': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20.3.0 failed
```

I went through the `autoreconf` instructions to see if the checked in configure script was outdated, but it doesn't seem to have fixed the issue.

I was able to fix this locally by updating the config.sub and config.guess files (only the former was required but I noticed in previous updates that they were updated in lockstep). I'm a bit wary about that change because it doesn't seem like they are updated frequently (they haven't been in over 3 years), but I will submit it for discussion.

----------
components: Build
messages: 391272
nosy: keith
priority: normal
severity: normal
status: open
title: ./configure fails on Apple Silicon
type: compile error
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Change by Keith Smiley <keithbsmiley@gmail.com>:


----------
keywords: +patch
pull_requests: +24179
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25450

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

The files are auto-generated by autoconf. The common Linux platforms do not have autoconf 2.71 yet. A large amount of core developers use Debian, Fedora, or Ubuntu. The latest releases of these distros only have autoconf 2.69.

Until we can update, you have to recreate the configure script locally.

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

It looks like we might be able to update the files after all. It's hard to say, though. The older tickets and commits for config.guess don't contain much context or explanation.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Keith Smiley <keithbsmiley@gmail.com> added the comment:

Thanks for taking a look. My limited understanding is also that these should be able to be updated separately from autoconf, and I feel slightly more confident knowing that in the past folks treated this update as trivial. It seems like the changes should be entirely additive, as in they support new triples but otherwise are API compatible.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Ned Deily <nad@python.org> added the comment:

I'm unable to reproduce the failure you see using the current top of the master branch (or the 3.9 branch) when running ./configure on an M1 Mac with macOS 11.2.3 and Xcode 12.4. The results I see are:

checking build system type... arm-apple-darwin20.3.0
checking host system type... arm-apple-darwin20.3.0

How are you producing the source that you are building from?

----------
nosy: +ned.deily

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Keith Smiley <keithbsmiley@gmail.com> added the comment:

Thanks for checking, I was able to debug further and it turns out the actual issue is if you use `uname` from `coreutils`, you get different results:

```
% /opt/homebrew/opt/coreutils/libexec/gnubin/uname -p
arm64
% /usr/bin/uname -p
arm
```

I have this in my $PATH (not specifically for uname but for other coreutils binaries) which is what lead to this. This update fixes this because the newer config.sub version contains a case for `arm64` that didn't exist before https://github.com/python/cpython/pull/25450/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9R1107

So this isn't as big of an issue as I thought, but I still think it makes sense to update these files.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue43878] ./configure fails on Apple Silicon [ In reply to ]
Ned Deily <nad@python.org> added the comment:

Thanks for the additional info and the PR. Yes, it probably does make sense to update them. But it also makes sense to avoid getting into problems building (Python and likely some other projects) with replacements for Apple-supplied utilities :) I note that MacPorts installs coreutils with a "g" prefix (e.g. "guname") for just this reason.

----------
type: compile error -> enhancement
versions: -Python 3.8, Python 3.9

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue43878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com