tag:blogger.com,1999:blog-8768401356830813531.post2432647583227639482..comments2023-01-12T13:01:39.386-05:00Comments on Software Simply: Haskell Best Practices for Avoiding "Cabal Hell"mightybytehttp://www.blogger.com/profile/15198998578494149797noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-8768401356830813531.post-49678268204694877332014-11-09T10:44:09.507-05:002014-11-09T10:44:09.507-05:00Thanks for the extra tip!Thanks for the extra tip!Anonymoushttps://www.blogger.com/profile/04485097839438234853noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-31981535559677784812014-11-09T10:33:56.627-05:002014-11-09T10:33:56.627-05:00Paolo,
You can narrow the behavior to specific pa...Paolo,<br /><br />You can narrow the behavior to specific packages with --allow-newer=text.mightybytehttps://www.blogger.com/profile/15198998578494149797noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-28423116154393204362014-11-09T10:08:12.511-05:002014-11-09T10:08:12.511-05:00I just tried out --allow-newer for a package that ...I just tried out --allow-newer for a package that depended on pandoc-1.9 (yes, I know), and it has the problem I expected: it's recursive, and at least in this case it's not what you want (arguably, you want to allow-newer only at the top-level if just one package is broken). Cabal selected pandoc-1.12.4.2 but --allow-newer broke it, because it applied also to dependencies with perfectly fine settings — this pandoc wants texmath-0.6.7, cabal picked texmath-0.8, pandoc failed to compile. Relevant messages follow.<br /><br />The error:<br /><br />src/Text/Pandoc/Parsing.hs:174:8:<br /> Could not find module ‘Text.TeXMath.Macros’<br /> Perhaps you meant Text.TeXMath.Types (from texmath-0.8)<br /> Use -v to see a list of the files searched for.<br />[...]<br /><br />In this state, here's what cabal-install proposed:<br /><br />$ cabal install -v --dry pandoc-1.12.4.2<br />Reading available packages...<br />Choosing modular solver.<br />Resolving dependencies...<br />In order, the following would be installed:<br />texmath-0.6.7 (latest: 0.8) (new version)<br />pandoc-1.12.4.2 (latest: 1.13.1) (new package)<br /><br />$ cabal install pandoc-1.12.4.2 --dry --allow-newer<br />Resolving dependencies...<br />In order, the following would be installed (use -v for more details):<br />pandoc-1.12.4.2 (latest: 1.13.1)Anonymoushttps://www.blogger.com/profile/04485097839438234853noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-21314941124261612592014-08-21T08:58:58.249-04:002014-08-21T08:58:58.249-04:00Googling "haskell cabal download" and cl...Googling "haskell cabal download" and clicking the first link takes you <a href="http://www.haskell.org/cabal/download.html" rel="nofollow">here</a>. As you can see, there are three binary download links there, one for Mac, Windows, and Linux. If those don't work, you can download the source and run the bootstrap script that comes with it.mightybytehttps://www.blogger.com/profile/15198998578494149797noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-67112592446311656172014-08-21T00:29:54.620-04:002014-08-21T00:29:54.620-04:00Ok, let's suppose I am convinced and I want to...Ok, let's suppose I am convinced and I want to try your way, at least to<br />see how long before I get disgusted. I downloaded the generic ghc<br />tarball and I unpacked it. ldd on the ghc binary seems to succeed, so<br />at least I don't expect any immediate ld.so hell :-) However, there is<br />no cabal binary. I assume I need it before I do anything else, so where<br />do I get it?Ian Zimmermannoreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-46374308389459930332014-08-19T08:59:17.611-04:002014-08-19T08:59:17.611-04:00Of course, and understandably so. That just means...Of course, and understandably so. That just means that the binary distro model is not suitable for a fast moving ecosystem like Haskell. This isn't a problem with Debian or a problem with Haskell. It's a fundamental incompatibility.mightybytehttps://www.blogger.com/profile/15198998578494149797noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-43187407293726976882014-08-19T01:53:47.762-04:002014-08-19T01:53:47.762-04:00I also code patches and provide them to Debian. I...I also code patches and provide them to Debian. In such cases, I simply<br />build my own binary package with the patch. It is easy and quick<br />enough, _for a couple of packages_. But I get covered with cold sweat<br />at the thought of having to do that for _all_ packages, or even just all<br />Haskell libraries.<br /><br /><br />Ian Zimmermannoreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-59162673199040093212014-08-18T09:26:25.996-04:002014-08-18T09:26:25.996-04:00I don't think it's just GHC or "the H...I don't think it's just GHC or "the Haskell model" that's at odds with binary packages. I think it's the speed that the ecosystem moves. It's a young community and there has been a LOT of activity over the last few years. I never use OS-packaged Haskell packages because that's simply too slow. Sometimes I'm actually waiting on the maintainer to merge my patches, and when they merge and upload to hackage I don't want to be waiting on someone else get that into the OS packages.<br /><br />I switched to Arch Linux solely because of Haskell. I guess we all have our own priorities...mightybytehttps://www.blogger.com/profile/15198998578494149797noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-80553079342188500192014-08-18T01:34:17.273-04:002014-08-18T01:34:17.273-04:00"built-in installer" - hmm, let me guess..."built-in installer" - hmm, let me guess, you're on MacOS.<br /><br />I'm on Debian, and the officially packaged ghc version there is the very<br />bleeding-edge 7.4.1 :-p<br /><br />I don't want to diss you by any means, you mean well and are trying to<br />help - thank you for that. But for quite some time I have had the<br />feeling that the Haskell (or rather ghc) model is deeply at odds with<br />binary package distros like Debian, and most instances of Cabal Hell are<br />just a symptom of this dissonance. Which is really sad for me because<br />I love Haskell the language and would like to use it, but you'll only<br />drag my cold dead body from Debian.<br />Ian Zimmermannoreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-13503049538645365842014-08-17T06:49:20.540-04:002014-08-17T06:49:20.540-04:00Ian,
Yes, I mean download the binary from here an...Ian,<br /><br />Yes, I mean download the binary from <a href="http://www.haskell.org/ghc/" rel="nofollow">here</a> and install it using the built-in installer. I have never encountered the libc version problem in practice. If you have a problem there, then you could still download and build from source.<br /><br />I'm talking about the two packages happy and alex on hackage. You manually install them by doing "cabal install happy" and "cabal install alex".mightybytehttps://www.blogger.com/profile/15198998578494149797noreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-62809609255651314532014-08-16T16:12:16.410-04:002014-08-16T16:12:16.410-04:00Hi, I am not sure what you mean with points 1 and ...Hi, I am not sure what you mean with points 1 and 3. WDYM "I install<br />ghc directly"? Do you just download and untar the binary blob? Do you<br />know that the libc version problem doesn't apply to you?<br /><br />About happy and alex, again what does "manually install" mean? Download<br />binaries, compile from source, or cabal install?<br />Ian Zimmermannoreply@blogger.comtag:blogger.com,1999:blog-8768401356830813531.post-34206364788637531812014-07-14T10:41:13.309-04:002014-07-14T10:41:13.309-04:00Thank you. I was recently put off from a simple pr...Thank you. I was recently put off from a simple project using Haskell because of "cabal hell" when preparing for deployment. Hopefully, with your tips, this won't happen again in the future :)Psehttps://www.blogger.com/profile/03988113940889035670noreply@blogger.com