snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

Cannot fetch dependencies GHC 8.4 with stack+nix #537

Closed aspiwack closed 6 years ago

aspiwack commented 6 years ago

On a fresh clone of the tag ghc-8.4.1-release ( ghc/ghc@f31c40efdc918bc9da8a325327ba5a472bd6ea9e ), I performed the following:

$ hadrian/build.stack.nix.sh

It failed after downloading Nix dependencies with this message

No packages found in snapshot which provide a "alex" executable, which is a build-tool dependency of "hadrian"                              
No packages found in snapshot which provide a "happy" executable, which is a build-tool dependency of "hadrian"                             

Error: While constructing the build plan, the following exceptions were encountered:                                                        

In the dependencies for Cabal-2.2.0.0:                                
    parsec-3.1.11 from stack configuration does not match >=3.1.13.0 && <3.2 (latest matching version is 3.1.13.0)                          
    text-1.2.2.2 from stack configuration does not match >=1.2.3.0 && <1.3 (latest matching version is 1.2.3.0)                             
needed since Cabal is a build target.                                 

Some potential ways to resolve this:                                  

  * Recommended action: try adding the following to your extra-deps in /home/aspiwack/projects/tweag/ghc/hadrian/hadrian/stack.yaml:        

- parsec-3.1.13.0                  
- text-1.2.3.0                     

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.                                                             

  * You may also want to try using the 'stack solver' command.        

Plan construction failed.          

Any suggestion of something I'm doing wrong?

For my purpose, I don't necessarily need to compile this particular version. I'm simply trying to setup a programming environment with ghcid, as discussed in ndmitchell/ghcid#140 .

snowleopard commented 6 years ago

@aspiwack I suspect GHC HEAD has a slightly out-of-date Hadrian. Can you try checking out the latest version from this repo? In any case, even if Hadrian compiles, it is unfortunately currently broken until we merge a mammoth PR #531.

snowleopard commented 6 years ago

Given successful build reports in #609, I think we can close this issue.

aspiwack commented 6 years ago

I must confess that I haven't returned to it. Plus, since @kcsongor and @mpickering found a ghcid invocation without hadrian, this wouldn't block me even if it wasn't solved.