[Haskell-cafe] haskell-platform vs macports
warrensomebody at gmail.com
Thu Mar 22 17:34:39 CET 2012
I assume that many haskell users out there on macs who are also users of macports, and I bet they've hit this same issue that I've hit numerous times. The problem is that there are 2 incompatible versions of libiconv -- one that ships with the mac, and one that's built with macports and that many macports-compiled libraries depend on.
Work-arounds have been documented in numerous places (notably here: http://blog.omega-prime.co.uk/?p=96), but if you are trying to link with a macports-compiled libraries that depends on /opt/local/lib/libiconv.2.dylib, your only alternative seems to be building ghc from source in order to avoid the incompatibility. I hit this problem while trying to build a foreign-function interface to libarchive.
So I built ghc from scratch -- in fact I built the whole haskell-platform. This was relatively painless, and fixed the libiconv problem. However, it brings me to the real point of my message, which is that the version of haskell-platform available via macports is way out of date (2009.2.0.2 http://www.macports.org/ports.php?by=name&substr=haskell-platform).
I'm wondering whether the haskell-platform team has considered maintaining a macports version of the haskell-platform for us mac users in addition to the binary install that's available now. This would avoid the incompatibilities such as this nagging one with libiconv. Perhaps it's just a matter of maintaining template versions of the port files?
Undefined symbols for architecture x86_64:
"_locale_charset", referenced from:
_localeEncoding in libHSbase-184.108.40.206.a(PrelIOUtils.o)
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-220.127.116.11.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_iconv", referenced from:
_hs_iconv in libHSbase-18.104.22.168.a(iconv.o)
(maybe you meant: _hs_iconv, _hs_iconv_open , _hs_iconv_close )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-22.214.171.124.a(iconv.o)
(maybe you meant: _hs_iconv_open)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
Libarchive-0.1 failed during the building phase. The exception was:
More information about the Haskell-Cafe