From pjakobsen at gmail.com Sat Aug 1 12:36:55 2015 From: pjakobsen at gmail.com (Peder Jakobsen) Date: Sat, 1 Aug 2015 08:36:55 -0400 Subject: Newbie: Can't understand cabal errors during install of hakyll Message-ID: Hi, Been with Haskell just for few days, and thought it would be a good exercise to run a static site generator to get familiar with various tools, and I?m already running into ?cabal hell? I think. :( $ cabal install hakyll Resolving dependencies... cabal: Could not resolve dependencies: trying: hakyll-4.7.2.0 (user goal) next goal: time (dependency of hakyll-4.7.2.0) rejecting: time-1.4.2/installed-d67... (conflict: hakyll => time>=1.5 && <1.6) trying: time-1.5.0.1 trying: process-1.2.0.0/installed-3a4... (dependency of hakyll-4.7.2.0) next goal: unix (dependency of process-1.2.0.0/installed-3a4...) rejecting: unix-2.7.0.1/installed-8ad... (conflict: time==1.5.0.1, unix => time==1.4.2/installed-d67...) rejecting: unix-2.7.1.0, 2.7.0.1, 2.7.0.0, 2.6.0.1, 2.6.0.0, 2.5.1.1, 2.5.1.0, 2.5.0.0, 2.4.2.0, 2.4.1.0, 2.4.0.2, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.0, 2.3.0.0, 2.2.0.0, 2.0 (conflict: process => unix==2.7.0.1/installed-8ad...) Backjump limit reached (change with --max-backjumps). I?m running OS X Yosemite 10.2.2 with all the latest versions of Haskell and cabal. Thanks you for listening. :) Peder -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjakobsen at gmail.com Sat Aug 1 12:52:33 2015 From: pjakobsen at gmail.com (Peder Jakobsen) Date: Sat, 1 Aug 2015 08:52:33 -0400 Subject: Uninstalling packages? Message-ID: Hi, just browsed through the user guide on managing packages at at https://www.haskell.org/cabal/users-guide/installing-packages.html Managing seems to imply that you should also be able to uninstall packages with a simple command. But there seem to be no instructions for how to do this for an installed packaged. What am I missing? Is it called ?deregistering?? Thanks again, P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Sat Aug 1 13:34:58 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Sat, 1 Aug 2015 15:34:58 +0200 Subject: Newbie: Can't understand cabal errors during install of hakyll In-Reply-To: References: Message-ID: It seems like you have time-1.4.2 installed, the latest GHC (7.10) comes with time 1.5.*. Are you sure you are on 7.10? The core of the problem is that hakyll needs time >= 1.5, and unix is using the pre-installed time-1.4.2. This is rejected because only one version of a library can be used in the same install plan. As the error message suggests you can you increase the backjump limit so I'd try that first. I typically pass --reorder-goals --max-backjumps=-1 to cabal-install. Running this sometimes takes a long time, but it will finish eventually. You can also try installing an older version of hakyll that works with time-1.4.2 (see the hackage page for info on older versions). Lastly, are you using a sandbox? It also helps with reducing problems. I never install anything in the global or user level package db, only in sandboxes. HTH, Adam On Sat, Aug 1, 2015 at 2:36 PM, Peder Jakobsen wrote: > Hi, > > Been with Haskell just for few days, and thought it would be a good > exercise to run a static site generator to get familiar with various tools, > and I?m already running into ?cabal hell? I think. :( > > > $ cabal install hakyll > Resolving dependencies... > cabal: Could not resolve dependencies: > trying: hakyll-4.7.2.0 (user goal) > next goal: time (dependency of hakyll-4.7.2.0) > rejecting: time-1.4.2/installed-d67... (conflict: hakyll => time>=1.5 && > <1.6) > trying: time-1.5.0.1 > trying: process-1.2.0.0/installed-3a4... (dependency of hakyll-4.7.2.0) > next goal: unix (dependency of process-1.2.0.0/installed-3a4...) > rejecting: unix-2.7.0.1/installed-8ad... (conflict: time==1.5.0.1, unix => > time==1.4.2/installed-d67...) > rejecting: unix-2.7.1.0, 2.7.0.1, 2.7.0.0, 2.6.0.1, 2.6.0.0, 2.5.1.1, > 2.5.1.0, > 2.5.0.0, 2.4.2.0, 2.4.1.0, 2.4.0.2, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.0, > 2.3.0.0, 2.2.0.0, 2.0 (conflict: process => unix==2.7.0.1/installed-8ad.. > .) > Backjump limit reached (change with --max-backjumps). > > > I?m running OS X Yosemite 10.2.2 with all the latest versions of Haskell > and cabal. > > Thanks you for listening. :) > > Peder > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Sat Aug 1 13:47:37 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Sat, 1 Aug 2015 15:47:37 +0200 Subject: Uninstalling packages? In-Reply-To: References: Message-ID: There is no uninstall command, there was at one point but it didn't do anything ;-) Unregistering a package does not delete any files, but it will make cabal forget about its existence. If you are working in a sandbox you can simply `cabal sandbox delete; cabal sandbox init` to start from scratch, you can also deregister packages there with `cabal sandbox hc-pkg unregister`, outside a sandbox it's `ghc-pkg unregister`. There are also tools on hackage that can clean up files when unregistering, iirc cab[1] can. HTH, Adam [1] http://hackage.haskell.org/package/cab On Sat, Aug 1, 2015 at 2:52 PM, Peder Jakobsen wrote: > Hi, just browsed through the user guide on managing packages at at > https://www.haskell.org/cabal/users-guide/installing-packages.html > > *Managing* seems to imply that you should also be able to uninstall > packages with a simple command. But there seem to be no instructions for > how to do this for an installed packaged. What am I missing? Is it > called ?deregistering?? > > Thanks again, > > P. > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjakobsen at gmail.com Sat Aug 1 14:09:43 2015 From: pjakobsen at gmail.com (Peder Jakobsen) Date: Sat, 1 Aug 2015 10:09:43 -0400 Subject: Uninstalling packages? In-Reply-To: References: Message-ID: <7B2976A4-53DE-4676-AA1F-54C3AC04E9EA@gmail.com> Wonderful. Thanks Adam for the quick reply, much appreciated. :) > On Aug 1, 2015, at 9:47 AM, Adam Bergmark wrote: > > There is no uninstall command, there was at one point but it didn't do anything ;-) > > Unregistering a package does not delete any files, but it will make cabal forget about its existence. > If you are working in a sandbox you can simply `cabal sandbox delete; cabal sandbox init` to start from scratch, you can also deregister packages there with `cabal sandbox hc-pkg unregister`, outside a sandbox it's `ghc-pkg unregister`. > > There are also tools on hackage that can clean up files when unregistering, iirc cab[1] can. > > HTH, > Adam > > [1] http://hackage.haskell.org/package/cab > > > On Sat, Aug 1, 2015 at 2:52 PM, Peder Jakobsen > wrote: > Hi, just browsed through the user guide on managing packages at at https://www.haskell.org/cabal/users-guide/installing-packages.html > > Managing seems to imply that you should also be able to uninstall packages with a simple command. But there seem to be no instructions for how to do this for an installed packaged. What am I missing? Is it called ?deregistering?? > > Thanks again, > > P. > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Sat Aug 1 15:03:24 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Sat, 1 Aug 2015 17:03:24 +0200 Subject: Newbie: Can't understand cabal errors during install of hakyll In-Reply-To: References: Message-ID: I sent a pull request to add time 1.4.* support to hakyll: https://github.com/jaspervdj/hakyll/pull/360 Might make it easier for <7.10 users in the future. - Adam On Sat, Aug 1, 2015 at 3:34 PM, Adam Bergmark wrote: > It seems like you have time-1.4.2 installed, the latest GHC (7.10) comes > with time 1.5.*. Are you sure you are on 7.10? > > The core of the problem is that hakyll needs time >= 1.5, and unix is > using the pre-installed time-1.4.2. This is rejected because only one > version of a library can be used in the same install plan. > > As the error message suggests you can you increase the backjump limit so > I'd try that first. I typically pass --reorder-goals --max-backjumps=-1 to > cabal-install. Running this sometimes takes a long time, but it will finish > eventually. > > You can also try installing an older version of hakyll that works with > time-1.4.2 (see the hackage page for info on older versions). > > Lastly, are you using a sandbox? It also helps with reducing problems. I > never install anything in the global or user level package db, only in > sandboxes. > > HTH, > Adam > > > > On Sat, Aug 1, 2015 at 2:36 PM, Peder Jakobsen > wrote: > >> Hi, >> >> Been with Haskell just for few days, and thought it would be a good >> exercise to run a static site generator to get familiar with various tools, >> and I?m already running into ?cabal hell? I think. :( >> >> >> $ cabal install hakyll >> Resolving dependencies... >> cabal: Could not resolve dependencies: >> trying: hakyll-4.7.2.0 (user goal) >> next goal: time (dependency of hakyll-4.7.2.0) >> rejecting: time-1.4.2/installed-d67... (conflict: hakyll => time>=1.5 && >> <1.6) >> trying: time-1.5.0.1 >> trying: process-1.2.0.0/installed-3a4... (dependency of hakyll-4.7.2.0) >> next goal: unix (dependency of process-1.2.0.0/installed-3a4...) >> rejecting: unix-2.7.0.1/installed-8ad... (conflict: time==1.5.0.1, unix => >> time==1.4.2/installed-d67...) >> rejecting: unix-2.7.1.0, 2.7.0.1, 2.7.0.0, 2.6.0.1, 2.6.0.0, 2.5.1.1, >> 2.5.1.0, >> 2.5.0.0, 2.4.2.0, 2.4.1.0, 2.4.0.2, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.0, >> 2.3.0.0, 2.2.0.0, 2.0 (conflict: process => unix==2.7.0.1/installed-8ad.. >> .) >> Backjump limit reached (change with --max-backjumps). >> >> >> I?m running OS X Yosemite 10.2.2 with all the latest versions of Haskell >> and cabal. >> >> Thanks you for listening. :) >> >> Peder >> >> _______________________________________________ >> cabal-devel mailing list >> cabal-devel at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cydparser at gmail.com Sat Aug 1 20:06:04 2015 From: cydparser at gmail.com (Cyd Parser) Date: Sat, 1 Aug 2015 13:06:04 -0700 Subject: Newbie: Can't understand cabal errors during install of hakyll Message-ID: Hi Peder, I'd recommend giving stack a try (https://github.com/commercialhaskell/stack). I have found it easier to use than cabal-install. Many executables will install just fine using `stack install `. Packages that stack has trouble creating a build plan for (like hakyll) can usually be installed using the following: stack unpack hakyll cd hakyll-* stack init stack setup stack install `stack install` copies the resulting binaries to ~/.local/bin by default: add that to your path. Cheers, cydparser > Date: Sat, 1 Aug 2015 08:36:55 -0400 > From: Peder Jakobsen > To: cabal-devel at haskell.org > Subject: Newbie: Can't understand cabal errors during install of > hakyll > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Hi, > > Been with Haskell just for few days, and thought it would be a good > exercise to run a static site generator to get familiar with various tools, > and I?m already running into ?cabal hell? I think. :( > > > $ cabal install hakyll > Resolving dependencies... > cabal: Could not resolve dependencies: > trying: hakyll-4.7.2.0 (user goal) > next goal: time (dependency of hakyll-4.7.2.0) > rejecting: time-1.4.2/installed-d67... (conflict: hakyll => time>=1.5 && > <1.6) > trying: time-1.5.0.1 > trying: process-1.2.0.0/installed-3a4... (dependency of hakyll-4.7.2.0) > next goal: unix (dependency of process-1.2.0.0/installed-3a4...) > rejecting: unix-2.7.0.1/installed-8ad... (conflict: time==1.5.0.1, unix => > time==1.4.2/installed-d67...) > rejecting: unix-2.7.1.0, 2.7.0.1, 2.7.0.0, 2.6.0.1, 2.6.0.0, 2.5.1.1, > 2.5.1.0, > 2.5.0.0, 2.4.2.0, 2.4.1.0, 2.4.0.2, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.0, > 2.3.0.0, 2.2.0.0, 2.0 (conflict: process => unix==2.7.0.1/installed-8ad.. > .) > Backjump limit reached (change with --max-backjumps). > > > I?m running OS X Yosemite 10.2.2 with all the latest versions of Haskell > and cabal. > > Thanks you for listening. :) > > Peder > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjakobsen at gmail.com Sun Aug 2 02:01:03 2015 From: pjakobsen at gmail.com (Peder Jakobsen) Date: Sat, 1 Aug 2015 22:01:03 -0400 Subject: Newbie: Can't understand cabal errors during install of hakyll In-Reply-To: References: Message-ID: <0A60E6E0-9E18-4602-8C85-FE1B97438A99@gmail.com> Hi Adam, I upgraded to ghc version 7.10.2 ? that seems to have fixed the problem. > On Aug 1, 2015, at 9:34 AM, Adam Bergmark wrote: > > Lastly, are you using a sandbox? It also helps with reducing problems. I never install anything in the global or user level package db, only in sandboxes Yes, I?m using a sandbox, although made the mistake of not using --only-dependencies when I did $ cabal install hakyll, and it?s been 20+ minutes, and my CPU is still grinding away. ;) It?s nothing like Python pip so far, but I?m sure there are good reasons why (e.g., need to compile every dependency) Thanks again P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjakobsen at gmail.com Sun Aug 2 02:19:42 2015 From: pjakobsen at gmail.com (Peder Jakobsen) Date: Sat, 1 Aug 2015 22:19:42 -0400 Subject: --only-depencies saves time? Message-ID: <8C1D1C08-20C2-4338-B15D-B57EE34E26F2@gmail.com> I?ve read the Simple Guide to Cabal at http://katychuang.com/cabal-guide/ It says: create a copy of a package by running the command cabal install Some flags can speed up this process --only-dependencies -jN to build N packages in parallel --dry-run to see what cabal plans to do (recommended) But here?s the thing (piping a word count from ?dry-run) $ cabal install hakyll --dry-run | wc -l 97 cabal install hakyll --only-dependencies --dry-run | wc -l 96 So it takes 20+ minutes to install a package that you just want to check out for a few minutes, while your CPU melts down in the process? I must be missing something here?? Thanks again for your newbie support, greatly appreciated. P.J. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Sun Aug 2 02:27:18 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Sat, 1 Aug 2015 21:27:18 -0500 Subject: --only-depencies saves time? In-Reply-To: <8C1D1C08-20C2-4338-B15D-B57EE34E26F2@gmail.com> References: <8C1D1C08-20C2-4338-B15D-B57EE34E26F2@gmail.com> Message-ID: Best way to avoid this problem in my experience is to use something that'll cache dependencies so that you're building as few new packages as possible when checking something out. Historically people have used their user package-dbs or sandboxes (just package-dbs you put in a place), but there's nothing done to ensure versions won't start conflicting as the arrow of time plunges forward. To that end, I think Stack[1] is pretty useful as you can pick a default (global to you) user snapshot and everything the snapshot covers will have a set of versions that work with everything else. This doesn't cover absolutely everything on Hackage but it should save a lot of build time if you're going on a library perambulation. There's no reason, in principle, that you couldn't accomplish the same with careful tending of a package-db yourself, but in practice nobody knows or cares to know how anything works so its best to just give them something they can outsource their executive functions to WRT package versioning. [1]: https://github.com/commercialhaskell/stack On Sat, Aug 1, 2015 at 9:19 PM, Peder Jakobsen wrote: > I?ve read the Simple Guide to Cabal at http://katychuang.com/cabal-guide/ > > It says: > > create a copy of a package by running the command > cabal install > Some flags can speed up this process > --only-dependencies > -jN to build N packages in parallel > --dry-run to see what cabal plans to do (recommended) > > But here?s the thing (piping a word count from ?dry-run) > > $ cabal install hakyll --dry-run | wc -l > 97 > cabal install hakyll --only-dependencies --dry-run | wc -l > 96 > > So it takes 20+ minutes to install a package that you just want to check > out for a few minutes, while your CPU melts down in the process? I must be > missing something here?? > > Thanks again for your newbie support, greatly appreciated. > > P.J. > > > > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdweber at iue.edu Tue Aug 4 16:39:22 2015 From: gdweber at iue.edu (gdweber at iue.edu) Date: Tue, 4 Aug 2015 12:39:22 -0400 Subject: --only-depencies saves time? In-Reply-To: <8C1D1C08-20C2-4338-B15D-B57EE34E26F2@gmail.com> References: <8C1D1C08-20C2-4338-B15D-B57EE34E26F2@gmail.com> Message-ID: <20150804163922.GB785@sparrow.localnet> Hello, Peder, On 2015-Aug-01, Peder Jakobsen wrote: > I?ve read the Simple Guide to Cabal at http://katychuang.com/cabal-guide/ The page you are referring to does not explain the flags that it recommends. > > It says: > > create a copy of a package by running the command > cabal install > Some flags can speed up this process > --only-dependencies Would install all the dependencies of hakyll, but not hakyll itself. Not much of a time saver, in this case, since there are 96 packages on which hackyll depends. I don't really see much point in this option. > -jN to build N packages in parallel I have four cores, so I routinely use -j4. It could speed up the build by not more than 400% in that case. Generally, for a build like this, it makes good use (> 90%) of all my CPUs, until towards the end when there are < 4 packages remaining. > --dry-run to see what cabal plans to do (recommended) This one might save time, because it doesn't install anything; it just prints out what cabal would install. Could be useful in case you want to scan through the list, and if you see anything that you don't want, or it's just too long, decide not to install hakyll, for example. (Could actually waste more of your time, in case you decide to build the package anyway.) I think maybe this is more useful when _not_ using a sandbox, because you could see if the packages it would install would conflict with some that you already have installed? > > But here?s the thing (piping a word count from ?dry-run) > > $ cabal install hakyll --dry-run | wc -l > 97 > cabal install hakyll --only-dependencies --dry-run | wc -l > 96 > > So it takes 20+ minutes to install a package that you just want to check out for a few minutes, while your CPU melts down in the process? I must be missing something here?? > The hakyll package is interesting and complex, and I don't see much point in checking it out for just "a few minutes" :-) In my case, `time cabal install -j4 hakyll` (in a sandbox) reports that it took 13 minutes and 38 seconds. But this is not too uncommon for installing software from source, whether it's Haskell + cabal or C + `make configure; make; make install` , is it, even if we have binaries for most of the C libraries already installed? > Thanks again for your newbie support, greatly appreciated. > > P.J. Thanks for asking a question that was easy enough for me to answer -- it's something that doesn't happen often on this list ;-) > > > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -- Gregory D. Weber, Ph. D. http://pages.iu.edu/~gdweber/ Associate Professor of Informatics Tel (765) 973-8420 Indiana University East FAX (765) 973-8550 From michael at snoyman.com Mon Aug 17 08:59:17 2015 From: michael at snoyman.com (Michael Snoyman) Date: Mon, 17 Aug 2015 11:59:17 +0300 Subject: Pull request 2617 (don't require global package database) Message-ID: A few months ago I noticed that pull request 2617[1] implements a change I'd love to see in Cabal: not requiring a global package database for GHCs that support this (7.6 and on). The change is small and self-contained, and looks like a good one to me, but it hasn't been merged. Any chance someone with a commit bit could review? [1] https://github.com/haskell/cabal/pull/2617 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hvr at gnu.org Sat Aug 29 06:56:53 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Sat, 29 Aug 2015 08:56:53 +0200 Subject: Please help beta test "no-reinstall Cabal" (was: Cabal and simultaneous installations of the same package) In-Reply-To: <68326f3ebbd943768effe6b0f2ff522c@DB4PR30MB030.064d.mgd.msft.net> (Simon Peyton Jones's message of "Mon, 23 Mar 2015 08:45:48 +0000") References: <68326f3ebbd943768effe6b0f2ff522c@DB4PR30MB030.064d.mgd.msft.net> Message-ID: <87fv32lgzu.fsf@gmail.com> Good news, everyone! ...you may be interested to know this has finally come to fruition (just in time for HIW): http://blog.ezyang.com/2015/08/help-us-beta-test-no-reinstall-cabal/ Cheers, hvr On 2015-03-23 at 09:45:48 +0100, Simon Peyton Jones wrote: > Dear Cabal developers > > You'll probably have seen the thread about the Haskell Platform. > > Among other things, this point arose: > > | Another thing we should fix is the (now false) impression that HP gets in > | the way of installing other packages and versions due to cabal hell. > > People mean different things by "cabal hell", but the inability to > simultaneously install multiple versions of the same package, > compiled against different dependencies > is certainly one of them, and I think it is the one that Yitzchak is referring to here. > > But some time now GHC has allowed multiple versions of the same > package (compiled against different dependencies) to be installed > simultaneously. So all we need to do is to fix Cabal to allow it too, > and thereby kill of a huge class of cabal-hell problems at one blow. > > But time has passed and it hasn't happened. Is this because I'm misunderstanding? Or because it is harder than I think? Or because there are much bigger problems? Or because there is insufficient effort available? Or what? > > Unless I'm way off beam, this "multiple installations of the same package" thing has been a huge pain forever, and the solution is within our grasp. What's stopping us grasping it?