[Nix-dev] Our Haskell setup no longer works with GHC HEAD/soon 7.10
Mateusz Kowalczyk
fuuzetsu at fuuzetsu.co.uk
Thu Dec 11 11:38:34 CET 2014
On 12/11/2014 10:36 AM, Mateusz Kowalczyk wrote:
> Hi,
>
> If you build the existing (outdated) GHC HEAD expression from nixpkgs
> then you'll find that GHC itself works fine. The problem is that it no
> longer works for packages. If we try to build any package with recent
> GHC, we'll encounter something like:
>
> …
> [17 of 17] Compiling Main ( HsColour.hs,
> dist/build/HsColour/HsColour-tmp/Main.o )
>
> HsColour.hs:71:1: Warning: Tab character
> Linking dist/build/HsColour/HsColour ...
> Running Haddock for hscolour-1.20.3...
> Preprocessing library hscolour-1.20.3...
> haddock: internal error: ./package.cache: openBinaryFile: does not exist
> (No such file or directory)
> builder for
> `/nix/store/l25ci5b58i6jrfg8pgsdgx6didmwdrns-haskell-hscolour-ghcHEAD-1.20.3.drv'
> failed with exit code 1
> error: build of
> `/nix/store/l25ci5b58i6jrfg8pgsdgx6didmwdrns-haskell-hscolour-ghcHEAD-1.20.3.drv'
> failed
> /run/current-system/sw/bin/nix-shell: failed to build all dependencies
>
> The above is for hscolourBootstrap which is pretty much always going to
> be built first. I'm also using an actually recent GHC checkout I got
> manually. If you're doing that then you'll need
>
> libraries/integer-gmp2_CONFIGURE_OPTS +=
> --configure-option=--with-gmp-libraries="${gmp}/lib"
> libraries/integer-gmp2_CONFIGURE_OPTS +=
> --configure-option=--with-gmp-includes="${gmp}/include"
>
> in buildMK now. I can update the expression in nixpkgs upon request: the
> current version will produce slightly different error.
>
> In any case, this is a problem for us (Haskell users) because this is
> probably how GHC 7.10 will come out: in fact I am hitting this when
> trying to use it for some Haddock merges to push 7.10 RC forwards… It
> was suggested to me that perhaps the used Cabal library version is too
> old or cabal-install was built with too old version but AFAICT we don't
> use cabal-install and the used Cabal is that from GHC tree.
>
> My time is unfortunately very limited this month so I am writing here in
> case someone wants to jump in and start figuring this out. If it's not
> figured out now then it will potentially slow down the GHC 7.10 adoption
> in nixpkgs.
>
Oh, one more thing I forgot to say: there *are* big cabal changes
happening from 7.8.3 to 7.10.x so it's not like this is due to some
weird bug somewhere; rather, we need to adapt to the new way things are
done and investigating what this involves is precisely what needs
figuring out ;)
--
Mateusz K.
More information about the nix-dev
mailing list