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

Re: [PATCH 3/4] meson: require Perl when building docs

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 29, 2025, 17:56 UTC
Message-ID
<xmqqwmc7d8ki.fsf@gitster.g>
In-Reply-To
<20250328-b4-pks-collect-build-fixes-v1-3-ead9deda3fbc@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 25 quoted lines
> From: Eli Schwartz <eschwartz@gentoo.org>
>
> When building our documentation we require Perl to generate the list of
> commands via "cmd-list.perl". Having a Perl interpreter available is
> thus mandatory when building documentation, but Meson does not enforce
> this prerequisite. Thus, when all optional features that depend on Perl
> are disabled, we won't look up the Perl interpreter, which will in the
> end lead to an error at setup time:
>
> ```
> $ meson setup builddir/ -Ddocs=man -Dperl=disabled -Dtests=false
> [...]
> Documentation/meson.build:308:22: ERROR: Tried to use not-found external program in "command"
> ```
>
> There is already a list of other cases where we do need the Perl
> interpreter. Building documentation should be one of those cases, but
> is missing from the list. Add it to fix the issue.
>
> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
> Commit-message-edited-by: Patrick Steinhardt <ps@pks.im>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Two puzzling things.
 * How is this different from 7c8cd9c1 (meson: fix perl detection
   when docs are enabled, but perl bindings aren't, 2025-03-16)?
 * This uses get_options('docs'); shouldn't it be
   get_option('docs')?  With that changed, the patch becomes
   identical to the patch from May 16th, but the proposed log
   message seems to be vastly different.

I'll drop this step from the series for now, as the other one already has been in 'next'.

Thanks.
Show 12 quoted lines
> diff --git a/meson.build b/meson.build
> index a8d1e63ccc6..51013c70de9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -772,7 +772,7 @@ endif
>  # features. It is optional if you want to neither execute tests nor use any of
>  # these optional features.
>  perl_required = get_option('perl')
> -if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers')
> +if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') or get_options('docs') != []
>    perl_required = true
>  endif
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 5 of 22 in “Collection of build fixes”
  1. 0/4 Collection of build fixesPatrick Steinhardt, Mar 28, 2025
  2. 1/4 meson: fix handling of '-Dcurl=auto'Patrick Steinhardt, Mar 28, 2025
  3. 2/4 gitweb: fix generation of "gitweb.js"Patrick Steinhardt, Mar 28, 2025
  4. 3/4 meson: require Perl when building docsPatrick Steinhardt, Mar 28, 2025
  5. Junio C HamanoMar 29, 2025
  6. Patrick SteinhardtMar 31, 2025
  7. 4/4 meson: respect 'tests' build option in contribPatrick Steinhardt, Mar 28, 2025
  8. Sam JamesMar 28, 2025
  9. 0/5 Collection of build fixesPatrick Steinhardt, Mar 31, 2025
  10. 1/5 meson: fix handling of '-Dcurl=auto'Patrick Steinhardt, Mar 31, 2025
  11. Karthik NayakApr 3, 2025
  12. 2/5 gitweb: fix generation of "gitweb.js"Patrick Steinhardt, Mar 31, 2025
  13. Johannes SchindelinApr 1, 2025
  14. Patrick SteinhardtApr 2, 2025
  15. Toon ClaesApr 1, 2025
  16. 3/5 meson: respect 'tests' build option in contribPatrick Steinhardt, Mar 31, 2025
  17. Johannes SchindelinApr 1, 2025
  18. 5/5 ci: use Visual Studio for win+meson job on GitHub WorkflowsPatrick Steinhardt, Mar 31, 2025
  19. 4/5 meson: distinguish build and target host binariesPatrick Steinhardt, Mar 31, 2025
  20. Karthik NayakApr 3, 2025
  21. Johannes SchindelinApr 1, 2025
  22. Karthik NayakApr 3, 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.