facebook/duckling

That error indicates that your system doesn't have development headers for pcre.

shubhamchaurasia1 opened this issue · 3 comments

That error indicates that your system doesn't have development headers for pcre.

The easiest way to get them is to install brew if you haven't already: https://brew.sh/
And then:

brew install pcre

Originally posted by @niteria in #6 (comment)

Installed the latest gcc version as well.
Even after doing the above steps I am facing issue in stack build. I am using M1 Chip, macOS Monterey Version 12.2.1

regex-pcre> configure
regex-pcre> Configuring regex-pcre-0.95.0.0...
regex-pcre> Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4: The program 'pkg-config' version
regex-pcre> >=0.9.0 is required but it could not be found.
regex-pcre> 
Progress 1/2

--  While building package regex-pcre-0.95.0.0 (scroll up to its section to see the error) using:
      /Users/shubhamchaurasia/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/pkgdb --libdir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/lib --bindir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/bin --datadir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/share --libexecdir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/libexec --sysconfdir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/etc --docdir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/doc/regex-pcre-0.95.0.0 --htmldir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/doc/regex-pcre-0.95.0.0 --haddockdir=/Users/shubhamchaurasia/.stack/snapshots/x86_64-osx/f0d4b72118b2f3bd8f21cd81e7cdd07574e05b7c3e237e3048bdf3f70d897d49/8.8.4/doc/regex-pcre-0.95.0.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=containers=containers-0.6.2.1 --dependency=regex-base=regex-base-0.94.0.0-3lEao9661mNAzgJWClRz5I -fpkg-config --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1``

Same error on ubuntu 20.04 while stack build

attoparsec          > copy/register
attoparsec          > Installing library in /root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/lib/x86_64-linux-ghc-8.8.4/attoparsec-0.13.2.4-AHmlmm44dvnKaiPmUJc2M1
attoparsec          > Registering library for attoparsec-0.13.2.4..
Progress 6/32            

--  While building package regex-pcre-0.95.0.0 (scroll up to its section to see the error) using:
      /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --with-ghc=/root/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/bin/ghc-8.8.4 --with-ghc-pkg=/root/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/bin/ghc-pkg-8.8.4 --user --package-db=clear --package-db=global --package-db=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/pkgdb --libdir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/lib --bindir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/bin --datadir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/share --libexecdir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/libexec --sysconfdir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/etc --docdir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/doc/regex-pcre-0.95.0.0 --htmldir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/doc/regex-pcre-0.95.0.0 --haddockdir=/root/.stack/snapshots/x86_64-linux-tinfo6/8ae098606434194dfb0e7d2b8f74c0d24bfa643930ca121d2cfd7a8f7dd8d4d4/8.8.4/doc/regex-pcre-0.95.0.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=containers=containers-0.6.2.1 --dependency=regex-base=regex-base-0.94.0.0-3lEao9661mNAzgJWClRz5I -fpkg-config --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1

Even I have the same error and I have installed prce using brew

@tiiyuu based on @shubhamchaurasia1 comment, I installed pcre on my ubuntu 20.04 device (sudo apt install libpcre3 libpcre3-dev) and it all went well. I didn't have any issue on my mac (running with intel chip) as the readme suggested to install pcre first