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

ncurses: fix ncurses6 build w/clang #33376

Merged
merged 2 commits into from Jan 3, 2018
Merged

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 3, 2018

Motivation for this change

Un-break ncurses6 on clang (it's been broken a long time).

Recent hydra log demonstrating this on Darwin: https://hydra.nixos.org/build/66447097/nixlog/3

Follow-up might want to enable ncurses6 on Darwin instead of using 5, not sure if there are other reasons for using 5 on Darwin but 6 on Linux. (cc @LnL7 @copumpkin).


First commit simplifies and is what I think is "best"; second shows what it would look like to un-break ncurses6 on clang but avoids triggering mass-rebuild... at the cost of being significantly uglier :).

I'm good with either being merged, wasn't sure how folks would feel.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Somewhat amusingly given its name, "clang.patch" applies to both 5 and 6
but is the cause of ncurses6 breakage on 6 but is required on 5...
gcc is happy in all four configurations:

       5  5p 6  6p
gcc    ✓  ✓  ✓  ✓
clang  ✗  ✓  ✓  ✗

Which is why this commit enables the patch for 5 but not 6;
this matches behavior in Gentoo, for example.

For further simplification, we also use gcc-5 patch regardless.
@dezgeg
Copy link
Contributor

dezgeg commented Jan 3, 2018

@vcunat made darwin use 5.9 in f56a319.

@dtzWill
Copy link
Member Author

dtzWill commented Jan 3, 2018

@dezgeg thanks! Looks like ncurses6 might be in Darwin's future, then! 😁

@vcunat
Copy link
Member

vcunat commented Jan 3, 2018

not sure if there are other reasons for using 5 on Darwin but 6 on Linux

I knew none when committing it (I believe), and I still know none.

@LnL7 LnL7 merged commit c16e8b2 into NixOS:master Jan 3, 2018
@dtzWill dtzWill mentioned this pull request Jan 3, 2018
8 tasks
@LnL7 LnL7 added the 8.has: port to stable A PR already has a backport to the stable release. label Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: port to stable A PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants