hpaste

recent | annotate | new

I've installed GHC 6.9 recently. Now there are two GHCs in my system:

  $ ls -l ~/bin/ghc /etc/alternatives/ghc
  lrwxrwxrwx 1 root root 26 2007-10-23 12:10 /etc/alternatives/ghc -> /usr/lib/ghc-6.6.1/bin/ghc
  lrwxrwxrwx 1 vvv  vvv  16 2007-11-30 17:19 /home/vvv/bin/ghc -> ghc-6.9.20071130

The newer one takes precedence:

  $ which ghc
  /home/vvv/bin/ghc

Unfortunately, I can't configure `xmonad' with this configuration.

  $ cd ~/src/xmonad
  $ runhaskell Setup.lhs clean
  cleaning...
  $ runhaskell Setup.lhs configure --prefix=$HOME --user
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      base <3, unix -any

  $ runhaskell Setup.lhs configure --prefix=$HOME --user -f small_base
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      base >=3, containers -any, directory -any, process -any, unix -any

All mentioned dependencies seem to be in place:

  $ ghc-pkg list
  /home/vvv/lib/ghc-6.9.20071130/package.conf:
      Cabal-1.3, array-0.1, base-3.0, bytestring-0.9, containers-0.1,
      directory-1.0, filepath-1.1, (ghc-6.9.20071130), haskell98-1.0.1,
      hpc-0.5, old-locale-1.0, old-time-1.0, packedstring-0.1,
      pretty-1.0, process-1.0, random-1.0, readline-1.0.1, rts-1.0,
      template-haskell-2.2, unix-2.2
  /home/vvv/.ghc/i386-linux-6.9.20071130/package.conf:
      X11-1.4.0, mtl-1.1.0.0

Any ideas?

Could the problem relate to the GHC configuration settings?

  $ cat /home/vvv/src/ghc/mk/build.mk
  # "build fast" settings, copied from http://hackage.haskell.org/trac/ghc/wiki/Building/Hacking
  SRC_HC_OPTS     = -H32m -O -fasm -Rghc-timing
  GhcStage1HcOpts = -O0 -DDEBUG -W
  GhcLibHcOpts    = -O -fgenerics
  GhcLibWays      =
  SplitObjs       = NO
  GhcBootLibs     = YES

Just to hinder "remove `--user'" suggestions...

  $ runhaskell Setup.lhs configure --prefix=$HOME
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      X11 ==1.4.0, mtl -any
  $ runhaskell Setup.lhs configure --prefix=$HOME -f small_base
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      X11 ==1.4.0, mtl -any

Well, the idea (suggested by sjanssen) is to install the latest stable
Cabal and hide the one coming with GHC.

NB, it doesn't configure with `--user':

  $ runhaskell Setup.lhs configure --prefix=$HOME --user
  Configuring Cabal-1.2.2.0...
  Setup.lhs: At least the following dependencies are missing:
      base <3, filepath -any

  $ runhaskell Setup.lhs configure --prefix=$HOME --user -f small_base
  Configuring Cabal-1.2.2.0...
  Setup.lhs: At least the following dependencies are missing:
      base >=3,
      pretty -any,
      directory -any,
      old-time -any,
      process -any,
      containers -any,
      filepath -any

So, the procedure is:

  $ cd cabal-1.2.2.0
  $ runhaskell Setup.lhs configure --prefix=$HOME
  $ runhaskell Setup.lhs build
  $ runhaskell Setup.lhs install --user
  $ ghc-pkg hide Cabal-1.3

This gives us:

  $ ghc-pkg list
  /home/vvv/lib/ghc-6.9.20071130/package.conf:
      (Cabal-1.3), array-0.1, base-3.0, bytestring-0.9, containers-0.1,
      directory-1.0, filepath-1.1, (ghc-6.9.20071130), haskell98-1.0.1,
      hpc-0.5, old-locale-1.0, old-time-1.0, packedstring-0.1,
      pretty-1.0, process-1.0, random-1.0, readline-1.0.1, rts-1.0,
      template-haskell-2.2, unix-2.2
  /home/vvv/.ghc/i386-linux-6.9.20071130/package.conf:
      Cabal-1.2.2.0, X11-1.4.0, mtl-1.1.0.0

But the problem persists:

  $ cd xmonad
  $ runhaskell Setup.lhs clean
  cleaning...
  $ runhaskell Setup.lhs configure --prefix=$HOME
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      X11 ==1.4.0, mtl -any
  $ runhaskell Setup.lhs configure --prefix=$HOME --user
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      base <3, unix -any
  $ runhaskell Setup.lhs configure --prefix=$HOME --user -f small_base
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      base >=3, containers -any, directory -any, process -any, unix -any
  $ runhaskell Setup.lhs configure --prefix=$HOME -f small_base
  Configuring xmonad-0.4...
  Setup.lhs: At least the following dependencies are missing:
      X11 ==1.4.0, mtl -any

:(