Skip to content

GHC 8.0 can't be bootstrapped with GHC 8.0

It seems that GHC 8.0 can't bootstrap itself. With a clean ghc-8.0 tree and ghc from the 8.0.1-rc2 release in PATH on x86-64 Debian things fall apart quite quickly,

$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 8.0.0.20160204
$ ./boot
$ ./configure
$ make -j2
+ test -f mk/config.mk.old
+ cmp -s mk/config.mk mk/config.mk.old
+ cp -p mk/config.mk mk/config.mk.old
touch -r mk/config.mk.old mk/config.mk
+ test -f mk/project.mk.old
+ cmp -s mk/project.mk mk/project.mk.old
touch -r mk/project.mk.old mk/project.mk
+ test -f compiler/ghc.cabal.old
+ cmp -s compiler/ghc.cabal compiler/ghc.cabal.old
touch -r compiler/ghc.cabal.old compiler/ghc.cabal
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
"rm" -f compiler/stage1/build/Config.hs  
"inplace/bin/ghc-cabal" configure libraries/ghc-boot dist-boot "" --with-ghc="/opt/exp/ghc/roots/8.0.1-rc2/bin/ghc" --with-ghc-pkg="/opt/exp/ghc/roots/8.0.1-rc2/bin/ghc-pkg"  --package-db=/opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --with-hscolour="/home/ben/.cabal/bin/HsColour" --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   "   --constraint "binary == 0.8.2.0"   --constraint "Cabal == 1.23.1.0"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot == 8.0.0.20160211"   --constraint "hoopl == 3.10.2.1"   --constraint "transformers == 0.5.1.0"   --constraint "template-haskell == 2.11.0.0"   --constraint "terminfo == 0.4.0.2" --with-gcc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-alex="/home/ben/.cabal/bin/alex" --with-happy="/home/ben/.cabal/bin/happy"
Creating compiler/stage1/build/Config.hs ... 
Configuring ghc-boot-8.0.0.20160211...
done.
ghc-cabal: ghc-pkg dump failed
libraries/ghc-boot/ghc.mk:3: recipe for target 'libraries/ghc-boot/dist-boot/package-data.mk' failed
make[1]: *** [libraries/ghc-boot/dist-boot/package-data.mk] Error 1
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

In particular the failing command is

$ /opt/exp/ghc/roots/8.0.1-rc2/bin/ghc-pkg dump --package-db=/opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf -v2
GHC package manager version 8.0.0.20160204
Timestamp 2016-02-12 09:21:06.076187903 UTC for /opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf/package.cache
Timestamp 2016-02-12 09:21:06.076187903 UTC for /opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf (same as cache)
using cache: /opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf/package.cache
ghc-pkg: /opt/exp/ghc/ghc-8.0/libraries/bootstrapping.conf/package.cache: GHC.PackageDb.readPackageDb: inappropriate type (Not a valid Unicode code point!)
Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ezyang
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information