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: re-enable aarch64, but disable parallel builds on that arch. #47901
Conversation
This is a workaround for unreliable parallel Haskell builds on aarch64. See https://ghc.haskell.org/trac/ghc/ticket/15449
@@ -48,7 +48,9 @@ in | |||
# We cannot enable -j<n> parallelism for libraries because GHC is far more | |||
# likely to generate a non-determistic library ID in that case. Further | |||
# details are at <https://github.com/peti/ghc-library-id-bug>. | |||
, enableParallelBuilding ? (stdenv.lib.versionOlder "7.8" ghc.version && !isLibrary) || stdenv.lib.versionOlder "8.0.1" ghc.version | |||
# |
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.
Are you using this to force a section break or should this line be removed?
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.
It's just a leftover from a rebase. If the owners agree with the substantive changes, I'll fix it.
If the change is deemed good, I would gladly backport for ZHF #45962. As far as I'm concerned, don't know the haskell infra at all, but the change seems isolated enough to not cause issues; it only tweaks conditionals for parallel building. |
Sweet, thank you! It'll be so nice to have |
Hi @dhess, The last comments regarding the non-deterministic failure on aarch64 seem to suggest that What ARM core(s) do you use for your Based on the above and your (much appreciated) earlier gists, I'm currently building Given how long it takes to build both compiler and the full package set for any given version of GHC, and until Hydra has all Would you be interested in pushing your GHC builds there too? |
Hi @franckrasolo, I also inferred from that comment on the GHC Trac that this is probably a memory ordering bug that only manifests on out-of-order cores. I'm currently using the NixOS community Re: Cachix, I may be interested in that, but I'd prefer to get the official NixOS Hydra building https://hydra.nixos.org/eval/1482713#tabs-new Unfortunately, as you can see from here, GHC 8.4.3 didn't finish, because the build ran out of time in stage1. It looks like the Hydra gives up on a job after 10 hours, but maybe we can convince the admins to bump that for Anyway, let's circle back on this in a week or so after we've given the Hydra admins time to consider the impact of this commit on the |
I'd prefer that too, ideally.
Well, it's somewhat encouraging that Is the error below, taken from the log of one of the
If the latter, a 10-hour timeout at perhaps at best half-way through stage1 would suggest that it might take over a day or so for any given version of GHC to build successfully from source. Could the
Agreed. |
As I mentioned in the other thread, I'm not sure that GHC itself needs to be built with |
@ElvishJerricco Before this fix, I wasn't able to get a working GHC built for I've created a new fork with |
I set master...dhess:ghc-aarch64-parallel Then I started a build and ran the following script on the
That was a bit naive, but it did the trick. During the
... plus a bunch more like this towards the end of the The good news is that However, what's odd is that now that my build has moved on to building the
So it looks like Anyway, I'm going to let it keep running to see if it can successfully build a couple of my packages. |
Update: my test build built There is definitely something odd going on with Thanks to @ElvishJerricco for pointing out that GHC's build system doesn't use |
Yea I forgot that it does a |
I've opened a new PR (#48446) to re-enable parallel builds of GHC on |
This is a workaround for unreliable parallel Haskell builds on
aarch64
. See https://ghc.haskell.org/trac/ghc/ticket/15449Motivation for this change
ghc843
bootstraps fine onaarch64
if you disable parallel builds and are willing to wait awhile. On theaarch64
NixOS community builder, it takes about 9 hours to build (and takes only 1 core, obviously).Many important
haskellPackages
also build successfully with this work-around.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)