haskell.compiler.ghc984: self-bootstrap on aarch64 musl#395724
haskell.compiler.ghc984: self-bootstrap on aarch64 musl#395724alyssais merged 3 commits intoNixOS:stagingfrom
Conversation
|
Aaaa, I think my test build was not actually a musl one. This probably needs some more work… |
f714bf1 to
21c3cc9
Compare
|
Okay, that's better. Still wasn't too bad… |
|
Result of test builds: 9.8.1–9.8.3 fail to build, but 9.8.4 (the important one) works. |
If possible, this is preferrable, I think, but we probably don't have to change this right away (maybe do it via staging later?). Bootstrapping GHC is quite fragile (e.g. some weird RTS stuff needs to match), so everything not tested/supported by upstream may break even between minor versions (we've experienced this with self bootstrapping in the past). Since aarch64-musl isn't really exercised on CI as prominently as other platforms, it's probably best to always use the self bootstrapping path to avoid accidental regressions. For the obscure targets e.g. powerpc and armv7l that need to use a source built GHC, it's necessary to keep using 9.6, of course.
Yes, this has been my conclusion so far. I think going forward we can probably make a common expression since all bindists are theoretically produced in the same way since 9.6, but I haven't had time to look into it yet. |
21c3cc9 to
bada3b2
Compare
4e92c67 to
aabce15
Compare
Given this, I've dropped it from 9.8.1–9.8.3 where it didn't build, and left it just for 9.8.4. Still aarch64 musl only for now, but I'm happy to investigate building 9.8.4 with the 9.8.4 bindist where possible as follow-up after this PR is merged. |
sternenseemann
left a comment
There was a problem hiding this comment.
We should merge this into staging directly as to not interfere with the stabilization of the new haskell-updates rotation. the addition of the new bindist could be picked onto master directly, but not sure whether it's worth it. Overall it looks good to me, I'm running some sanity check builds now (though not on aarch64-linux since I don't have a machine available at the moment, but I trust you tested that…).
There was a problem hiding this comment.
Do you know whether this will overwrite config.sub / respects dontUpdateAutotoolsGnuConfigScripts? Otherwise this is a problem since GHC ships a non standard config.sub which is important for ghcjs.
There was a problem hiding this comment.
I was able to build a ghcjs cross compiler, so it seems to be alright.
This is required to apply patches that modify configure.ac and friends, but given we're already including most of it as inputs anyway, we might as well just always do it and get the additional benefit of knowing that the generated code corresponds to the source.
aabce15 to
9e4fefb
Compare
9e4fefb to
eb8998b
Compare
The 9.8 binaries introduce support for aarch64 musl. They can also be used to build ghcHEAD, which previously wasn't buildable with a bindist, so use it there and use the source-built 9.8.4 on platforms without a bindist for consistency. It fails to build 9.10.x and 9.12.x though, so I've left those as they are.
Upstream provides bindists for aarch64 musl since 9.8.x, so use that for building 9.8.x for that platform. A workaround from upstream is required because the bootstrap binaries were built with the wrong target platform.
eb8998b to
fb81a4a
Compare
GHC only provides bootstrap binaries for aarch64 musl since 9.8.x, so we can't bootstrap with the recommended 9.6.x in that case. Fortunately, bootstrapping with 9.8.x seems to work fine.
Some notes:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.