<br><br><div class="gmail_quote">On Wed, Apr 22, 2009 at 12:32 AM, Duncan Coutts <span dir="ltr">&lt;<a href="mailto:duncan.coutts@worc.ox.ac.uk" target="_blank">duncan.coutts@worc.ox.ac.uk</a>&gt;</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>
&gt; For what it&#39;s worth, It&#39;s bothered me often enough that cabal doesn&#39;t<br>
&gt; install globally by default that I had to reinstall ghc in order to<br>
&gt; solve package issues.<br>
<br>
</div>Do you know what the problem was exactly? It&#39;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&#39;t with a package problem. I didn&#39;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&#39;s been a while I  managed to do a cabal upgrade which didn&#39;t stop on a dependency issue.<br><br>Since I didn&#39;t write down the exact problems I had, I&#39;m attempting a fresh install, and I&#39;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=&quot;/home/david/local&quot;<br>2) Adding /home/david/local&#39; 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&#39;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&#39;s already two packages installed and downloaded there, and I don&#39;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&#39;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&#39;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&#39;t exist or isn&#39;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 &#39;s/PAPI_INCLUDE_DIR//&#39; | 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>