Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using text-icu library in Haskell on Mac OS

Tags:

haskell

cabal

icu

I am trying to use the text-icu library as a dependency in a cabal package on Mac OS. I have icu installed but when I try to build my package cabal gives me this error:

  • Missing C libraries: icui18n, icudata, icuuc

I'm am unsure what debugging steps to use.

like image 232
user945202 Avatar asked Sep 14 '11 17:09

user945202


1 Answers

You can use either MacPorts or Homebrew to install the icu package, and have cabal refer to the custom header and library path:

MacPorts

sudo port install icu
cabal install text-icu --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib

Homebrew

brew install icu4c
cabal install text-icu --extra-lib-dirs=/usr/local/opt/icu4c/lib --extra-include-dirs=/usr/local/opt/icu4c/include
like image 52
Ayub Avatar answered Oct 16 '22 03:10

Ayub