Re: [Haskell-beginners] Error when running `cabal install cabal-install`

Indeed, I uninstalled libiconv by running the following command.
sudo port uninstall --follow-dependents libiconv
Then, `cabal install cabal-install` runs without a problem.
Hi MacPorts Users, Is there better solution to this problem? Please
see the original question regarding the conflict of MacPorts and
Haskell. (I don't what to use haskell from MacPorts as I want to keep
updated with the latest version of Haskell.)
https://mail.haskell.org/pipermail/beginners/2015-April/015214.html
On Thu, Apr 23, 2015 at 3:34 PM, Brandon Allbery
On Thu, Apr 23, 2015 at 4:19 PM, Peng Yu
wrote: It is installed from <https://www.haskell.org/platform/
. The OS is Mac OS X.
Yes, as I suspected. The problem is that Apple ships an old version of the iconv library; MacPorts and Homebrew generally install a newer, incompatible one with symbols renamed to trigger that link error (because otherwise you find out about the mismatch when the first iconv call dumps core at runtime). You will need to arrange for ghc not to see that other iconv, only Apple's, since it won't work with any but Apple's. Or use a ghc from whichever package manager you have installed, so that it works with that package manager's iconv library.
(This is more likely to happen with Homebrew, since most things don't look /opt/local but just about everything looks under /usr/local.)
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Regards, Peng

On Thu, Apr 23, 2015 at 4:46 PM, Peng Yu
Hi MacPorts Users, Is there better solution to this problem? Please see the original question regarding the conflict of MacPorts and Haskell. (I don't what to use haskell from MacPorts as I want to keep updated with the latest version of Haskell.)
I personally would not --- and do not --- chase the latest ghc, because a fair amount of stuff still doesn't build with ghc 7.10.1 and we in #haskell on Freenode keep having to advise people to switch back to 7.8 until the library situation settles down. Wait for the first Platform release with 7.10 (hopefully within a month), after which MacPorts will be updated to it (developer time permitting). -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Thu, Apr 23, 2015 at 4:08 PM, Brandon Allbery
On Thu, Apr 23, 2015 at 4:46 PM, Peng Yu
wrote: Hi MacPorts Users, Is there better solution to this problem? Please see the original question regarding the conflict of MacPorts and Haskell. (I don't what to use haskell from MacPorts as I want to keep updated with the latest version of Haskell.)
I personally would not --- and do not --- chase the latest ghc, because a fair amount of stuff still doesn't build with ghc 7.10.1 and we in #haskell on Freenode keep having to advise people to switch back to 7.8 until the
I mean not "so old" instead of "latest". I am currently using this. ~$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.3 I had problems with MacPorts for Python and Perl. The general suggestion is to stay way from MacPorts for managing packages offered by other language platforms. As if I use MacPorts for managing packages from these languages, I am limited by what are available from MacPorts.
library situation settles down. Wait for the first Platform release with 7.10 (hopefully within a month), after which MacPorts will be updated to it (developer time permitting).
-- Regards, Peng

On Thu, Apr 23, 2015 at 5:12 PM, Peng Yu
I had problems with MacPorts for Python and Perl. The general suggestion is to stay way from MacPorts for managing packages offered by other language platforms.
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'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'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). 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'll break things anyway if they don't: overriding modules that comes with ghc or with the Platform (or Stackage if you use that) is pretty much guaranteed "Cabal hell"). So get those all from the same place, but other modules from wherever --- just don't try to upgrade or replace those packages. You can add a "constraint: <foo> installed" 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. # # # I think MP did end up skipping the latest Platform because the build system changed in a way that's pretty much hostile to other package systems; they'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. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
Peng Yu