euphonictechnologies’s diary

Haskell超初心者の日記です。OCamlが好きです。

follow us in feedly

Haskellをhomebrewからインストールして、一部モジュールのcabalインストールがlibiconvで問題を起こす場合

Thanks for haskell-cafe@haskell.org

If you have a problem when you install uniplate (or ghc-mod, hlint, etc...) by cabal:

Loading package base ... <command line>: can't load .so/.DLL for: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib (dlopen(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib, 9): no suitable image found.  Did find:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib: mach-o, but wrong filetype)
...
(truncated)
...
cabal: Error: some packages failed to install:
uniplate-1.6.12 failed during the building phase. The exception was:
ExitFailure 1

Let's do (1) install command line tools and (2) re-install gcc by brew:

xcode-select --install

Command line tools installation will appear. And then install (or re-install) gcc by home-brew

brew reinstall gcc

You'll get uniplate installed! Yay!