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 37 forks source link

Clean GHC clone, "getDirectoryContents: does not exist" error #644

Closed osa1 closed 6 years ago

osa1 commented 6 years ago

I just did a git pull, make distclean, git clean -f etc. and my tree is clean. However after ./boot and ./configure, ./hadrian/build.sh fails with this:

/----------------------------------------------------------------------------------------\
| Successfully built library 'ghc-boot-th' (Stage0, way v).                              |
| Library: _build/stage0/libraries/ghc-boot-th/build/libHSghc-boot-th-8.7.a              |
| Library synopsis: Shared functionality between GHC and the @template-haskell@
library. |
\----------------------------------------------------------------------------------------/
././tools/derive: getDirectoryContents:openDirStream: does not exist (No such file or directory)
shakeArgsWith   0.000s    0%
Function shake  0.270s    1%
Database read   0.000s    0%
With database   0.000s    0%
Running rules  15.245s   98%  =========================
Total          15.516s  100%
Error when running Shake build system:
* _build/stage1/lib/bin/unlit
* OracleQ (PackageDataFile (Context {stage = Stage1, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "unlit", pkgPath = "utils/unlit"}, way = v}))
* _build/stage1/utils/unlit/setup-config
* _build/stage0/bin/ghc
* OracleQ (PackageDataFile (Context {stage = Stage0, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "ghc-bin", pkgPath = "ghc"}, way = v}))
* _build/stage0/ghc/setup-config
* _build/stage0/lib/package.conf.d/ghc-boot-8.7.conf
* OracleQ (PackageDataFile (Context {stage = Stage0, package = Package {pkgLanguage = Haskell, pkgType = Library, pkgName = "ghc-boot", pkgPath = "libraries/ghc-boot"}, way = v}))
* _build/stage0/libraries/ghc-boot/setup-config
* _build/stage0/lib/package.conf.d/binary-0.8.5.1.conf
* OracleQ (PackageDataFile (Context {stage = Stage0, package = Package {pkgLanguage = Haskell, pkgType = Library, pkgName = "binary", pkgPath = "libraries/binary"}, way = v}))
* _build/stage0/libraries/binary/setup-config
ExitFailure 1

Not sure if relevant but cabal version:

cabal-install version 2.0.0.1
compiled using version 2.0.1.1 of the Cabal library
alpmestan commented 6 years ago

This is a bug in Cabal, tracked in https://github.com/snowleopard/hadrian/issues/634 -- where we also give instructions (that our CI uses) to use the right Cabal branch, until the patch propagates to Cabal and then to GHC head.

snowleopard commented 6 years ago

Thanks @alpmestan!

@osa1 Hopefully, Cabal will be soon fixed upstream, but in the meanwhile you can bump your Cabal library locally. I'm closing this, but if you need further help, don't hesitate to get in touch!