Skip to content

python3: revert some old darwin hacks#157775

Merged
FRidh merged 3 commits intoNixOS:stagingfrom
veprbl:pr/darwin_python310_fix
Feb 6, 2022
Merged

python3: revert some old darwin hacks#157775
FRidh merged 3 commits intoNixOS:stagingfrom
veprbl:pr/darwin_python310_fix

Conversation

@veprbl
Copy link
Copy Markdown
Member

@veprbl veprbl commented Feb 2, 2022

Motivation for this change

Fixes build of python310
Resolves: #154120

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@veprbl veprbl requested a review from FRidh as a code owner February 2, 2022 01:34
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Feb 2, 2022
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Feb 2, 2022
@veprbl veprbl changed the base branch from master to staging February 2, 2022 02:38
@veprbl
Copy link
Copy Markdown
Member Author

veprbl commented Feb 2, 2022

@GrahamcOfBorg eval

@veprbl veprbl changed the title python3: revert some old hacks python3: revert some old darwin hacks Feb 2, 2022
@veprbl veprbl added the 6.topic: darwin Running or building packages on Darwin label Feb 2, 2022
@hexagonal-sun
Copy link
Copy Markdown
Contributor

Built and tested on aarch64-darwin. Looks good.

Setting an old target conflicts with the -stack_size,1000000 linker
flag. This fixes build of python310.

This reverts ce59dec ('python34: as a workaround, explicitly set MACOSX_DEPLOYMENT_TARGET')
The original motivation behind removing that was to appease a consumer
of python-config's output. That issue was probably resolved by now, so
let's bring the build in sync with what python is doing by default.

This reverts b7819e3 ('python3.x: Patch extra stack size on darwin')
The -msse2 flag was hardcoded back when python32 was added in
47d86a8 ('Adding Python 3.2').
@veprbl veprbl force-pushed the pr/darwin_python310_fix branch from aeea436 to 68d828f Compare February 2, 2022 23:23
@veprbl
Copy link
Copy Markdown
Member Author

veprbl commented Feb 2, 2022

(split one of the commits into two)

Copy link
Copy Markdown
Contributor

@risicle risicle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built python 3.7 thru 3.10 successfully, macos 10.15

@yihuang
Copy link
Copy Markdown
Contributor

yihuang commented May 9, 2022

Should we backport this to 21.11? python310 build is broken on release-21.11 right now.

@veprbl
Copy link
Copy Markdown
Member Author

veprbl commented May 9, 2022

python310 build is broken on release-21.11 right now.

Right, that's been known #167647

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 9, 2022

Backport failed for staging-21.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin staging-21.11
git worktree add -d .worktree/backport-157775-to-staging-21.11 origin/staging-21.11
cd .worktree/backport-157775-to-staging-21.11
git checkout -b backport-157775-to-staging-21.11
ancref=$(git merge-base dad3290124d0692308b4d7065afc63c98e219217 68d828f64ca8cde5dbe85c55ca6563f92482cd4e)
git cherry-pick -x $ancref..68d828f64ca8cde5dbe85c55ca6563f92482cd4e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python310 is broken on x86_64-darwin

5 participants