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

Re: [PATCH v5] meson: work around broken system PCRE2 dependency in macOS

From
Eli Schwartz <eschwartz@gentoo.org>
Date
Jul 16, 2025, 22:10 UTC
Message-ID
<629a1c11-fceb-4f25-a917-319a99bfed57@gentoo.org>
In-Reply-To
<20250716193000.44673-1-carenas@gmail.com>
On 7/16/25 3:30 PM, Carlo Marcelo Arenas Belón wrote:
Show 8 quoted lines
> +if pcre2.found() and pcre2.type_name() != 'internal' and host_machine.system() == 'darwin'
> +  # macOS installs a broken system package, double check
> +  if not compiler.has_header('pcre2.h', dependencies: pcre2)
> +    if pcre2_feature.enabled()
> +      # Attempt to fallback, method can't be pkg-config 
> +      pcre2 = dependency('libpcre2-8', method: 'builtin', default_options: ['default_library=static', 'test=false'])
> +      if not pcre2.found()
> +        error('only a broken pcre2 install found and pcre2 is required')

If you want to override the message from a specific dependency() call, "required" defaults to true and aborts on the line before "if not pcre2.found()"

You could do: https://mesonbuild.com/Reference-manual_functions.html#dependency_not_found_message

not_found_message: 'only a broken pcre2 install found and pcre2 is required'

Alternatively, required: false followed by if not pcre2.found() --> error(). But you will need "allow_fallback: true" as I responded in a previous message.

-- 
Eli Schwartz
Previous: Junio C HamanoNext: Carlo Arenas
Message 24 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.