Reputation: 752
I am new to haskell. I am using stack for installing a library called duckling. On the github the author has asked to install the duckling using the stack. I have installed the stack and referring the github page for installation github link for duckling.
Step - 1 for installaltion - $stack build In this step I am getting an error of missing C library : pcre
I have tried to solve this issue but I am not able to figure it out what to do. Couple of things which I have done like downloading the pcre-8.42 from pcre.org and extracted the files in the folder pcre-8.42. I dont know how to solve from here.
Kindly help me, I have almost spend 4-5 hours on this and I am heading no where.
Thanks, Neel
Upvotes: 3
Views: 2110
Reputation: 329
Open duckling.cabal file and replace regex-pcre with regex-pcre-builtin
See here: http://hackage.haskell.org/package/regex-pcre-builtin
Now stack build
should finish successfully
Upvotes: 2
Reputation: 27225
Welcome to Unix C header hell.
Like far too many Haskell libraries and executables, Duckling depends on having a complete set of Unix C libraries. PCRE, the Perl Compatible Regular Expressions library is standard on most Unix builds, but needs to be installed manually on Microsoft Windows.
But, here is the thing: PCRE then depends on a bunch of other tools that are also always there in Unix such as make
and gcc
and the C header files, etc...
In order to build Duckling on Microsoft Windows, you will need to use one of the hand full of tools that provide a Unix like environment within which GHC can run.
I see that you have already discovered MSys and installed PCRE in it. The next step is to get stack
running withing this Unix like environment so that it's version of ghc can find all the libraries it needs. My experience is that this usually means reinstalling stack from the MSys bash prompt -- or at least relocating the stack.exe file to the /usr/local/bin
directory, then running your stack commands from the MSys bash prompt and not the window command prompt.
If this doesn't work, try asking a new question about how to get stack running with the Unix header files on windows or searching other questions on that topic.
Upvotes: 3