mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: ptxdist <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
Date: Thu, 28 Mar 2024 09:10:47 +0100	[thread overview]
Message-ID: <ZgUmB_o911YDK_Ut@pengutronix.de> (raw)
In-Reply-To: <4cfc5e0b-86fd-452d-8f1d-ea8a109673f1@mev.co.uk>

On Wed, Mar 27, 2024 at 05:17:21PM +0000, Ian Abbott wrote:
> I'm getting this error when trying to build a kernel that has "Kernel
> hacking > Compile-time checks and compiler options > Generate BTF typeinfo
> (DEBUG_INFO_BTF)" enabled in the configuration:
> 
> --------------------------------------------------------------------
> ----------------------
> target: kernel.compile
> ----------------------
> 
> make: Entering directory '/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21'
> make[1]: Entering directory '/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build'
>   GEN     Makefile
>   DESCEND bpf/resolve_btfids
>   CALL /mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/scripts/checksyscalls.sh
>   GEN /mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build/tools/bpf/resolve_btfids/libbpf/bpf_helper_defs.h
>   INSTALL libsubcmd_headers
> 
> 'kernel' must depend on 'host-system-python3' for 'python3'!
> 
> make[5]: *** [Makefile:160: /mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build/tools/bpf/resolve_btfids/libbpf/bpf_helper_defs.h]
> Error 1
> make[5]: *** Deleting file '/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build/tools/bpf/resolve_btfids/libbpf/bpf_helper_defs.h'
> make[4]: *** [Makefile:63: /mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build/tools/bpf/resolve_btfids//libbpf/libbpf.a]
> Error 2
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [Makefile:76: bpf/resolve_btfids] Error 2
> make[2]: *** [/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/Makefile:1355:
> tools/bpf/resolve_btfids] Error 2
> make[1]: *** [/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/Makefile:234:
> __sub-make] Error 2
> make[1]: Leaving directory '/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21-build'
> make: *** [Makefile:234: __sub-make] Error 2
> make: Leaving directory '/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21'
> make: *** [/mnt/lindata/work/abbotti/ptxdist/ptxdist/ptxdist_git/ptxdist/rules/kernel.make:251: /home/abbotti/work/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/state/kernel.compile]
> Error 2
> --------------------------------------------------------------------
> 
> I could live without it.  It is required for RestrictFileSystems= in systemd
> service units according to
> <https://github.com/systemd/systemd/blob/main/README>.  But is there an easy
> fix?

Put this in "platforms/kernel.fixup.in" in your BSP:
------------------------------->8----------------------------
## SECTION=base_kernel

config KERNEL
	select HOST_SYSTEM_PYTHON3

------------------------------->8----------------------------

> I'm currently using ptxdist 2024.03.0 but is also reproducible on the
> ptxdist master branch.

We should add that dependency Upstream as well. Something like

config KERNEL_PYTHON3
	prompt "ensure Python3 is available"
	bool
	help
	  Python3 is needed at build-time when CONFIG_DEBUG_INFO_BTF is
	  enabled.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-03-28  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 17:17 Ian Abbott
2024-03-28  8:10 ` Michael Olbrich [this message]
2024-03-28 10:59   ` Ian Abbott
2024-03-28 11:36     ` Ian Abbott
2024-03-28 11:52       ` Ian Abbott
2024-03-28 15:04     ` Michael Olbrich

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=ZgUmB_o911YDK_Ut@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=ptxdist@pengutronix.de \
    /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