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

Native aarch64 support #620

Merged
merged 3 commits into from
Jun 4, 2020

Conversation

TravisWhitaker
Copy link
Contributor

This will allow haskell.nix to be used for native builds on aarch64. There are a few changes necessary for this:

  • The first GHC that works reasonably well on modern aarch64 chips is 8.8.2, so that's what we'll need to use to bootstrap. That's added to old-ghc-nix here: Add 8.8.x, add aarch64 binaries. angerman/old-ghc-nix#7
  • Only Debian bindists are provided by upstream for aarch64, and Debian bindists have a runtime dependency on libnuma. That means the stage 1 GHC we build will depend on libnuma too, so we need to have it available when building since the bootstrapping GHC might depend on it. Perhaps we should add a check that ensures the stage 2 we build doesn't depend on libnuma?

@TravisWhitaker TravisWhitaker force-pushed the aarch64-native branch 3 times, most recently from d3ac22a to 2f04bf4 Compare May 20, 2020 18:42
@TravisWhitaker TravisWhitaker changed the title WIP: native aarch64 Native aarch64 support May 20, 2020
@TravisWhitaker TravisWhitaker force-pushed the aarch64-native branch 5 times, most recently from c23f9c3 to bd3a91b Compare May 22, 2020 23:10
@TravisWhitaker
Copy link
Contributor Author

Working on rebasing this...

overlays/bootstrap.nix Outdated Show resolved Hide resolved
@angerman
Copy link
Collaborator

This looks pretty good, I just wish we had some earlier bootstrap compiler. I'd love to try our 8.6.5 natively on aarch64 with haskell.nix

@TravisWhitaker TravisWhitaker force-pushed the aarch64-native branch 5 times, most recently from dd0e3f6 to 6079f9d Compare May 28, 2020 21:25
compiler/ghc/default.nix Outdated Show resolved Hide resolved
@@ -172,7 +172,7 @@ final: prev: {
# Package sets for all stackage snapshots.
snapshots = import ../snapshots.nix { inherit (final) lib ghc-boot-packages; inherit mkPkgSet stackage excludeBootPackages; };
# Pick a recent LTS snapshot to be our "default" package set.
haskellPackages = snapshots."lts-14.13";
haskellPackages = snapshots."lts-15.13";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand the motivation for this, though this should be a separate PR, as it bumps the default compiler in haskell.nix from 8.6 to 8.8.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you rather have the LTS major version depend on the target architecture in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^^^ Went ahead and added this for now.

snapshots.nix Outdated Show resolved Hide resolved
@TravisWhitaker TravisWhitaker force-pushed the aarch64-native branch 4 times, most recently from 0e6847b to ffcbaf6 Compare May 29, 2020 23:14
@angerman
Copy link
Collaborator

angerman commented Jun 3, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Jun 3, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 3, 2020

try

Build failed

@angerman
Copy link
Collaborator

angerman commented Jun 4, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Jun 4, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 4, 2020

try

Build failed

@angerman
Copy link
Collaborator

angerman commented Jun 4, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Jun 4, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 4, 2020

@angerman angerman merged commit ed67395 into input-output-hk:master Jun 4, 2020
@TravisWhitaker
Copy link
Contributor Author

@angerman thanks so much for all your help with aarch64 support!

booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
* native aarch64 support

Co-authored-by: Moritz Angermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants