Skip to content

Comments

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

Merged
vcunat merged 1 commit intoNixOS:staging-nextfrom
reckenrode:ghc962-hydra-fix
Jul 15, 2023
Merged

haskell.compiler.ghc962: fix build on Darwin after stdenv rework merge#243478
vcunat merged 1 commit intoNixOS:staging-nextfrom
reckenrode:ghc962-hydra-fix

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.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jul 14, 2023
@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 This PR causes between 1 and 10 packages to rebuild on Darwin. 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.

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 General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 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