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

haskellPackages.ghc not available on aarch64 #80176

Closed
thefloweringash opened this issue Feb 15, 2020 · 5 comments · Fixed by #80355
Closed

haskellPackages.ghc not available on aarch64 #80176

thefloweringash opened this issue Feb 15, 2020 · 5 comments · Fixed by #80355
Labels
0.kind: bug Something is broken 1.severity: blocker This is preventing another PR or issue from being completed 6.topic: haskell 9.needs: port to stable A PR needs a backport to the stable release.

Comments

@thefloweringash
Copy link
Member

thefloweringash commented Feb 15, 2020

On current master (74e9b17).

nix-build -A haskellPackages.ghc

Fails with

[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM 3.9

<no location info>: error: ghc: could not execute: opt

builder for '/nix/store/dazj2j2ccmg1kklfgn5igl77v7sbxk7m-hscolour-1.24.4.drv' failed with exit code 1

See also the full log.

Additional context

The hscolour derivation mentioned here does not contain llvm in its buildInputs. It seems sufficient to make llvm be a propagated build input for ghc-8.2.2-binary, after doing so I can build ghc itself.

diff --git a/pkgs/development/compilers/ghc/8.2.2-binary.nix b/pkgs/development/compilers/ghc/8.2.2-binary.nix
index 1f24b9a1ff2..bd1b8833087 100644
--- a/pkgs/development/compilers/ghc/8.2.2-binary.nix
+++ b/pkgs/development/compilers/ghc/8.2.2-binary.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
     or (throw "cannot bootstrap GHC on this platform"));
 
   nativeBuildInputs = [ perl ];
-  buildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64) [ llvm ];
+  propagatedBuildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64) [ llvm ];
 
   # Cannot patchelf beforehand due to relative RPATHs that anticipate
   # the final install location/

There's a lot of

You are using an unsupported version of LLVM!
Currently only 3.9 is supported.

Metadata

 - system: `"aarch64-linux"`
 - host os: `Linux 4.19.68, NixOS, 19.09.2070.b9cb3b2fb2f (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.2`
 - channels(root): `"nixos-19.09.2070.b9cb3b2fb2f"`
 - channels(lorne): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

attribute: haskellPackages.ghc
@thefloweringash thefloweringash added the 0.kind: bug Something is broken label Feb 15, 2020
@cdepillabout
Copy link
Member

@thefloweringash Can you send a PR fixing this?

@thefloweringash
Copy link
Member Author

@thefloweringash Can you send a PR fixing this?

Done, see #80355

@vcunat vcunat added the 9.needs: port to stable A PR needs a backport to the stable release. label Feb 17, 2020
@vcunat
Copy link
Member

vcunat commented Feb 17, 2020

  • port to release-20.03

@vcunat vcunat added the 1.severity: blocker This is preventing another PR or issue from being completed label Feb 17, 2020
@thefloweringash
Copy link
Member Author

Since this issue was opened the situation has changed. There's still no ghc on aarch64, but now it fails due to the lack of aarch64 support in bootPkgs (aka ghc863Binary).

@thefloweringash thefloweringash changed the title haskellPackages.ghc doesn't build on aarch64 due to hscolour haskellPackages.ghc not available on aarch64 Mar 18, 2020
@vcunat
Copy link
Member

vcunat commented Mar 24, 2020

After PR #83048 the default ghc builds for aarch64 (8c06685, ATM only in haskell-updates branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 1.severity: blocker This is preventing another PR or issue from being completed 6.topic: haskell 9.needs: port to stable A PR needs a backport to the stable release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants