
So I was wanting to try out some code that relies on 6.10, I'm using ubuntu 8.04. Also, I'd like to have cabal installed so I can get and install packages easily. I found some directions online that said that compiling from source might be a good way to go. I downloaded and compiled ghc 6.10.1, installing it locally. The directions I used: ----------- directions ------------ I use 6.8.3 and 6.10.1 on ubuntu without problems. I always build ghc from source. It takes a bit of cpu time, but not much effort on my part. Assuming I've got an older version of GHC in my path, here's all I do: tar -xjf ~/Downloads/ghc-6.10.1-src.tar.bz2 tar -xjf ~/Downloads/ghc-6.10.1-src-extralibs.tar.bz2 cd ghc-6.10.1/ echo "HADDOCK_DOCS = YES" >mk/build.mk ./configure --prefix /usr/local/ghc-6.10.1 make -j sudo make install ------- end of directions -------- Ok so I did this. It works! Then, wanting to keep things simple, I removed ghc 6.8.3 so I'd only have one compiler and libraries around - lessening the chance of wierd conflicts. Done. Now to install cabal-install. Directions I got: - unpack cabal-install-0.6.2.tar.gz somewhere - cd into the resulting directory and run "sh bootstrap.sh" - add "~/.cabal/bin" to you path. Unfortunately, this doesn't work for me. bootstrap.sh requires parsec and network. parsec, in turn, requires mtl. - installed mtl - installed parsec Ok. Now when I go to build network I get this: Could not find module `Data.Generics': it is a member of package base-3.0.3.0, which is hidden According to google, the above message actually indicates that 'syb' is needed, the bug is here: http://hackage.haskell.org/trac/ghc/ticket/2980 - installed syb-0.1.0.0. - still get the same message. At this point I'm stuck! I should say that I'm using this to install all these things: runhaskell Setup configure --user runhaskell Setup build runhaskell Setup install So everything is installed 'locally' and not globally. Thanks for any help with this - I feel like this is harder than it is supposed to be, what am I missing??

B wrote:
I found some directions online that said that compiling from source might be a good way to go. I downloaded and compiled ghc 6.10.1, installing it locally.
Next time include the extra-libraries in your sources, to avoid installing so many packages afterwards.
Ok. Now when I go to build network I get this: Could not find module `Data.Generics': it is a member of package base-3.0.3.0, which is hidden
According to google, the above message actually indicates that 'syb' is needed, the bug is here: http://hackage.haskell.org/trac/ghc/ticket/2980
- installed syb-0.1.0.0. - still get the same message.
At this point I'm stuck!
Are you sure you have version 2.2.0.1 http://hackage.haskell.org/packages/archive/network/2.2.0.1/network-2.2.0.1.... This package does not need syb as dependency. The file Network/URI.hs contains: #ifdef BASE4 import Data.Data ( Data ) #else import Data.Generics ( Data ) #endif and network.cabal sets the appropriate flag: if flag(base4) build-depends: base>=4 cpp-options: -DBASE4
I should say that I'm using this to install all these things:
runhaskell Setup configure --user runhaskell Setup build runhaskell Setup install
So everything is installed 'locally' and not globally.
This should be fine. HTH Christian

Christian Maeder wrote:
B wrote:
I found some directions online that said that compiling from source might be a good way to go. I downloaded and compiled ghc 6.10.1, installing it locally.
Next time include the extra-libraries in your sources, to avoid installing so many packages afterwards.
Ok. Now when I go to build network I get this: Could not find module `Data.Generics': it is a member of package base-3.0.3.0, which is hidden
According to google, the above message actually indicates that 'syb' is needed, the bug is here: http://hackage.haskell.org/trac/ghc/ticket/2980
- installed syb-0.1.0.0. - still get the same message.
At this point I'm stuck!
Are you sure you have version 2.2.0.1 http://hackage.haskell.org/packages/archive/network/2.2.0.1/network-2.2.0.1.... This package does not need syb as dependency.
The file Network/URI.hs contains: #ifdef BASE4 import Data.Data ( Data ) #else import Data.Generics ( Data ) #endif
and network.cabal sets the appropriate flag: if flag(base4) build-depends: base>=4 cpp-options: -DBASE4
I should say that I'm using this to install all these things:
runhaskell Setup configure --user runhaskell Setup build runhaskell Setup install
So everything is installed 'locally' and not globally.
This should be fine.
HTH Christian
Thanks for the reply Christian (and the others who replied off-list). The wrong network package was exactly the problem, for some reason I had 2.2.0.0 instead of 2.2.0.1. Also, I believe I may have had some things left over from a previous install in ~/.ghc. Anyway, my resolution was to delete the ghc folder from /usr/local, delete .cabal and .ghc from ~, and start over from scratch. Too bad this process isn't more automated! I did learn a lot along the way, but it was a bit frustrating. My only real question now is how one might install all this globally rather than locally. In ubuntu I couldn't figure out how to add ghc to my path so that sudo would pick it up. That's why I ended up with the local install approach.
participants (2)
-
B
-
Christian Maeder