git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] meson: disable PCRE2 dependency by default in macOS

From
Eli Schwartz <eschwartz@gentoo.org>
Date
Jul 15, 2025, 14:22 UTC
Message-ID
<a0faa9b9-3c65-44c9-97e0-bcf2af053f5e@gentoo.org>
In-Reply-To
<CAPUEspjCbi0U6HYxEvpqMW9FPLn98VMePDTNfadQbt_9GHsZsw@mail.gmail.com>
On 7/15/25 8:01 AM, Carlo Arenas wrote:
Show 10 quoted lines
> On Mon, Jul 14, 2025 at 6:55 PM Eli Schwartz <eschwartz@gentoo.org> wrote:
>>
>> Please double-check my work, that this compiler.has_header() is
>> sufficient on your reproducer system to detect and disable the
>> non-working feature.
> 
> it is indeed all that was needed, abd makes me wonder
> if a future version of dependency() shouldn't have a "has_header"
> parameter like the one used in find_libray() to allow for this
> validation to happen internally and fallback as needed.

It's... possible, I suppose, but usually not needed unless a distributor doesn't respond to reports that their OS is broken. Which well, fair enough, happens. :)

Another possibility is to add a quirk to meson's underlying python code. If pcre2 is searched, and the platform is darwin, also check the header. You'll need a small override in mesonbuild/dependencies/*.py, like:

class PCRE2PkgConfigDependency(PkgConfigDependency):
    def __init__(...):
        super().__init__(...)
        if is_darwin:
            self.is_found = check_that_header()
> Posted a v4 with your code and modifications to still allow a
> fallback to the wrap.
Thanks. :)
-- 
Eli Schwartz
Previous: Carlo ArenasNext: Carlo Marcelo Arenas Belón
Message 17 of 28 in “meson: disable PCRE2 dependency by default”
  1. meson: disable PCRE2 dependency by defaultCarlo Marcelo Arenas Belón, Jul 12, 2025
  2. brian m. carlsonJul 12, 2025
  3. Carlo ArenasJul 14, 2025
  4. Junio C HamanoJul 14, 2025
  5. Carlo Marcelo Arenas BelónJul 14, 2025
  6. Junio C HamanoJul 14, 2025
  7. meson: disable PCRE2 dependency by default in macOSCarlo Marcelo Arenas Belón, Jul 13, 2025
  8. Junio C HamanoJul 13, 2025
  9. meson: disable PCRE2 dependency by default in macOSCarlo Marcelo Arenas Belón, Jul 13, 2025
  10. Eli SchwartzJul 15, 2025
  11. Patrick SteinhardtJul 15, 2025
  12. Carlo ArenasJul 15, 2025
  13. Patrick SteinhardtJul 15, 2025
  14. Carlo ArenasJul 15, 2025
  15. Eli SchwartzJul 15, 2025
  16. Carlo ArenasJul 15, 2025
  17. Eli SchwartzJul 15, 2025
  18. meson: woraround broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 15, 2025
  19. Junio C HamanoJul 15, 2025
  20. Eric SunshineJul 15, 2025
  21. meson: work around broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 16, 2025
  22. Junio C HamanoJul 16, 2025
  23. Junio C HamanoJul 16, 2025
  24. Eli SchwartzJul 16, 2025
  25. Carlo ArenasJul 16, 2025
  26. meson: work around broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 18, 2025
  27. Junio C HamanoJul 23, 2025
  28. Patrick SteinhardtJul 24, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.