Build failure for missing pcre2.h on mac m1 with Monterey

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.14.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When installing the php extension with `pecl instal mongodb` the process ends with a failure due to `pcre2.h` not being found.

      This happens on monterey 12.5.1 on M1, with PHP 8.1.9 installed by homebrew.

      A working workaround is described on https://stackoverflow.com/questions/66496119/pecl-fails-installing-mongodb-driver-on-apple-silicon-m1:

      brew install pcre2
      ln -s /opt/homebrew/Cellar/pcre2/10.40/include/pcre2.h /opt/homebrew/Cellar/php/8.1.7/include/php/ext/pcre/pcre2.h
      pecl install mongodb

      But this is likely to break on every release, so a better fix for the pcre dependency is needed.

            Assignee:
            Andreas Braun
            Reporter:
            Frédéric G. MARAND
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: