gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

Error compiling clafer on mac os x yosemite #64

Closed toeklk closed 9 years ago

toeklk commented 9 years ago
[kgad@lt00583 /tmp/clafer]$  
 make init
cabal sandbox init --sandbox=../.clafertools-cabal-sandbox
Writing a default package environment file to
/private/tmp/clafer/cabal.sandbox.config
Using an existing sandbox located at /private/tmp/.clafertools-cabal-sandbox
# Uncomment to use Haskell LTS in the sandbox
# wget http://www.stackage.org/snapshot/lts-1.4/cabal.config
# mv cabal.config ../.clafertools-cabal-sandbox
# the constraint is there to prevent installing utf8-string-1 which conflicts with gitit, which requires utf8-string <= 0.3.8.
cabal install --only-dependencies --extra-lib-dir=/opt/local/lib --extra-include-dir=/opt/local/include/ --enable-tests --constraint="utf8-string==0.3.8"
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: clafer-0.3.9 (user goal)
next goal: base (dependency of clafer-0.3.9)
rejecting: base-4.6.0.1/installed-6c3... (conflict: clafer => base>=4.7.0.1 &&
<5)
rejecting: base-4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0,
4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0,
4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires installed instance)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
make: *** [init] Error 1

Removing the --constraint="utf8-string==0.3.8" does not solve the issue...

mantkiew commented 9 years ago

The problem is that the dependencies are not satisfied. It seems you have an old GHC 7.6.3 since you have the package base-4.6.0.1. This is indicated in line

rejecting: base-4.6.0.1/installed-6c3... (conflict: clafer => base>=4.7.0.1 &&
<5)

We only track the latest releases of GHC (which have base>=4.7.0.1). See requirements.

Execute ghc --version and cabal --version to see the installed versions.

On Mac, you can use Haskell Platform 2014.2.0.0 for Mac OS X, 64bit. Alternatively, you can also use GHC7.8.4 - I have not tried that one yet but it should work just as well as the platform (except that you have to manually execute cabal install alex happy because they come included in the platform).