9

I want to try unicode with haskell, and the Data.Text docs say I need text-icu. This is what I tried:

Mac OS X 10.6.8

~/haskell_programs$ cabal update
Downloading the latest package list from hackage.haskell.org

~/haskell_programs$ cabal install text-icu
Resolving dependencies...
Downloading text-icu-0.6.3.5...
Configuring text-icu-0.6.3.5...
cabal: Missing dependencies on foreign libraries:
* Missing C libraries: icui18n, icudata, icuuc
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install text-icu-0.6.3.5
cabal: Error: some packages failed to install:
text-icu-0.6.3.5 failed during the configure step. The exception was:
ExitFailure 1

I found a post by a Windows user who had the same problem. Do I really need to go out and install those C libraries? Or are they 'misplaced' somewhere on my system?

Thanks.

1
  • 2
    I can't see any sense in which this is off topic. It's not even too localised.
    – AndrewC
    May 18, 2013 at 11:51

1 Answer 1

18

If you have are using Homebrew, then this is the command that I use:

    DYLD_LIBRARY_PATH=/usr/local/opt/icu4c/lib                      \
        cabal install text-icu                                      \
            --extra-include-dirs=/usr/local/opt/icu4c/include       \
            --extra-lib-dirs=/usr/local/opt/icu4c/lib
1
  • or just brew link icu4c --force
    – Ryan Kung
    Sep 20, 2015 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.