<br><br><div class="gmail_quote">On Wed, Apr 22, 2009 at 12:32 AM, Duncan Coutts <span dir="ltr"><<a href="mailto:duncan.coutts@worc.ox.ac.uk" target="_blank">duncan.coutts@worc.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Tue, 2009-04-21 at 12:31 +0200, david48 wrote:<br>
> For what it's worth, It's bothered me often enough that cabal doesn't<br>
> install globally by default that I had to reinstall ghc in order to<br>
> solve package issues.<br>
<br>
</div>Do you know what the problem was exactly? It's possible to get problems<br>
with overlap between the user and global package dbs, but the exact same<br>
problems can also happen just within the global package db.</blockquote><div><br><br>One problem I had was while installing Lehksah. ( It was you who pointed me to the solution, thanks. )<br>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) <br>
Also, I think it's been a while I managed to do a cabal upgrade which didn't stop on a dependency issue.<br><br>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.<br>
<br>1) Installing GHC 6.10.2 from the tarball, I decided to give it a try to ./configure --prefix="/home/david/local"<br>2) Adding /home/david/local' to my PATH<br>3) I find a binary for cabal-install 0.6.0,<br>
4) cabal update<br>5) cabal install cabal-install<br><br>Proceeds to download and compile HTTP-4000.0.6, then zlib-0.5.0.0 which fails because I don't have zlib.h on this new system.<br><br>david@pcdavid2:~$ sudo apt-get install<br>
... 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.<br><br>david@pcdavid2:~$ cabal-0.6.0 install cabal-install again.<br>This time zlib-0.5.0.0 compiles, but then :<br>
/usr/bin/ld: cannot find -lgmp<br><br>david@pcdavid2:~$ sudo apt-get install libgmp3-dev<br><br>david@pcdavid2:~$ download/cabal-0.6.0 install cabal-install againagain.<br><br>This time all goes well except that:<br>Installing executable(s) in /home/david/.cabal/bin<br>
why the hell would cabal install binaries in a subdirectory of a hidden directory. Why not /home/david/bin or /home/david/local/bin ?<br><br>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.<br>
<br>So, deleting .cabal and local, reinstalling ghc. I kept the de-tarred directory around, so it's really quick. <br>cabal-update again, make sure config has the right path.<br>oops. Cabal thinks zlib is still around, I thought I had deleted that.<br>
<br>Looks like reinstalling ghc didn't rewrite my package list. removing .ghc and trying again.<br>Now something else.<br><br>david@pcdavid2:~$ ghc-pkg check<br>There are problems in package rts-1.0:<br> include-dirs: PAPI_INCLUDE_DIR doesn't exist or isn't a directory<br>
<br>The following packages are broken, either because they have a problem<br>listed above, or because they depend on a broken package.<br>rts-1.0<br>haddock-2.4.2<br>ghc-prim-0.1.0.0<br>integer-0.1.0.1<br>base-4.1.0.0<br>
...<br><br>Solution :<br>david@pcdavid2:~$ ghc-pkg describe rts | sed 's/PAPI_INCLUDE_DIR//' | ghc-pkg update -<br><br>david@pcdavid2:~$ download/cabal-0.6.0 install cabal-install<br>
Linking dist/build/cabal/cabal ...<br>Installing executable(s) in /home/david/.cabal/bin<br><br>WTF?<br><br>david@pcdavid2:~$ vi .cabal/config<br>install-dirs user<br> -- prefix: /home/david/local<br> -- bindir: $prefix/bin<br>
-- libdir: $prefix/lib<br><br>I give up for now.<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br></div></div>