public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Rong Zhang <i@rong.moe>, Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Nicolas Schier <nsc@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] kbuild: install-extmod-build: Add missing python libraries
Date: Thu, 29 Jan 2026 18:11:06 -0700	[thread overview]
Message-ID: <20260130011106.GA359714@ax162> (raw)
In-Reply-To: <20260129175321.415295-1-i@rong.moe>

+ Jon, Mauro, and linux-doc

FWIW, this ended up in my spam folder but I saw it on linux-kbuild.

On Fri, Jan 30, 2026 at 01:49:55AM +0800, Rong Zhang wrote:
> scripts/lib has been moved to tools/lib/python recently. Since then, I
> got a regression while building out-of-tree modules with W=<anything>
> (1/2/3/c/e):

Hmmm, the W=<anything> bit seems wrong (or at the very least, c/e)... we
should probably change that to just being enabled at W=1 (but that is
tangential to this patch).

>   $ make -C /lib/modules/6.19.0-rc6/build/ M="$(pwd)" modules V=1 W=1
>   [...]
>   make -f /usr/src/linux-headers-6.19.0-rc6/scripts/Makefile.build obj=. need-builtin=1 need-modorder=1
>   # CC [M]  mod.o
>   [...]
>   # cmd_checkdoc mod.o
>   PYTHONDONTWRITEBYTECODE=1 python3 /usr/src/linux-headers-6.19.0-rc6/scripts/kernel-doc.py -none mod.c
>   Traceback (most recent call last):
>     File "/usr/src/linux-headers-6.19.0-rc6/scripts/kernel-doc.py", line 339, in <module>
>       main()
>       ~~~~^^
>     File "/usr/src/linux-headers-6.19.0-rc6/scripts/kernel-doc.py", line 295, in main
>       from kdoc.kdoc_files import KernelFiles             # pylint: disable=C0415
>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   ModuleNotFoundError: No module named 'kdoc'
>   make[3]: *** [/usr/src/linux-headers-6.19.0-rc6/scripts/Makefile.build:287: mod.o] Error 1
> 
> Fix it by installing python libraries from tools/lib/python.
> 
> Fixes: 778b8ebe5192 ("docs: Move the python libraries to tools/lib/python")
> Signed-off-by: Rong Zhang <i@rong.moe>

Thanks, this seems to be correct to me.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

Nicolas, do you want to take this via kbuild-fixes? This should probably
have a 'Cc: stable@vger.kernel.org' on it?

Hmmm, now that I am looking at -next, Jon's move of scripts/kernel-doc
to tools/docs/ in commit eba6ffd126cd ("docs: kdoc: move kernel-doc to
tools/docs") in that tree without adding tools/docs to this list breaks
this exact same scenario, right?

> ---
>  scripts/package/install-extmod-build | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
> index 2576cf7902dbb..a15de610afed3 100755
> --- a/scripts/package/install-extmod-build
> +++ b/scripts/package/install-extmod-build
> @@ -20,6 +20,7 @@ mkdir -p "${destdir}"
>  (
>  	cd "${srctree}"
>  	echo Makefile
> +	echo tools/lib/python # required by scripts
>  	find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
>  	find "arch/${SRCARCH}" -name generated -prune -o -name include -type d -print
>  	find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform
> 
> base-commit: 8dfce8991b95d8625d0a1d2896e42f93b9d7f68d
> -- 
> 2.51.0
> 

  reply	other threads:[~2026-01-30  1:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 17:49 [PATCH] kbuild: install-extmod-build: Add missing python libraries Rong Zhang
2026-01-30  1:11 ` Nathan Chancellor [this message]
2026-01-30  5:30   ` Mauro Carvalho Chehab
2026-01-30  6:40     ` Nathan Chancellor
2026-01-30  8:32       ` Mauro Carvalho Chehab
2026-01-31 15:08         ` Nicolas Schier

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=20260130011106.GA359714@ax162 \
    --to=nathan@kernel.org \
    --cc=corbet@lwn.net \
    --cc=i@rong.moe \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nsc@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox