[Haskell-cafe] haskell-platform vs macports

Warren Harris warrensomebody at gmail.com
Fri Mar 23 00:25:21 CET 2012


Thomas,

Thanks for the recommendation. I tried installing with homebrew, and it went fairly smoothly. Only 12 minutes to build haskell-platform, as opposed to the 11 hours to run port upgrade outdated yesterday!

I did have to get help on one thing though. Although the mac ships with libarchive.dylib, it doesn't have archive.h. In order to install that, the following steps are necessary, since the libarchive package is otherwise blacklisted:

brew tap homebrew/dupes
brew install `brew --prefix`/Library/Formula/libarchive.rb

Warren

On Mar 22, 2012, at 3:31 PM, Thomas Schilling wrote:

> If you're not otherwise attached to MacPorts, you might want to check
> out Homebrew [1].  Its integration with the rest of OS X is generally
> more smoothly and I haven't come across any missing packages yet.
> 
> [1]: http://mxcl.github.com/homebrew/
> 
> On 22 March 2012 16:34, Warren Harris <warrensomebody at gmail.com> wrote:
>> 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?
>> 
>> Warren
>> 
>> Undefined symbols for architecture x86_64:
>>  "_locale_charset", referenced from:
>>     _localeEncoding in libHSbase-4.3.1.0.a(PrelIOUtils.o)
>>  "_iconv_close", referenced from:
>>     _hs_iconv_close in libHSbase-4.3.1.0.a(iconv.o)
>>    (maybe you meant: _hs_iconv_close)
>>  "_iconv", referenced from:
>>     _hs_iconv in libHSbase-4.3.1.0.a(iconv.o)
>>    (maybe you meant: _hs_iconv, _hs_iconv_open , _hs_iconv_close )
>>  "_iconv_open", referenced from:
>>     _hs_iconv_open in libHSbase-4.3.1.0.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:
>> ExitFailure 1
>> 
>> 
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 
> 
> -- 
> Push the envelope. Watch it bend.




More information about the Haskell-Cafe mailing list