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

haskell.compiler.ghc962: fix build on Darwin after stdenv rework merge #243478

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

reckenrode
Copy link
Contributor

Description of changes

The switch to cctools-llvm made several LLVM tools the default on Darwin, which includes llvm-ar. GHC will try to use -L with ar when it is llvm-ar, but that doesn’t work currently on Darwin.

See https://gitlab.haskell.org/ghc/ghc/-/issues/23188.

This is targeting staging-next because the build is currently broken. #241951

https://hydra.nixos.org/build/227354630
https://hydra.nixos.org/build/227111395

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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@reckenrode
Copy link
Contributor Author

If this should target haskell-updates instead, I can retarget. I wasn’t sure since this was prompted by the failure on staging-next.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jul 14, 2023
@ofborg ofborg bot requested review from expipiplus1 and guibou July 14, 2023 14:10
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jul 14, 2023
@reckenrode reckenrode mentioned this pull request Jul 14, 2023
1 task
@sternenseemann
Copy link
Member

staging-next is appropriate here, if there's a merge conflict we'll just have to live with it, priority is that master never breaks.

Copy link
Member

@sternenseemann sternenseemann left a comment

Choose a reason for hiding this comment

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

The GHC issue also describes that it only affects 9.6 and above so far, so it perfectly matches common-hadrian.nix. Haven't done a test build.

pkgs/development/compilers/ghc/common-hadrian.nix Outdated Show resolved Hide resolved
The switch to cctools-llvm made several LLVM tools the default on
Darwin, which includes llvm-ar. GHC will try to use `-L` with `ar` when
it is `llvm-ar`, but that doesn’t work currently on Darwin.

See https://gitlab.haskell.org/ghc/ghc/-/issues/23188.
@ofborg ofborg bot requested a review from sternenseemann July 14, 2023 17:21
@vcunat vcunat merged commit 4e5bdca into NixOS:staging-next Jul 15, 2023
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: haskell 10.rebuild-darwin: 1-10 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.

3 participants