UU-ComputerScience / uhc

136 stars 21 forks source link

How to install 'shuffle' #67

Closed amigalemming closed 8 years ago

amigalemming commented 8 years ago

I am trying to build shuffle as a prerequisite for uhc. However, I have no luck with several GHC versions. I am working with Cabal sandboxes. With GHC-7.8.4 I seem to run into conflicts between different Cabal versions:

cabal: Error: some packages failed to install:
shuffle-0.1.3.3 failed during the configure step. The exception was:
user error ('/opt/ghc/7.8.4/bin/ghc-7.8.4' exited with an error:

/tmp/cabal-tmp-20215/shuffle-0.1.3.3/dist/dist-sandbox-ec9b2077/setup/setup.hs:21:10:
Couldn't match expected type ‘UserHooks’
with actual type ‘Cabal-1.18.1.5:Distribution.Simple.UserHooks.UserHooks’
NB: ‘UserHooks’
is defined in ‘Distribution.Simple.UserHooks’
in package ‘Cabal-1.22.4.0’
‘Cabal-1.18.1.5:Distribution.Simple.UserHooks.UserHooks’
is defined in ‘Distribution.Simple.UserHooks’
in package ‘Cabal-1.18.1.5’
In the second argument of ‘($)’, namely ‘uuagcLibUserHook uuagc’
In the second argument of ‘($)’, namely
‘addHook $ uuagcLibUserHook uuagc’
)

With GHC-7.6.3 I get:

shuffle-0.1.3.3 failed during the configure step. The exception was:
user error ('/opt/ghc/7.6.3/bin/ghc-7.6.3' exited with an error:

/tmp/cabal-tmp-5470/shuffle-0.1.3.3/dist/dist-sandbox-c2577f6e/setup/setup.hs:21:10:
Couldn't match expected type `UserHooks'
with actual type `Cabal-1.16.0:Distribution.Simple.UserHooks.UserHooks'
In the return type of a call of `uuagcLibUserHook'
In the second argument of `($)', namely `uuagcLibUserHook uuagc'
In the second argument of `($)', namely
`addHook $ uuagcLibUserHook uuagc'
)

With GHC-7.4.2 I get:

Configuring uulib-0.9.21...
Building uulib-0.9.21...
Preprocessing library uulib-0.9.21...
[ 1 of 27] Compiling UU.Util.Utils    ( src/UU/Util/Utils.hs, dist/dist-sandbox-f7ce0374/build/UU/Util/Utils.o )
[ 2 of 27] Compiling UU.Util.PermTree ( src/UU/Util/PermTree.hs, dist/dist-sandbox-f7ce0374/build/UU/Util/PermTree.o )
[ 3 of 27] Compiling UU.Util.BinaryTrees ( src/UU/Util/BinaryTrees.hs, dist/dist-sandbox-f7ce0374/build/UU/Util/BinaryTrees.o )
[ 4 of 27] Compiling UU.Pretty.Basic  ( src/UU/Pretty/Basic.hs, dist/dist-sandbox-f7ce0374/build/UU/Pretty/Basic.o )

src/UU/Pretty/Basic.hs:18:24:
    Module `Prelude' does not export `join'

With what GHC version have you build shuffle?

atzedijkstra commented 8 years ago

This looks like the cabal UUAGC plugin (package uuagc-cabal) being compiled with a different version of cabal than the cabal version used to (attempt to) build shuffle, usually caused by the presence of two versions of cabal. Instructing (with option --cabal-lib-version) cabal (the executable) to configure the build of shuffle with the cabal (the package) version used to install uuagc-cabal usually fixes this problem.

cheers, Atze

On 3 Jan, 2016, at 01:58 , amigalemming notifications@github.com wrote:

I am trying to build shuffle as a prerequisite for uhc However, I have no luck with several GHC versions I am working with Cabal sandboxes With GHC-784 I seem to run into conflicts between different Cabal versions:

cabal: Error: some packages failed to install: shuffle-0133 failed during the configure step The exception was: user error ('/opt/ghc/784/bin/ghc-784' exited with an error:

/tmp/cabal-tmp-20215/shuffle-0133/dist/dist-sandbox-ec9b2077/setup/setuphs:21:10: Couldn't match expected type ‘UserHooks’ with actual type ‘Cabal-11815:DistributionSimpleUserHooksUserHooks’ NB: ‘UserHooks’ is defined in ‘DistributionSimpleUserHooks’ in package ‘Cabal-12240’ ‘Cabal-11815:DistributionSimpleUserHooksUserHooks’ is defined in ‘DistributionSimpleUserHooks’ in package ‘Cabal-11815’ In the second argument of ‘($)’, namely ‘uuagcLibUserHook uuagc’ In the second argument of ‘($)’, namely ‘addHook $ uuagcLibUserHook uuagc’ ) With GHC-763 I get:

shuffle-0133 failed during the configure step The exception was: user error ('/opt/ghc/763/bin/ghc-763' exited with an error:

/tmp/cabal-tmp-5470/shuffle-0133/dist/dist-sandbox-c2577f6e/setup/setuphs:21:10: Couldn't match expected type UserHooks' with actual typeCabal-1160:DistributionSimpleUserHooksUserHooks' In the return type of a call of uuagcLibUserHook' In the second argument of($)', namely uuagcLibUserHook uuagc' In the second argument of($)', namely `addHook $ uuagcLibUserHook uuagc' ) With GHC-742 I get:

Configuring uulib-0921 Building uulib-0921 Preprocessing library uulib-0921 [ 1 of 27] Compiling UUUtilUtils ( src/UU/Util/Utilshs, dist/dist-sandbox-f7ce0374/build/UU/Util/Utilso ) [ 2 of 27] Compiling UUUtilPermTree ( src/UU/Util/PermTreehs, dist/dist-sandbox-f7ce0374/build/UU/Util/PermTreeo ) [ 3 of 27] Compiling UUUtilBinaryTrees ( src/UU/Util/BinaryTreeshs, dist/dist-sandbox-f7ce0374/build/UU/Util/BinaryTreeso ) [ 4 of 27] Compiling UUPrettyBasic ( src/UU/Pretty/Basichs, dist/dist-sandbox-f7ce0374/build/UU/Pretty/Basico )

src/UU/Pretty/Basichs:18:24: Module Prelude' does not exportjoin' With what GHC version have you build shuffle?

— Reply to this email directly or view it on GitHub https://github.com/UU-ComputerScience/uhc/issues/67.

amigalemming commented 8 years ago

Thanks, I tried the following which solved the problem:

cabal install --with-ghc=ghc-7.8.4 --with-haddock=haddock-ghc-7.8.4 --reinstall uuagc-cabal shuffle