idris-lang / Idris-dev

A Dependently Typed Functional Programming Language
http://idris-lang.org
Other
3.44k stars 644 forks source link

Idris-dev-0.99.2 fails to install on Debian stretch #4010

Closed nicolabotta closed 7 years ago

nicolabotta commented 7 years ago

After installing Idris 1.1.1 for test purposes, 0.99.2 fails to reinstall on Debian stretch. A problem appears to be src/Idris/DeepSeq.hs:

[ 37 of 108] Compiling Idris.Package.Common ( src/Idris/Package/Common.hs, dist/build/Idris/Package/Common.o )
[ 38 of 108] Compiling Idris.DeepSeq    ( src/Idris/DeepSeq.hs, dist/build/Idris/DeepSeq.o )

src/Idris/DeepSeq.hs:31:10: error:
    Duplicate instance declarations:
      instance NFData CT.Options -- Defined at src/Idris/DeepSeq.hs:31:10
      instance NFData CT.Options -- Defined in ‘Cheapskate.Types’

src/Idris/DeepSeq.hs:34:10: error:
    Duplicate instance declarations:
      instance NFData CT.ListType
        -- Defined at src/Idris/DeepSeq.hs:34:10
      instance NFData CT.ListType -- Defined in ‘Cheapskate.Types’

src/Idris/DeepSeq.hs:38:10: error:
    Duplicate instance declarations:
      instance NFData CT.CodeAttr
        -- Defined at src/Idris/DeepSeq.hs:38:10
      instance NFData CT.CodeAttr -- Defined in ‘Cheapskate.Types’

src/Idris/DeepSeq.hs:41:10: error:
    Duplicate instance declarations:
      instance NFData CT.NumWrapper
        -- Defined at src/Idris/DeepSeq.hs:41:10
      instance NFData CT.NumWrapper -- Defined in ‘Cheapskate.Types’
cabal: Leaving directory '.'
Failed to install idris-0.99.2
cabal: Error: some packages failed to install:
idris-0.99.2 failed during the building phase. The exception was:
ExitFailure 1
Makefile:18: recipe for target 'install' failed
make: *** [install] Error 1
nicola@cirrus:~/src/Idris-dev-0.99.2$

Any idea how to reinstall 0.99.2 on Debian stretch?

melted commented 7 years ago

That's because the version of cheapskate that 1.1.1 uses is too new for 0.99.2, but the upper bound is too high on 0.99.2 (a new incompatible version of cheapskate was released that added those instances that we already defined, unluckily with a version number under our upper bound.) So what you have to do is to add "cheapskate < 0.1.1" to the cabal install command line. Or to put that bound in idris.cabal.

nicolabotta commented 7 years ago

Thanks Niklas, your suggestion worked perfectly and I am closing the issue!