arbtt icon indicating copy to clipboard operation
arbtt copied to clipboard

MacOS error building pcre-light dependency

Open micheljansen opened this issue 1 year ago • 0 comments

When building on MacOS (using the Homebrew instructions), the dependency package pcre-light fails to build with an error:


error: Base.hsc:105:10: fatal error: 'pcre.h' file not found
#include <pcre.h>
         ^~~~~~~~
1 error generated.

Error: cabal: Failed to build pcre-light-0.4.1.2 (which is required by
exe:arbtt-stats from arbtt-0.12.0.3). See the build log above for details.

I solved this by manually telling Cabal where to find pcre.h using a "cabal.project.local" file with these contents:

package pcre-light
  extra-include-dirs: /opt/homebrew/Cellar/pcre/8.45/include/

micheljansen avatar Jan 03 '24 20:01 micheljansen