Opened 4 years ago

Closed 4 years ago

#5638 closed bug (fixed)

can't build GHC

Reported by: dmwit Owned by:
Priority: normal Milestone: 7.4.1
Component: Compiler Version: 7.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Change History (3)

comment:1 Changed 4 years ago by daniel.is.fischer

Worksforme™ (ghc-7.3.20111116, bootstrapped with 7.2.2, however). Has anyone looked in ghc/libraries/ghc-prim/dist-install/build/GHC whether the p_hi files are present?

Anyway, let him try again

$ make maintainer-clean
$ git pull && ./sync-all pull
$ perl boot
$ ./configure  # --prefix=?
$ make && make install

to check whether it's a one-off glitch or recurring.

comment:2 Changed 4 years ago by igloo

  • Milestone set to 7.4.1
  • Status changed from new to infoneeded

comment:3 Changed 4 years ago by dmwit

  • Resolution set to fixed
  • Status changed from infoneeded to closed

Sorry I forgot to come back with an update. Running "make maintainer-clean" and starting over seemed to have fixed the problem, whatever it was.

Note: See TracTickets for help on using tickets.