cabal install in sandbox step gets stuck

134 views
Skip to first unread message

Alistair Burrowes

unread,
Jul 6, 2014, 3:28:46 AM7/6/14
to yeso...@googlegroups.com
Hi,

I am trying complete the quick start guide for yesod. I am on Ubuntu 14.04 and have GHC 7.6.3.

The step:

cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals

after running cabal sandbox init, never completes. It outputs 'Resolving dependencies...' and runs forever (left it for ~5 hours) and eats up all available memory.

I have tried setting verbosity to 3 in the cabal sandbox config, but I get no more information.

How can I resolve this, or figure out what is going on?

Thanks

Michael Snoyman

unread,
Jul 6, 2014, 7:58:45 AM7/6/14
to yeso...@googlegroups.com
Sometimes --reorder-goals can cause that. Can you try removing that options and trying again?

What version of cabal-install are you using (cabal --version)?


--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alistair Burrowes

unread,
Jul 7, 2014, 4:17:56 AM7/7/14
to yeso...@googlegroups.com, mic...@snoyman.com
Worked. Thanks a lot!

Alistair Burrowes

unread,
Jul 7, 2014, 6:07:11 AM7/7/14
to yeso...@googlegroups.com, mic...@snoyman.com
Hm worked once, then I couldn't install persistent-mongodb. Started again from scratch and now get the same issue even without --reorder-goals

cabal-install version 1.20.0.3
using version 1.20.0.1 of the Cabal library 

Adam Bergmark

unread,
Jul 7, 2014, 1:14:12 PM7/7/14
to yeso...@googlegroups.com, Michael Snoyman
You can try passing `-v3' to cabal to see if it prints something. I'm guessing it's going very deep trying to resolve dependencies and in that case -v3 will keep printing things. Manually constraining some of the dependencies may help, such as (arbitrarily chosen) `--constraint='resourcet==1.1.2.2'.

This has happened to me on several occasions when I've been using older versions of packages.

- Adam

Alistair Burrowes

unread,
Jul 8, 2014, 8:35:00 AM7/8/14
to yeso...@googlegroups.com, mic...@snoyman.com
Thanks. Did everything from scratch again. And it all works, but for some reason the 'cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals' step doesn't install persistent-mongoDB.

Any ideas?

Alistair Burrowes

unread,
Jul 8, 2014, 8:37:12 AM7/8/14
to yeso...@googlegroups.com, mic...@snoyman.com
If I just run 'cabal install' I get the following output:

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: SHA-1.6.4/installed-e61... (user goal)
trying: aeson-0.7.0.6/installed-7fc... (user goal)
trying: yplay-0.0.0 (user goal)
next goal: persistent-mongoDB (dependency of yplay-0.0.0)
rejecting: persistent-mongoDB-1.4.1 (conflict: yplay =>
persistent-mongoDB>=1.3 && <1.4)
trying: persistent-mongoDB-1.3.3.1
next goal: bson (dependency of persistent-mongoDB-1.3.3.1)
rejecting: bson-0.3 (conflict: persistent-mongoDB => bson>=0.2 && <0.3)
rejecting: bson-0.2.4, 0.2.3 (conflict: SHA =>
binary==0.5.1.1/installed-72e..., bson => binary==0.7.*)
rejecting: bson-0.2.2, 0.2.1, 0.2.0 (conflict: aeson =>
text==1.1.1.3/installed-816..., bson => text==0.11.*)
rejecting: bson-0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1, 0.1, 0.0.4,
0.0.3, 0.0.2, 0.0.1 (conflict: persistent-mongoDB => bson>=0.2 && <0.3)
Backjump limit reached (change with --max-backjumps).

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

Greg Weber

unread,
Jul 8, 2014, 10:33:36 AM7/8/14
to Yesod Web Framework, Michael Snoyman
I looks like the issue is the binary package is at 0.5.1.1 but you need 0.7.*
I am not familiar with fixing that issue though.

Michael Snoyman

unread,
Jul 8, 2014, 10:55:48 AM7/8/14
to yeso...@googlegroups.com
Ah-hah, good catch.

This is in fact an impossible build plan right now. You can work around the problem by dropping yesod-bin from your installation command. You'll probably be better off with GHC 7.8, which doesn't constrain the binary version. Other options include getting a patch into bson which allows older versions of binary. I actually have such a patch for stackage[1], I'll send a pull request to the bson maintainer.

[1] https://github.com/fpco/stackage/blob/master/patching/patches/bson-0.2.4.patch

Alistair Burrowes

unread,
Jul 11, 2014, 11:02:07 PM7/11/14
to yeso...@googlegroups.com, mic...@snoyman.com
Thanks guys. I have basically figured this out.

Key things were using the download steps from new-www.haskell.org to get the latest version, not haskell-platform.

I do find I need to install certain versions manually of things manually. in particular installing yesod globally, it seems to depend on a version of happy that is too old for language-javascript. Installing happy with cabal install happy gets past this issue.

I had similar issues on OS X, but a few more cases, can't remember exactly what.. er maybe aeson?

Anyway, all working now so thanks again.
Reply all
Reply to author
Forward
0 new messages