[Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) -- first release

david48 dav.vire+haskell at gmail.com
Wed Apr 22 06:21:54 EDT 2009

On Wed, Apr 22, 2009 at 12:32 AM, Duncan Coutts <duncan.coutts at worc.ox.ac.uk
> wrote:

> On Tue, 2009-04-21 at 12:31 +0200, david48 wrote:
> > For what it's worth, It's bothered me often enough that cabal doesn't
> > install globally by default that I had to reinstall ghc in order to
> > solve package issues.
> Do you know what the problem was exactly? It's possible to get problems
> with overlap between the user and global package dbs, but the exact same
> problems can also happen just within the global package db.

One problem I had was while installing Lehksah. ( It was you who pointed me
to the solution, thanks. )
The last problem was for installing wxhaskell from the source. The first
part compiled just fine, but the second wouldn't with a package problem. I
didn't want to bother searching what the problem was, so I thought it was
faster to reinstall ghc and compile wxhaskell then. (it worked)
Also, I think it's been a while I managed to do a cabal upgrade which didn't
stop on a dependency issue.

Since I didn't write down the exact problems I had, I'm attempting a fresh
install, and I'll write down what happens as I go.

1) Installing GHC 6.10.2 from the tarball, I decided to give it a try to
./configure --prefix="/home/david/local"
2) Adding /home/david/local' to my PATH
3) I find a binary for cabal-install 0.6.0,
4) cabal update
5) cabal install cabal-install

Proceeds to download and compile HTTP-4000.0.6, then zlib- which
fails because I don't have zlib.h on this new system.

david at pcdavid2:~$ sudo apt-get install
... well there is no zlib-dev, libzlib-dev available on Jaunty. there is a
zlib1-dev which fails to install, and a zlib1g-dev which works.

david at pcdavid2:~$ cabal-0.6.0 install cabal-install   again.
This time zlib- compiles, but then :
/usr/bin/ld: cannot find -lgmp

david at pcdavid2:~$ sudo apt-get install libgmp3-dev

david at pcdavid2:~$ download/cabal-0.6.0 install cabal-install   againagain.

This time all goes well except that:
Installing executable(s) in /home/david/.cabal/bin
why the hell would cabal install binaries in a subdirectory of a hidden
directory. Why not /home/david/bin or /home/david/local/bin ?

Ok so I find out the setting to change in .cabal/configure, but there's
already two packages installed and downloaded there, and I don't know how to
change them to the correct location.

So, deleting .cabal and local, reinstalling ghc. I kept the de-tarred
directory around, so it's really quick.
cabal-update again, make sure config has the right path.
oops. Cabal thinks zlib is still around, I thought I had deleted that.

Looks like reinstalling ghc didn't rewrite my package list. removing .ghc
and trying again.
Now something else.

david at pcdavid2:~$ ghc-pkg check
There are problems in package rts-1.0:
  include-dirs: PAPI_INCLUDE_DIR doesn't exist or isn't a directory

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.

Solution :
david at pcdavid2:~$ ghc-pkg describe rts | sed 's/PAPI_INCLUDE_DIR//' |
ghc-pkg update -

david at pcdavid2:~$ download/cabal-0.6.0 install cabal-install
Linking dist/build/cabal/cabal ...
Installing executable(s) in /home/david/.cabal/bin


david at pcdavid2:~$ vi .cabal/config
install-dirs user
  -- prefix: /home/david/local
  -- bindir: $prefix/bin
  -- libdir: $prefix/lib

I give up for now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090422/213e5eab/attachment-0001.htm

More information about the Haskell-Cafe mailing list