-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[21.11] haskell.compiler.*: mark as unsupported on aarch64-darwin #147964
[21.11] haskell.compiler.*: mark as unsupported on aarch64-darwin #147964
Conversation
While GHC now can be bootstrapped and built on aarch64-darwin, it seems to work only to an extent. All sorts of strange issues have manifested themselves in `haskellPackages` and downstream usage which leads me to conclude that it would be misleading to call it supported on this platform, especially in a stable channel. To give a few examples, separate bin outputs just don't work in general [1] and `opt` fails for unknown reasons in some derivations [2]. As I don't own any appropriate hardware, I have tried tackling these issues by staring into my crystal ball, but so far to no avail (even worse, new issues [3] have cropped up due to changes that should have been an improvement). Given these circumstances, I'm not willing to call GHC supported on aarch64-darwin for the stable channel. I'm (for now) hopeful that we can improve the situation on `master` going forward, but it is not guaranteed that these changes will be backportable without a ton of effort. Should it turn out that we can't resolve these issues or maintain GHC's aarch64-darwin support due to a lack of contributors going forward, I am also prepared to drop aarch64-darwin support completely. While it has been proclaimed a Tier 3 platform, I would argue that the “popular” package GHC has never been working, at least not properly. [1]: NixOS#140774 NixOS#140180 [2]: https://matrix.to/#/!RbXGJhHMsnQcNIDFWN:nixos.org/$C6FK74EajqSTk58JzriYpQJ9f6x3UH3tIREcn04Y-rM?via=nixos.org&via=matrix.org&via=tchncs.de [3]: srid/haskell-template#1 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds good to me.
Also cc @domenkozar since I think he has contributed some of the fixes for aarch64-darwin.
I would like to maintain it so that cachix builds (seems like that was recently broken with llvm). Can we just revert that for aarch64-darwin? |
GHC 8.10.7 on aarch64-darwin used LLVM 9 in the past, a version which doesn't support I feel like it might work properly if we use LLVM 11 and clang 11, but this is just a theory at this point. I don't want to ship something I'm not confident in, especially as I (or @NixOS/haskell for that matter) for that matter can do very little to respond to issues or even fix them. |
cc @NixOS/darwin-maintainers anyone that is interested to help out get GHC working for aarch64-darwin? |
I'm definitely interested (due to the amount of useful tools that are written in Haskell), but I'm not really sure where to begin. If I can be pointed in some direction to start poking in, that would be a great help. (for example: should I try using LLVM/Clang 11 as previously mentioned?) |
I use hledger on aarch64-darwin. I’m not super familiar with the Haskell ecosystem, but I’d hate to lose native support, so I’d also be willing to help. |
@sternenseemann any idea what broke things today? https://hydra.nixos.org/job/nixpkgs/nixpkgs-unstable-aarch64-darwin/cachix.aarch64-darwin |
Right, forgot to mention it above apparently. The regression was probably introduced in #147260, my theory is that it has something to do with changing the LLVM version, but I can't be sure. It would be great if someone could do a Additionally it would be helpful if someone could check |
on the latest I am also using a If I try to only install the haskell program with nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.th-compat ])" -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz` I get the following error( see error.txt) the output of If I pick commit
the haskell package builds successfully (and so does my system configuration). This particular commit, only contains some of the changes referenced in #147260 |
The error in the logs, |
The build finished much quicker than I expected. Setting the The best solution, I think, would be to upgrade cctools for automatic ad-hoc signatures and remove the strip and install_name_tool wrappers. For a more short term fix, we could ensure that install_name_tool is always at |
@thefloweringash Thanks! I seem to recall there was a aarch64-darwin-specific strip wrapper as well, should that also be used? |
Yeah, |
Okay, done in 839bcbc8aab8465a78eac7d9a5998d74bbbb5f3c and pushed to that PR as well. |
@sternenseemann I can also confirm that #148116 has fixed issues I was having with ghc and |
I got a few pings that cachix was broken during that day, so people are using aarch64-darwin ghc packages. I'm happy to help maintain it. |
While GHC now can be bootstrapped and built on aarch64-darwin, it seems
to work only to an extent. All sorts of strange issues have manifested
themselves in
haskellPackages
and downstream usage which leads me toconclude that it would be misleading to call it supported on this
platform, especially in a stable channel. To give a few examples,
separate bin outputs just don't work in general [1] and
opt
failsfor unknown reasons in some derivations [2]. As I don't own any
appropriate hardware, I have tried tackling these issues by staring into
my crystal ball, but so far to no avail (even worse, new issues [3] have
cropped up due to changes that should have been an improvement).
Given these circumstances, I'm not willing to call GHC supported on
aarch64-darwin for the stable channel. I'm (for now) hopeful that we can
improve the situation on
master
going forward, but it is notguaranteed that these changes will be backportable without a ton of
effort.
Should it turn out that we can't resolve these issues or maintain GHC's
aarch64-darwin support due to a lack of contributors going forward, I am
also prepared to drop aarch64-darwin support completely. While it has
been proclaimed a Tier 3 platform, I would argue that the “popular”
package GHC has never been working, at least not properly.
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes