Skip to content

gimp: fix build on aarch64-darwin - #193680

Merged
SuperSandro2000 merged 3 commits into
NixOS:masterfrom
wegank:gimp-aarch64-darwin
Oct 4, 2022
Merged

SuperSandro2000 merged 3 commits into
NixOS:masterfrom
wegank:gimp-aarch64-darwin

Conversation

@wegank

@wegank wegank commented Sep 30, 2022

Copy link
Copy Markdown
Member
Description of changes

Closes #156807.

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.11 Release Notes (or backporting 22.05 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.

@ofborg ofborg Bot added the 6.topic: darwin Running or building packages on Darwin label Sep 30, 2022
@github-actions github-actions Bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Sep 30, 2022
@wegank
wegank force-pushed the gimp-aarch64-darwin branch from a2fa5e0 to 1bbe0df Compare September 30, 2022 10:11
@ofborg
ofborg Bot requested a review from abathur September 30, 2022 10:13
@ofborg ofborg Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Sep 30, 2022
@wegank
wegank force-pushed the gimp-aarch64-darwin branch from 1bbe0df to 5b16621 Compare September 30, 2022 10:41
@wegank
wegank changed the base branch from staging to master September 30, 2022 10:41
@wegank

wegank commented Sep 30, 2022

Copy link
Copy Markdown
Member Author

Note that gimp does not currently build on aarch64-linux, see #185997.

@abathur abathur left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure how others will feel about completely disabling the scandir tests on aarch64-darwin, but I avoided this approach when I worked around the problem in resholve because it isn't clear to me why they're failing and whether it indicates a "real" problem that needs fixing on aarch64-darwin.

I'll see if maybe someone in the Nix on macOS channel in matrix can poke at this.

Edit: not trying to roadblock the PR--this would probably be better than doing nothing.

@wegank
wegank force-pushed the gimp-aarch64-darwin branch from 5b16621 to 3192dc4 Compare September 30, 2022 17:07
@ofborg
ofborg Bot requested a review from abathur September 30, 2022 17:17
@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Sep 30, 2022
@wegank
wegank force-pushed the gimp-aarch64-darwin branch from 3192dc4 to b3d6330 Compare September 30, 2022 22:12
@ofborg ofborg Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Sep 30, 2022
@abathur

abathur commented Sep 30, 2022

Copy link
Copy Markdown
Member

@wegank Did you happen to note what the dependency chain is for bringing scandir into gimp? @stephank took a closer look at this and his comment in the issue makes me think that this could cause real misbehavior if it's used at runtime, but that disabling the tests globally is probably fine if it's only a test dependency itself.

I'm working on researching this out for mongodb (which is what I saw as the other main thing depending on scandir that isn't coming in through gimp, a gimp plugin, resholve, or a resholved package). This has been a real PITA, but it seems like it's transiting in through the dependency on cheetah at the line below:

else rec { python = scons.python.withPackages (ps: with ps; [ pyyaml typing cheetah ]);

I'll have to keep pulling after dinner...

@wegank
wegank force-pushed the gimp-aarch64-darwin branch from b3d6330 to b4f3534 Compare September 30, 2022 22:46
@wegank

wegank commented Sep 30, 2022 •

Copy link
Copy Markdown
Member Author

@abathur I added a patch that fixes scandir on darwin, following #156807 (comment) (yes, exactly the same comment). This should ensure that no misbehavior would occur at runtime.

@wegank
wegank force-pushed the gimp-aarch64-darwin branch 2 times, most recently from 27e5c06 to 678e314 Compare October 1, 2022 00:39
@abathur

abathur commented Oct 1, 2022 •

Copy link
Copy Markdown
Member

I'm guessing from your force-push that we saw the same failure on x86_64 (the same basic test failures from the issue). I came here to link a commit updating the patch, but I think I like selectively applying it as in your most-recent push. :)

Edit: hah. Recent push is roughly what I had, though I used os.uname() :)

@ofborg ofborg Bot added the 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. label Oct 1, 2022
@ofborg ofborg Bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 1, 2022
@wegank
wegank force-pushed the gimp-aarch64-darwin branch from 678e314 to ea3a45f Compare October 1, 2022 00:49
@wegank

wegank commented Oct 1, 2022 •

Copy link
Copy Markdown
Member Author

I'm guessing from your force-push that we saw the same failure on x86_64 (the same basic test failures from the issue). I came here to link a commit updating the patch, but I think I like selectively applying it as in your most-recent push. :)

Oh, I've just pushed another commit to fix the failure in the first force-push :-)

@wegank
wegank force-pushed the gimp-aarch64-darwin branch from ea3a45f to 34df1d2 Compare October 1, 2022 00:55
@ofborg ofborg Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 1, 2022

@abathur abathur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since it seemed to conflict with what he thought initially, I asked @stephank if this approach looked fine and he said:

I think so, yes. I think you can enable 64-bit inodes on x86_64 through defines, but I guess those are the defines that Python itself was compiled with, and apparently our build doesn't set them. So I think just checking for arm64 is fine.

I've confirmed that resholve builds and resholve.tests run clean on x86_64-darwin. With the caveat that I can't personally check on aarch64-darwin, this looks good from my perspective. Thanks for pulling at this.

@bobby285271 bobby285271 added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 1, 2022
@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/624

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also this should be multiple commits for each package

@SuperSandro2000 SuperSandro2000 Oct 4, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be postPatch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please make the patch unconditional

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also without lib.optionals stdenv.isDarwin?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, otherwise it bitrots overtime because python-updates are mostly not tested to much on darwin.

@wegank
wegank force-pushed the gimp-aarch64-darwin branch from 34df1d2 to 7994937 Compare October 4, 2022 11:42
@ofborg
ofborg Bot requested a review from abathur October 4, 2022 11:53
@wegank

wegank commented Oct 4, 2022

Copy link
Copy Markdown
Member Author

@ofborg build gimp

@SuperSandro2000
SuperSandro2000 merged commit 5ecf65e into NixOS:master Oct 4, 2022
@wegank
wegank deleted the gimp-aarch64-darwin branch October 4, 2022 13:13
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: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python27Packages.scandir: test failures on aarch64-darwin

5 participants