All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Markus Mayer <markus.mayer@broadcom.com>
Cc: Buildroot Mailing List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH v2] package/linux-tools/linux-tool-perf.mk.in: fix doc build issue
Date: Sun, 25 Oct 2026 22:18:18 +0100	[thread overview]
Message-ID: <at5yE5coeOp6SzBZ@windsurf> (raw)
In-Reply-To: <20261015222908.760160-1-markus.mayer@broadcom.com>

On Thu, Oct 15, 2026 at 03:29:05PM -0700, Markus Mayer via buildroot wrote:
> Address potential document build issue when BR2_PER_PACKAGE_DIRECTORIES
> is enabled.
> 
> The perf package wants to prevent the documentation from being built,
> since it won't be installed anyway. The trick is to create an empty
> GNUmakefile in the proper place. It did this by using a POST_PATCH hook.
> 
> The reason this approach works when BR2_PER_PACKAGE_DIRECTORIES is off
> is that the build system ensures only one package builds at a time, so
> Linux's "extract" stage and Linux Tool's "patch" stage can never execute
> in parallel.
> 
> However, with per-package builds enabled, there is no guarantee that
> Linux has finished extracting by the time the linux-tool's POST_PATCH
> hook runs. This means the creation of GNUmakefile could silently be
> skipped if that portion of the source code hadn't been extracted yet.
> If, in addition to this, asciidoc happened to be installed on the build
> host (/usr/bin/asciidoc), perf would detect this and enable the doc
> build stage. At actual build time, it would use host-python3 (not the
> host's system Python), which does NOT have asciidoc, and the build would
> fail.
> 
>   INSTALL libperf_headers
>   SYSHDR  /local/users/jenkins/workspace/[...]/libperf/arch/[...]/unistd_64.h
>   INSTALL libbpf_headers
> fatal: not a git repository: '.'
>   ASCIIDOC /local/users/jenkins/workspace/[...]/tools/perf/perf-amd-ibs.xml
> fatal: not a git repository: '.'
> [...]
>   ASCIIDOC /local/users/jenkins/workspace/[...]/tools/perf/perf-data.xml
> /local/users/jenkins/workspace/buildroot/[...]/host/bin/python3:
> No module named asciidoc
> make[5]: *** [Makefile:275: [...]/perf-data.xml] Error 1
> 
> Turning the POST_PATCH hook into a PRE_CONFIGURE hook solves this timing
> problem and guarantees that the "fake" GNUmakefile can be injected into
> $(LINUX_DIR)/tools/perf/Documentation as intended.
> 
> Signed-off-by: Markus Mayer <markus.mayer@broadcom.com>

Applied to master, thanks!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2026-10-25 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 22:29 [Buildroot] [PATCH v2] package/linux-tools/linux-tool-perf.mk.in: fix doc build issue Markus Mayer via buildroot
2026-10-15 22:32 ` Florian Fainelli via buildroot
2026-10-25 21:18 ` Thomas Petazzoni via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=at5yE5coeOp6SzBZ@windsurf \
    --to=buildroot@buildroot.org \
    --cc=markus.mayer@broadcom.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.