mhwombat / creatur

Framework for artificial life and other evolutionary algorithms.
Other
30 stars 1 forks source link

Getting a failure on cabal install #2

Closed joshstella closed 9 years ago

joshstella commented 9 years ago

I'm running with ghc 7.6.3 and cabal 1.20.0.2. When I do a cabal install from the creatur directory, I get:

ubuntu@ip-172-31-30-17:~/Dropbox/Josh/creatur/creatur-5.9.8.2$ cabal install
Resolving dependencies...
Downloading stm-2.4.4...
Configuring stm-2.4.4...
Building stm-2.4.4...
Preprocessing library stm-2.4.4...
[ 1 of 10] Compiling Control.Sequential.STM ( Control/Sequential/STM.hs, dist/build/Control/Sequential/STM.o )
[ 2 of 10] Compiling Control.Concurrent.STM.TBQueue ( Control/Concurrent/STM/TBQueue.hs, dist/build/Control/Concurrent/STM/TBQueue.o )
[ 3 of 10] Compiling Control.Concurrent.STM.TQueue ( Control/Concurrent/STM/TQueue.hs, dist/build/Control/Concurrent/STM/TQueue.o )
[ 4 of 10] Compiling Control.Concurrent.STM.TChan ( Control/Concurrent/STM/TChan.hs, dist/build/Control/Concurrent/STM/TChan.o )
[ 5 of 10] Compiling Control.Concurrent.STM.TMVar ( Control/Concurrent/STM/TMVar.hs, dist/build/Control/Concurrent/STM/TMVar.o )
[ 6 of 10] Compiling Control.Concurrent.STM.TVar ( Control/Concurrent/STM/TVar.hs, dist/build/Control/Concurrent/STM/TVar.o )
[ 7 of 10] Compiling Control.Concurrent.STM.TArray ( Control/Concurrent/STM/TArray.hs, dist/build/Control/Concurrent/STM/TArray.o )
[ 8 of 10] Compiling Control.Monad.STM ( Control/Monad/STM.hs, dist/build/Control/Monad/STM.o )
[ 9 of 10] Compiling Control.Concurrent.STM ( Control/Concurrent/STM.hs, dist/build/Control/Concurrent/STM.o )
[10 of 10] Compiling Control.Concurrent.STM.TSem ( Control/Concurrent/STM/TSem.hs, dist/build/Control/Concurrent/STM/TSem.o )
In-place registering stm-2.4.4...
Creating package registration file: /tmp/pkgConf-stm-2.48822.4
Installing library in /home/ubuntu/.cabal/lib/x86_64-linux-ghc-7.6.3/stm-2.4.4
Registering stm-2.4.4...
Installed stm-2.4.4
Downloading exceptions-0.8.0.2...
Configuring exceptions-0.8.0.2...
Building exceptions-0.8.0.2...
Preprocessing library exceptions-0.8.0.2...
[1 of 2] Compiling Control.Monad.Catch ( src/Control/Monad/Catch.hs, dist/build/Control/Monad/Catch.o )
[2 of 2] Compiling Control.Monad.Catch.Pure ( src/Control/Monad/Catch/Pure.hs, dist/build/Control/Monad/Catch/Pure.o ) In-place registering exceptions-0.8.0.2...
Creating package registration file: /tmp/pkgConf-exceptions-0.8.08822.2
Installing library in
/home/ubuntu/.cabal/lib/x86_64-linux-ghc-7.6.3/exceptions-0.8.0.2
Registering exceptions-0.8.0.2...
Installed exceptions-0.8.0.2
Configuring creatur-5.9.8.2...
Building creatur-5.9.8.2...
Preprocessing library creatur-5.9.8.2...
[ 1 of 26] Compiling ALife.Creatur.Logger ( src/ALife/Creatur/Logger.hs, dist/build/ALife/Creatur/Logger.o )

src/ALife/Creatur/Logger.hs:38:20:
    Couldn't match expected type `time-1.5.0.1:Data.Time.Format.Locale.TimeLocale'
                with actual type `System.Locale.TimeLocale'
    In the first argument of `formatTime', namely `defaultTimeLocale'
    In the first argument of `fmap', namely
      `(formatTime defaultTimeLocale "%y%m%d%H%M%S%z")'
    In the expression:
      fmap (formatTime defaultTimeLocale "%y%m%d%H%M%S%z") getZonedTime
Failed to install creatur-5.9.8.2
cabal: Error: some packages failed to install:
creatur-5.9.8.2 failed during the building phase. The exception was:
ExitFailure 1

I'm just learning Haskell, so if there's something obvious I'm missing, sorry to bother you.

Best regards, Josh

mhwombat commented 9 years ago

Hmmm... I think that message is related to a change that was made to the time package a while back. But you're apparently using the latest version of time, so I don't understand why you're seeing that message. One difference is that you're using GHC 7.8.4, and I'm using 7.10.2, but that shouldn't matter.

I'll look into this on Monday when I'm back in the office. I'll see the exact versions of the packages I'm using, and try building using ghc 7.8.4. Maybe I need to tighten up one of the package dependencies.

Are you building the version from this repo, or are you installing from hackage (cabal install creatur)? Both versions should be identical, but perhaps I forgot to upload a file to the repo.

joshstella commented 9 years ago

Thanks for the quick response. I've tried it from DLing here and from cabal. Same issue. I got a successful build on my mac - will post versions when I get back to it.

mhwombat commented 9 years ago

I found out what's wrong. When GHC 7.10 came out, I created a version or two of Créatúr that would work with both GHC 7.8 and GHC 7.10. For later versions, I intended to only support GHC 7.10. Unfortunately, I didn't properly set the constraint in the .cabal file. I'll fix that in the next release.

So your options are:

  1. Upgrade to the latest Haskell Platform, which includes GHC 7.10. (https://www.haskell.org/downloads), or
  2. Use creatur-5.9.5 or an earlier version.
mhwombat commented 9 years ago

I went back through my commits, and the only changes I've made since creatur-5.9.5 have been to add some tracing features to make it easier for me to diagnose problems with genetic encoding and decoding of complex data structures. So if you decide to stick with creatur-5.9.5, you're not missing anything. Sorry about the confusion!

joshstella commented 9 years ago

Thanks much for running this to ground. When I'm done traveling and have some time I'll go to 5.9.5. Finding your thesis interesting reading for a flight.

mhwombat commented 9 years ago

Wow, it's nice to hear that you're finding my thesis interesting. If you want more up-to-date info, I have a couple of papers published since that I could send you. If you're interested, send an email to amy AT nualeargais.ie.