Skip to content

can't build GHC

My colleague tried to build GHC following step 3 of the instructions I gave him:

1. Add cabal-install's bin directory to your path. You may want to add a line
like this to your ~/.bashrc or similar file, as well.

export PATH=$HOME/.cabal/bin:$PATH

2. Install recent versions of alex (the Haskell lexer generator) and happy (the
Haskell parser generator). If you already have old versions of these, add
--reinstall.

cabal install alex happy

3. Install the most recent GHC (>=7.3). There's lots of information on the wiki
(http://hackage.haskell.org/trac/ghc/wiki/Building), but the short version that
assumes nothing goes wrong looks like this:

git clone http://darcs.haskell.org/ghc.git
cd ghc
./sync-all --testsuite get
perl boot
./configure
make
# get a coffee
make install

He is using GHC 6.12 for bootstrapping; the installation died with the error below:

**************** lots of messages deleted ***********************
/usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.3.20111114"
for i in utils/haddock/dist/build/tmp/haddock utils/hsc2hs/dist-install/build/tmp/hsc2hs utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/runghc/dist-install/build/tmp/runghc ghc/stage2/build/tmp/ghc-stage2; do \
                /usr/bin/install -c -m 755  $i "/usr/local/lib/ghc-7.3.20111114"; \
        done
"mv" "/usr/local/lib/ghc-7.3.20111114/ghc-stage2" "/usr/local/lib/ghc-7.3.20111114/ghc"
/usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.3.20111114"
"rm" -rf "/usr/local/lib/ghc-7.3.20111114/package.conf.d"
/usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-7.3.20111114/package.conf.d"
"/usr/local/lib/ghc-7.3.20111114/ghc-pkg" --force --global-conf "/usr/local/lib/ghc-7.3.20111114/package.conf.d" update rts/package.conf.install
Reading package info from "rts/package.conf.install" ... done.
"inplace/bin/ghc-cabal" install "/usr/local/lib/ghc-7.3.20111114/ghc" "/usr/local/lib/ghc-7.3.20111114/ghc-pkg" "strip" "/usr/local/lib/ghc-7.3.20111114" libraries/ghc-prim dist-install '' '/usr/local' '/usr/local/lib/ghc-7.3.20111114' '/usr/local/share/doc/ghc/html/libraries' NO
Installing library in /usr/local/lib/ghc-7.3.20111114/ghc-prim-0.2.0.0
ghc-cabal: Error: Could not find module: GHC.Classes with any suffix: ["p_hi"]
in the search path: ["dist-install/build"]
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2
Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information