Closed georgefst closed 2 years ago
I also ran into the same issue on AArch64/Darwin when building cborg
using GHC 9.2.1 from Nixpkgs. Here is a Nix expression that reproduces the same build failure:
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/546ad5613314121659966da33efe05681ba24641.tar.gz";
sha256 = "08hmcwjxipl2n7fj8wvaigh555bqfq2c8aa8yr9am56zh8hcj4lr";
};
overlay = pkgsNew: pkgsOld: {
haskell = pkgsOld.haskell // {
packages = pkgsOld.haskell.packages // {
ghc921 = pkgsOld.haskell.packages.ghc921.override (old: {
overrides =
pkgsNew.lib.composeExtensions (old.overrides or (_: _: { }))
(haskellPackagesNew: haskellPackagesOld: {
mkDerivation = args: haskellPackagesOld.mkDerivation (args // {
doCheck = false;
doHaddock = false;
});
});
});
};
};
};
pkgs = import nixpkgs { config = {}; overlays = [ overlay ]; };
in
pkgs.haskell.packages.ghc921.cborg
Yep, I've also hit this on an M1 Mac - it seemingly has nothing to do with cross-compiling.
CC-ing @bgamari since he wrote #273.
This should now be fixed by #287
Setting
-f -optimize-gmp
doesn't make any difference. Neither do all the other flags that I usually pass when cross-compiling (--disable-shared
,--with-ghc-pkg
,--with-gcc
etc.). So I've left them all off to keep things simple.The GHC here was built with
ghcup compile ghc -v 9.2.1 -b 8.10.7 -x aarch64-none-linux-gnu -c $(pwd)/build.mk
, with a toolchain from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads, andbuild.mk
containing:Building
cborg
fails: