3

I installed EclipseFP, the Haskell plugin for Eclipse, on my Ubuntu 12.04 machine running Eclipse 3.7.2 and ghc(i) 7.4.1. Everytime I start Eclipse, EclipseFP asks me to install the helper executable scion-browser (0.2.12) and buildrunner (0.7.2) but ultimately fails installing both.

Trying cabal install scion-browser (or cabal install haskeline) on the command line fails with

Resolving dependencies...
cabal: Error: some packages failed to install:
haskeline-0.7.1.2 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.16 but no
suitable version is installed.)

Whereas cabal install buildwrapper fails with

Resolving dependencies...
Configuring buildwrapper-0.7.7...
Building buildwrapper-0.7.7...
Preprocessing library buildwrapper-0.7.7...
[1 of 7] Compiling Language.Haskell.BuildWrapper.Base ( src/Language/Haskell/BuildWrapper/Base.hs, dist/build/Language/Haskell/BuildWrapper/Base.o )
[2 of 7] Compiling Language.Haskell.BuildWrapper.GHCStorage ( src/Language/Haskell/BuildWrapper/GHCStorage.hs, dist/build/Language/Haskell/BuildWrapper/GHCStorage.o )

src/Language/Haskell/BuildWrapper/GHCStorage.hs:542:22:
    Couldn't match expected type `scientific-0.2.0.1:Data.Scientific.Scientific'
                with actual type `Number'
    In the pattern: I l
    In the pattern: Number (I l)
    In the pattern: Just (Number (I l))
cabal: Error: some packages failed to install:
buildwrapper-0.7.7 failed during the building phase. The exception was:
ExitFailure 1

Any help would be greatly appreciated as I don't seem to be able to find any Google hits on either error.

EDIT:

After reinstalling Haskell (it seems I had two versions of containers installed which runhaskell Setup.hs configure --user rightly complained about), I can now configure BuildWrapper but building it fails with the following error:

[3 of 7] Compiling Language.Haskell.BuildWrapper.GHC ( src/Language/Haskell/BuildWrapper/GHC.hs, dist/build/Language/Haskell/BuildWrapper/GHC.o )

src/Language/Haskell/BuildWrapper/GHC.hs:522:37:
    The function `showPpr' is applied to two arguments,
    but its type `a0 -> String' has only one
    In the second argument of `(++)', namely `showPpr dflags bname'
    In the expression: "show " ++ showPpr dflags bname
    In an equation for `exprS': exprS = "show " ++ showPpr dflags bname
ThomasH
  • 830
  • 1
  • 8
  • 23
  • There is no constraint on containers in BuildWrapper, so some other package must be requiring containers 0.5. – JP Moresmau Feb 10 '14 at 16:25
  • @JPMoresmau It seems I had two versions of `containers` installed. I wiped and re-installed haskell and tried building from source again and now get a compilation error (see above) – ThomasH Feb 11 '14 at 17:22

3 Answers3

3

The issue with BuildWrapper is due to a breaking change in Aeson. See https://github.com/JPMoresmau/BuildWrapper/issues/20. You can get the buildwrapper source code from github (which fixes the bounds and adapts the code) or force the install of Aeson 0.6. For Haskeline I'm not sure, can you try to install haskeline on its own?

JP Moresmau
  • 7,388
  • 17
  • 31
  • Thanks, I will try compile from source first. `cabal install haskeline` outputs the exact same error as `cabal install scion-browser`. I edited the question to reflect that. – ThomasH Feb 10 '14 at 15:43
0

i think you should install newer cabal library acoording message: The package requires Cabal library version -any && >=1.16.

cabal update
cabal install cabal
cabal install cabal-install
cabal --version

should be: using version 1.20.0.0 of the Cabal library

if not fix your PATH. new cabal binary is probably in ~/.cabal/bin

then:

cabal install haskeline
velkyel
  • 352
  • 4
  • 13
  • according to http://eclipsefp.github.io/faq.html, you should not update cabal or cabal-install, or you will break buildwrapper. Cabal and cabal-install, should be left at the same version they were when haskell-platform was installed (haskell-pltform also installs cabal-install as a dependency). Instead, install scion-browser via `cabal install scion-browser --constraint=haskeline==0.7.0.3` – Leo D Oct 19 '14 at 17:39
0

I had the same error (The function `showPpr' is applied to two arguments), both while installing with cabal and building from source. I tried with an older version of aeson,

cabal install buildwrapper --constraint=aeson==0.6.2.1

Be careful to replace the aeson version with the version you have closer to 0.6.2.1 It produced lot of warning, still it could build successfully.

  • I also need to install scion-browser with a constraint on haskeline in order to deal with the newest version of haskeline requiring cabal >= 1.6 `cabal install scion-browser --constraint=haskeline==0.7.0.3` Don't update cabal, or you'll run into all sorts of compatibility problems between cabal, cabal-install, buildwrapper and ghci. – Leo D Oct 19 '14 at 17:31