From: Nicolas Schier <nicolas@fjasle.eu>
To: Adrian Huang <adrianhuang0701@gmail.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Kieran Bingham <kbingham@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
linux-kernel@vger.kernel.org, Adrian Huang <ahuang12@lenovo.com>
Subject: Re: [PATCH 1/1] kbuild: Fix 'import module' error
Date: Thu, 30 May 2024 18:17:24 +0200 [thread overview]
Message-ID: <ZlimlGhgULcpCQlO@bergen.fritz.box> (raw)
In-Reply-To: <20240529154621.21354-1-ahuang12@lenovo.com>
[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]
On Wed 29 May 2024 23:46:21 GMT, Adrian Huang wrote:
> From: Adrian Huang <ahuang12@lenovo.com>
>
> Commit b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src)
> for source directory") only changes 'symlinks'. However, 'cmd_symlink'
> is not changed accordingly. This leads to the following error:
>
> Traceback (most recent call last):
> File "/your_kernel_obj/linux/vmlinux-gdb.py",
> line 29, in <module>
> import linux.utils
> ModuleNotFoundError: No module named 'linux.utils'
>
> Fix the issue by using $(src) instead of $(srctree)/$(src).
>
> Fixes: b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
> Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
> ---
> scripts/gdb/linux/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
> index d77ad9079d0f..fcd32fcf3ae0 100644
> --- a/scripts/gdb/linux/Makefile
> +++ b/scripts/gdb/linux/Makefile
> @@ -5,7 +5,7 @@ ifdef building_out_of_srctree
> symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py))
>
> quiet_cmd_symlink = SYMLINK $@
> - cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
> + cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(src))/%,$@) $@
>
> always-y += $(symlinks)
> $(addprefix $(obj)/, $(symlinks)): FORCE
> --
> 2.25.1
Hi Adrian,
this is already fixed in kbuild/for-next. Unfortunately the patch is
not available at lore.kernel.org (did not not pass any usual mailing
list?), but you can find the pre-applied patch in [1].
Kind regards,
Nicolas
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=659bbf7e1b08267b8e1dd900b316edcb6f6d9e2e
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2024-05-30 16:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 15:46 [PATCH 1/1] kbuild: Fix 'import module' error Adrian Huang
2024-05-30 16:17 ` Nicolas Schier [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=ZlimlGhgULcpCQlO@bergen.fritz.box \
--to=nicolas@fjasle.eu \
--cc=adrianhuang0701@gmail.com \
--cc=ahuang12@lenovo.com \
--cc=jan.kiszka@siemens.com \
--cc=kbingham@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@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