Error while stack build (pcre-light)

195 views
Skip to first unread message

Conee

unread,
Jan 15, 2021, 7:52:01 AM1/15/21
to Yesod Web Framework
Regards,

I created a scaffolded project with support for mysql.
When I start the stack build as the instructions in the yesod quick start guide say,
I have the following error that I don't know how to solve:

- While building package pcre-light-0.4.1.0 (scroll up to its section to see the error) using: ...
and these are the steps in build:

pcre-light> configure
pcre-light> Configuring pcre-light-0.4.1.0 ...
pcre-light> Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4: Missing dependency on a foreign pcre-light> library:
pcre-light> * Missing (or bad) C library:
pcre pcre-light> This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs = and --extra-lib-dirs = to specify where it is.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages.

My OS is Ubuntu 20.04. , and before this I install mysql-server.

If anyone can help, I would be grateful, because I can't continue working.
Thank you!

Conee

unread,
Jan 15, 2021, 10:41:18 AM1/15/21
to Yesod Web Framework
Hello,

For someone who have same mistake,
I think I solved this with these steps:

1. sudo apt-cache search pcre // with this we found packages to install to get library (I took libghc-pcre-light-dev),
2. sudo apt install libghc-pcre-light-dev
3. stack install pcre-light

Please reply is this the right way or not.

Sibi Prabakaran

unread,
Jan 15, 2021, 11:26:01 AM1/15/21
to yeso...@googlegroups.com
On Fri, Jan 15, 2021 at 9:11 PM Conee <nemanj...@gmail.com> wrote:
>
>
> Please reply is this the right way or not.

Glad that you got it working. But note that you don't need the above
three steps.

You just need to find the proper system library required by the
package pcre-light. I guess installing
libghc-pcre-light-dev transitively fulfilled your missing system
dependency. Usually the missing package ends with "dev"
prefix in a Debian based system.

We have a "Systems library" section in the quick start page which
briefly explains it: https://www.yesodweb.com/page/quickstart

But I guess we can improve it further to help the newcomers.

Regards,
--
Sibi Prabakaran
https://psibi.in
Reply all
Reply to author
Forward
0 new messages