google / codeworld

Educational computer programming environment using Haskell
http://code.world
Apache License 2.0
1.24k stars 197 forks source link

install.sh falls during cabal bootstraping #975

Closed nixorn closed 5 years ago

nixorn commented 5 years ago

Description

===== IN /home/nixorn/work/codeworld/build/cabal-install-2.4.1.0, RUNNING: ./bootstrap.sh
Using gcc for C compiler. If this is not what you want, set CC.
Using /usr/lib/gcc/x86_64-linux-gnu/7/collect2 instead.
Checking installed packages for ghc-8.6.5...
deepseq is already installed and the version is ok.
binary is already installed and the version is ok.
time is already installed and the version is ok.
transformers is already installed and the version is ok.
mtl is already installed and the version is ok.
text is already installed and the version is ok.
parsec is already installed and the version is ok.
network-uri is already installed and the version is ok.
network is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
random is already installed and the version is ok.
stm is already installed and the version is ok.
hashable is already installed and the version is ok.
async is already installed and the version is ok.
base16-bytestring is already installed and the version is ok.
base64-bytestring is already installed and the version is ok.
cryptohash-sha256 is already installed and the version is ok.
resolv is already installed and the version is ok.
mintty is already installed and the version is ok.
echo is already installed and the version is ok.
edit-distance is already installed and the version is ok.
ed25519 is already installed and the version is ok.
tar is already installed and the version is ok.
digest is already installed and the version is ok.
zip-archive is already installed and the version is ok.
hackage-security is already installed and the version is ok.
Cabal is already installed and the version is ok.
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )

Setup.hs:1:1: error:
    Could not find module ‘Distribution.PackageDescription’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
  |
1 | import Distribution.PackageDescription ( PackageDescription )
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Setup.hs:2:1: error:
    Could not find module ‘Distribution.Simple’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
  |
2 | import Distribution.Simple ( defaultMainWithHooks
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Setup.hs:8:1: error:
    Could not find module ‘Distribution.Simple.InstallDirs’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
  |
8 | import Distribution.Simple.InstallDirs ( mandir
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Setup.hs:11:1: error:
    Could not find module ‘Distribution.Simple.LocalBuildInfo’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
11 | import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(..)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Setup.hs:14:1: error:
    Could not find module ‘Distribution.Simple.Utils’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
14 | import Distribution.Simple.Utils ( installOrdinaryFiles
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Setup.hs:16:1: error:
    Could not find module ‘Distribution.Simple.Setup’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
16 | import Distribution.Simple.Setup ( buildVerbosity
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Setup.hs:22:1: error:
    Could not find module ‘Distribution.Verbosity’
    There are files missing in the ‘Cabal-2.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
22 | import Distribution.Verbosity ( Verbosity )
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error during cabal-install bootstrap:
Compiling the Setup script failed.
nixorn commented 5 years ago

bootstrap.sh runned by hands from regular environment works.

cdsmith commented 5 years ago

Were you running on top of the existing code? If your GHC installation was already broken for some reason, then this might be happening for the same reason you had the build errors before.

I'm about to push a change to use ghcup to install GHC and Cabal. This will skip the step that's failing. However, it still might fail later if there's something broken. If so, I'd suggest deleting ~/.cabal, ~/.ghc, and codeworld/build, and then reinstalling. It should at least be faster after this coming change.