Problems installing the haskell platform

Dear Group, Greetings. I've been using haskell for about a year now, though I will readily admit I still don't really know what I am doing when I get error messages. Today I decided to reset my haskell environment from scratch, avoiding the debian packages and going straight to the source. 1. Install ghc from http://www.haskell.org/ghc/download_ghc_6_12_3 Success!! ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 cabal update Downloading the latest package list from hackage.haskell.org 2. Next I downloaded the haskell platform and ran cabal install Problems!! cabal: Error: some packages failed to install: haskell-platform-2010.2.0.0 depends on stm-2.1.2.1 which failed to install. stm-2.1.2.1 failed during the building phase. The exception was: ExitFailure 1 3. So I tried installing stm manually, which for some unknown reason worked: runghc Setup.hs install Installing library in /usr/local/lib/stm-2.1.2.1/ghc-6.12.3 Registering stm-2.1.2.1... 4. back to the haskell-platform directory and try again: cabal install Resolving dependencies... Configuring haskell-platform-2010.2.0.0... setup: happy version ==1.18.5 is required but the version found at /usr/local/bin/happy is version 1.18.6 cabal: Error: some packages failed to install: haskell-platform-2010.2.0.0 failed during the configure step. The exception was: ExitFailure 1 5. Crap. Okay, maybe it will work with version 1.18.6 after all, so I edit the .cabal and change happy ==1.18.5 to happy >=1.18.5 -- Depending on programs does not work, they are not registered -- We list them to help distro packaging. build-tools: cabal-install ==0.8.2, alex ==2.3.3, happy >=1.18.5 -- haddock ==2.7.2 -- valid, but needs ghc-paths 6. Try again cabal install Resolving dependencies... Configuring haskell-platform-2010.2.0.0... Preprocessing library haskell-platform-2010.2.0.0... Building haskell-platform-2010.2.0.0... Registering haskell-platform-2010.2.0.0... Installing library in /usr/local/lib/haskell-platform-2010.2.0.0/ ghc-6.12.3 Registering haskell-platform-2010.2.0.0... 7. Success!! Now even though I'm not sure what I am doing, it looks like it may have worked. I'm worried, though, about the first time user who tries to go through this process. They will probably stop at the first error, when the haskell-platform fails to install. I know some of you will say use the debian packages. Well I did that, but when I tried to install snap, which is not included in the debian packages, I wound up with conflicting dependencies, and could not find a way out. I hope this dialog is helpful to whomever is in charge of the haskell platform, a wonderful resource by the way. Best wishes, Henry Laxen

Hi, Am Mittwoch, den 19.01.2011, 13:52 +0000 schrieb Henry Laxen:
I know some of you will say use the debian packages. Well I did that, but when I tried to install snap, which is not included in the debian packages, I wound up with conflicting dependencies, and could not find a way out. I hope this dialog is helpful to whomever is in charge of the haskell platform, a wonderful resource by the way.
I’m not trying to talk you out of building everything on your own, which is something where you learn a lot. Nevertheless I’m curious which kind of problems you had when trying to use the Debian packages, and if they are specific to the Debian packages? My experience with ghc and lots of package from Debian, cabal-install from Debian and then "cabal install"’ing (as a user!) everything not in Debian is pretty good so far. Greetings, Joachim -- Joachim "nomeata" Breitner mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nomeata@debian.org

Dear Joachim, Well, I got away with a lot of stuff, but as I said, when I tried to install snap via cabal-install, I could not break through the dependency jungle. I believe the stumbling block was trying to install hint. All of the debian packages installed just fine, but there is no debian package for snap, which I really wanted to try out. Best wishes, Henry Laxen

On 11-01-19 08:52 AM, Henry Laxen wrote:
Greetings. I've been using haskell for about a year now, though I will readily admit I still don't really know what I am doing when I get error messages. Today I decided to reset my haskell environment from scratch, avoiding the debian packages and going straight to the source.
1. Install ghc from http://www.haskell.org/ghc/download_ghc_6_12_3
Success!!
ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3
cabal update Downloading the latest package list from hackage.haskell.org
I wonder where you got your cabal from. Certainly not by installing ghc. Looks like an old version you failed to reset when you said "reset". Here is why it matters. With ghc 6.12.3 and "cabal-install version 0.8.0 using version 1.8.0.2 of the Cabal library", stm-2.1.2.1 does not build. The error is: [4 of 7] Compiling Control.Concurrent.STM.TVar ( Control/Concurrent/STM/TVar.hs, dist/build/Control/Concurrent/STM/TVar.o ) Control/Concurrent/STM/TVar.hs:22:8: Ambiguous occurrence `readTVarIO' It could refer to either `Control.Concurrent.STM.TVar.readTVarIO', defined at Control/Concurrent/STM/TVar.hs:35:0 or `GHC.Conc.readTVarIO', imported from GHC.Conc at Control/Concurrent/STM/TVar.hs:29:0-14 With the same ghc 6.12.3 but "cabal-install version 0.8.2 using version 1.8.0.6 of the Cabal library", stm-2.1.2.1 builds fine. If you use Setup.hs, it calls up whichever Cabal library your ghc comes with, which is 1.8.0.6, so stm-2.1.2.1 builds fine too. Why Cabal library 1.8.0.2 caused the error: by generating inferior CPP macros. In dist/build/autogen/cabal_macros.h it scripts: /* package base-4.2.0.2 */ #define MIN_VERSION_base(major1,major2,minor) \ (major1) < 4 || \ (major1) == 4 && (major2) < 2 || \ (major1) == 4 && (major2) == 2 && (minor) <= 0 It wants to provide a macro for testing version numbers of base, but it forgets a pair of defensive parentheses, so some usages will go wrong. Indeed, in TVar.hs: #ifdef __GLASGOW_HASKELL__ import GHC.Conc #else -- doesn't matter to us today #endif #if ! MIN_VERSION_base(4,2,0) readTVarIO = atomically . readTVar #endif If base version is <4.2.0, then GHC.Conc does not provide readTVarIO, and we want to define one ourselves. If base version is >=4.2.0 (for example ghc 6.12.3), then GHC.Conc provides readTVarIO, and we want to go with that. But the macro test goes wrong, and we do both. Cabal library 1.8.0.6 generates the macro correctly: /* package base-4.2.0.2 */ #define MIN_VERSION_base(major1,major2,minor) (\ (major1) < 4 || \ (major1) == 4 && (major2) < 2 || \ (major1) == 4 && (major2) == 2 && (minor) <= 0)
participants (3)
-
Albert Y. C. Lai
-
Henry Laxen
-
Joachim Breitner