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

Python@3.9 fails to install on ARM Big Sur #65866

Closed
wants to merge 1 commit into from

Conversation

lewis262626
Copy link

@lewis262626 lewis262626 commented Nov 28, 2020

Python expects a float for the MACOSX_DEPLOYMENT_TARGET compiler option,
if it is an integer it fails to install.

For some reason on Arm64 Big Sur the call to MacOS.version returns 11.

This fixes Homebrew/brew#9329

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Python expects a float for the MACOSX_DEPLOYMENT_TARGET compiler option,
if it is an integer it fails to install.

For some reason on Arm64 Big Sur the call to MacOs.version returns 11.
@lewis262626 lewis262626 changed the title This commits fixes #9329 Python@3.9 fails to install on ARM Big Sur Nov 28, 2020
@citelao
Copy link
Contributor

citelao commented Nov 29, 2020

I can confirm that python@3.9 (as part of brew install -s imagemagick@6) installs correctly when I made this change manually to my python@3.9.rb formula.

@jguerin
Copy link

jguerin commented Nov 29, 2020

Confirmed that this helped me finish installing ninja

@fxcoudert
Copy link
Member

fxcoudert commented Nov 29, 2020

For some reason on Arm64 Big Sur the call to MacOS.version returns 11

Because MacOS.version returns the major version number, which is 11

Python expects a float for the MACOSX_DEPLOYMENT_TARGET compiler option

$ MACOSX_DEPLOYMENT_TARGET=11 clang a.c && echo $?
0

11 is a valid value for MACOSX_DEPLOYMENT_TARGET. This bug needs to be reported to Python and fixed there. If they have a patch for it, we can use that patch here.

@fxcoudert fxcoudert added the upstream issue An upstream issue report is needed label Nov 29, 2020
@d12frosted
Copy link

I confirm that this issue affects not only M1, but even old macs. Applying the change locally fixes the problem. Thank you @lewisrobbins for this!

Since python is a dependency for other packages, I think this issue hits many users. Not sure where it should be fixed, but would be lovely to avoid the need of manual patching 😸

@guillochon
Copy link

I created a bug report here on the Python project, hopefully that's the right place to put it: https://bugs.python.org/issue42505

@fxcoudert
Copy link
Member

I've reported it to Python: https://bugs.python.org/issue42504

@guillochon
Copy link

I closed my issue and linked back to yours since we created them at almost the same time. 😄

@fxcoudert
Copy link
Member

And opened a pull request with a fix: python/cpython#23556

@fxcoudert
Copy link
Member

Upstream patch being added: #65953

@fxcoudert fxcoudert closed this Nov 30, 2020
lithammer added a commit to lithammer/homebrew-deadsnakes that referenced this pull request Dec 2, 2020
lithammer added a commit to lithammer/homebrew-deadsnakes that referenced this pull request Dec 7, 2020
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 31, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python@3.9 fails to build from source on macOS Big Sur
7 participants