z0w0 / helm

A functionally reactive game engine, with headgear to protect you from the headache of game development provided.
http://helm-engine.org/
MIT License
598 stars 69 forks source link

cabal instal helm fails #97

Closed michal-cab closed 7 years ago

michal-cab commented 8 years ago

hello, im @ ubuntu 14.04. ghc 7.10.2.20151102, cabal 1.22.4.0. i have tried to install helm both via cabal install helm and via sandbox but without success... :-(

cabal install helm
throws following:
[ 5 of 12] Compiling FRP.Helm.Automaton ( src/FRP/Helm/Automaton.hs, dist/build/FRP/Helm/Automaton.o )

src/FRP/Helm/Automaton.hs:34:9:
    Ambiguous occurrence ‘pure’
    It could refer to either ‘FRP.Helm.Automaton.pure’,
                             defined at src/FRP/Helm/Automaton.hs:40:1
                          or ‘Prelude.pure’,
                             imported from ‘Prelude’ at src/FRP/Helm/Automaton.hs:17:1-31
                             (and originally defined in ‘GHC.Base’)

src/FRP/Helm/Automaton.hs:40:23:
    Ambiguous occurrence ‘pure’
    It could refer to either ‘FRP.Helm.Automaton.pure’,
                             defined at src/FRP/Helm/Automaton.hs:40:1
                          or ‘Prelude.pure’,
                             imported from ‘Prelude’ at src/FRP/Helm/Automaton.hs:17:1-31
                             (and originally defined in ‘GHC.Base’)
cabal: Error: some packages failed to install:
helm-0.4 failed during the building phase. The exception was:
ExitFailure 1
and in sandbox (after cabal sandbox init and cabal install) it goes like:
resolving dependencies...
cabal: Could not resolve dependencies:
trying: helm-0.7.1 (user goal)
trying: base-4.8.2.0/installed-cda... (dependency of helm-0.7.1)
trying: transformers-0.4.2.0/installed-ee7... (dependency of helm-0.7.1)
next goal: mtl (dependency of helm-0.7.1)
rejecting: mtl-2.2.1, 2.2.0.1, 2.2 (conflict: helm => mtl>=2.1 && <2.2)
rejecting: mtl-2.1.3.1, 2.1.2 (conflict:
transformers==0.4.2.0/installed-ee7..., mtl => transformers==0.3.*)
rejecting: mtl-2.1.1, 2.1 (conflict: base==4.8.2.0/installed-cda..., mtl =>
base<4.6)
rejecting: mtl-2.0.1.1, 2.0.1.0, 2.0.0.0, 1.1.1.1, 1.1.1.0, 1.1.0.2, 1.1.0.1,
1.1.0.0, 1.0 (conflict: helm => mtl>=2.1 && <2.2)
Dependency tree exhaustively searched.
any help or suggestions please? :)
kasbah commented 8 years ago

Unfortunately, because I am quite busy my only recommendation is to try using Stack to build right now.

tommyschnabel commented 8 years ago

I've been trying to resolve the dependencies for cabal install helm-0.1.7 with no luck either

tommyschnabel commented 8 years ago

I was able to modify Automation.hs so that it builds for 0.4 (since that's what cabal wants to install when I do cabal install helm). So here are the steps I took:

  1. Run cabal unpack helm-0.4
  2. Open up helm-0.4/src/FRP/Helm/Automation.hs
  3. Change line 17 from import Prelude hiding (id, (.)) to import Prelude hiding (id, (.), pure)
  4. Go into the helm-0.4/ directory
  5. Run cabal install, and it'll build correctly
michal-cab commented 8 years ago

confirm that tommyschnabel solution is working @ ubuntu 14.04. ghc 7.10.2.20151102, cabal 1.22.4.0. thnx a lot, looking forward to start exploring helm...

fgaz commented 8 years ago

I managed to build and run helm 0.7.1 on GHC 7.10 by loosening the constraints:

  build-depends:
    base >= 4 && < 5,
    cairo > 0.12 && < 0.14,
    pango > 0.12 && < 0.14,
    containers >= 0.5 && < 1,
    elerea >= 2.7 && < 3,
    filepath >= 1.3 && < 2,
    sdl2 >= 1.1 && < 1.3,
    text >= 1.1.1.3,
    time >= 1.4 && < 1.6,
    random >= 1.0.1.1 && < 1.2,
    mtl >= 2.1 && < 2.3,
    transformers >= 0.3.0.0,
    cpu >= 0.1.2 && < 1

, changing line 267 from

[ Pango.AttrFamily { paStart = i, paEnd = j, paFamily = textTypeface }

to

[ Pango.AttrFamily { paStart = i, paEnd = j, paFamily = T.pack textTypeface }

and importing qualified Data.Text as T

I don't know if this works with GHC < 7.10, but I think you should drop 7.6 support if that means supporting 7.10. We have stable 7.8 builds even on arm now.

Twixtfanatic commented 7 years ago

My OS is Linux Mint 18. I have ghc 7.10.3 installed. I get the same error with cabal install helm as the OP. I would like to install helm 0.7.1 or later. Please where are these files I should modify which fgaz refers to? I need a clue. TIA

z0w0 commented 7 years ago

Closing this due to 1.0.0 release. Please reopen if the issue persists with 1.0.0.