<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 23, 2015 at 5:12 PM, Peng Yu <span dir="ltr">&lt;<a href="mailto:pengyu.ut@gmail.com" target="_blank">pengyu.ut@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":ha" class="a3s" style="overflow:hidden">I had problems with MacPorts for Python and Perl. The general<br>
suggestion is to stay way from MacPorts for managing packages offered<br>
by other language platforms.</div></blockquote></div><br>Actually, the general suggestion there is stay away from *any* packaging system for those languages --- because installing modules from both the packaging system and the language&#39;s own package repository risks breaking things with incompatible versions. I have had to help someone try to fix their Debian install after they installed a Perl module that was incompatible with dpkg; it&#39;s not just MacPorts, or even just Macs. (You can screw up a Red Hat-ish system the same way by installing the wrong Python module(s).) This is why Perl has perlbrew, Python has virtualenv, and Ruby has rvm (and for ghc, both Cabal sandboxes and hsenv).</div><div class="gmail_extra"><br></div><div class="gmail_extra">That said, a batteries-included setup like the Platform is usually an exception because you want the compiler and the Platform packages to all match, and you&#39;ll break things anyway if they don&#39;t: overriding modules that comes with ghc or with the Platform (or Stackage if you use that) is pretty much guaranteed &quot;Cabal hell&quot;). So get those all from the same place, but other modules from wherever --- just don&#39;t try to upgrade or replace those packages.</div><div class="gmail_extra"><br></div><div class="gmail_extra">You can add a &quot;constraint: &lt;foo&gt; installed&quot; to ~/.cabal/config for each the packages in the global package database to tell cabal-install not to touch those libraries. Note that you will have to exclude the Cabal library itself from that to install a newer cabal-install. This is actually relatively safe, although there is the potential to break ghc-as-a-library in obscure ways.<br><br># # #</div><div class="gmail_extra"><br>I think MP did end up skipping the latest Platform because the build system changed in a way that&#39;s pretty much hostile to other package systems; they&#39;ve all had to come up with their own ways to build it instead, and our Haskell maintainer did not have the time to work out how to adapt one of them to a ports-based system or design his own alternative. The next Platform release is backing off from that (it ended up being no easier than the old way), so should be easier to update.<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>