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

kitty: add patch to fix -stack_size flag issue on darwin #166661

Merged
merged 1 commit into from
Apr 2, 2022

Conversation

malob
Copy link
Member

@malob malob commented Mar 31, 2022

Description of changes

Kitty is currently failing to build on Darwin systems with the following error:

ld: -stack_size option can only be used when linking a main executable

This started to happen when #157775 landed on master, in particular c7c3187.

Initially I had thought that reverting that commit would be the right solution (#166516) however, upon further investigation it really does seem like most builds of Python 3 on Darwin include Wl,-stack_size,1000000 in LINKFORSHARED, as such Python 3 in nixpkgs should do the same, and the issue should be fixed upstream. More here on that here: kovidgoyal/kitty#289 (comment).

A patch has been committed upstream to resolve this issue: kovidgoyal/kitty@57cffc7. This PR adds that patch.

Closes #165387.

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.

@malob
Copy link
Member Author

malob commented Mar 31, 2022

I'm currently having some issues with a test or two failing on Darwin (now that the build can get that far), but I decided to go ahead and open this PR anyways, to see if @ofborg runs into the same issue, or if it's something about my local system.

@malob
Copy link
Member Author

malob commented Mar 31, 2022

Interesting, @ofborg didn't have any issues.

This is what was giving me trouble (with sandboxing enabled):

test_box_drawing (kitty_tests.fonts.Rendering) ... 2022-03-31 20:54:51.832 python3.9[13034:80023782] XType: com.apple.fonts is not accessible.
2022-03-31 20:54:51.832 python3.9[13034:80023782] XType: XTFontStaticRegistry is enabled.
2022-03-31 20:54:51.852 python3.9[13034:80023782] CoreText: System LastResort not available, using built-in copy.
ok
test_coalesce_symbol_maps (kitty_tests.fonts.Rendering) ... ok
test_emoji_presentation (kitty_tests.fonts.Rendering) ... ok
test_fallback_font_not_last_resort (kitty_tests.fonts.Rendering) ... FAIL
test_font_rendering (kitty_tests.fonts.Rendering) ... python3.9(13034,0x1009f8580) malloc: *** error for object 0x70000001037473a0: pointer being freed was not allocated
python3.9(13034,0x1009f8580) malloc: *** set a breakpoint in malloc_error_break to debug

(Without sandboxing I was getting an error caused by something related to my Fish shell config.)

I'm going to push an update with a short comment with some context about the patch. I'd be happy to merge after that.

@Artturin
Copy link
Member

Artturin commented Apr 1, 2022

KovidGoyal made a patch to fix the issue kovidgoyal/kitty@57cffc7 so please fetchpatch it

He's very fast

@Luflosi
Copy link
Contributor

Luflosi commented Apr 1, 2022

You forgot to remove the patch file.

@malob
Copy link
Member Author

malob commented Apr 1, 2022

You forgot to remove the patch file.

Good catch :)

Removed.

Copy link
Contributor

@Luflosi Luflosi left a comment

Choose a reason for hiding this comment

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

LGTM.

@ofborg ofborg bot requested a review from Luflosi April 1, 2022 17:30
@Artturin Artturin merged commit eec8114 into NixOS:master Apr 2, 2022
@malob malob deleted the fix-kitty-build-darwin branch April 2, 2022 16:32
@veprbl veprbl mentioned this pull request Feb 11, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kitty0.24.4 : "ld: -stack_size option can only be used when linking a main executable" in aarch64-darwin
3 participants