mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
@ 2024-03-27 17:17 Ian Abbott
  2024-03-28  8:10 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2024-03-27 17:17 UTC (permalink / raw)
  To: ptxdist

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?

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

-- 
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
  2024-03-27 17:17 [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'! Ian Abbott
@ 2024-03-28  8:10 ` Michael Olbrich
  2024-03-28 10:59   ` Ian Abbott
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2024-03-28  8:10 UTC (permalink / raw)
  To: Ian Abbott; +Cc: ptxdist

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 |



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
  2024-03-28  8:10 ` Michael Olbrich
@ 2024-03-28 10:59   ` Ian Abbott
  2024-03-28 11:36     ` Ian Abbott
  2024-03-28 15:04     ` Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Ian Abbott @ 2024-03-28 10:59 UTC (permalink / raw)
  To: ptxdist

On 28/03/2024 08:10, Michael Olbrich wrote:
> 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.

Thanks.  I combined the two and added the following to 
"platforms/kernel.fixup.in" in my BSP:

------------------------------->8----------------------------
## SECTION=base_kernel

config KERNEL
	select HOST_SYSTEM_PYTHON3 if KERNEL_PYTHON3

config KERNEL_PYTHON3
	prompt "ensure Python3 is available"
	bool
	select HOST_SYSTEM_PYTHON3
	help
	  Python3 is needed at build-time when CONFIG_DEBUG_INFO is
	  enabled
------------------------------->8----------------------------

Then I enabled KERNEL_PYTHON3 in my platformconfig.

The kernel build gets further than before, but stops here:

------------------------------->8----------------------------
----------------------
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
   INSTALL libsubcmd_headers
   UPD     include/generated/utsversion.h
   CC      init/version-timestamp.o
BTF: .tmp_vmlinux.btf: pahole (false) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make[3]: *** 
[/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/scripts/Makefile.vmlinux:37: 
vmlinux] Error 1
make[2]: *** 
[/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/Makefile:1165: 
vmlinux] 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/releases/ptxdist-2024.03.0/rules/kernel.make:251: 
/home/abbotti/work/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/state/kernel.compile] 
Error 2
------------------------------->8----------------------------

I guess that is because of these lines in the upstream "rules/kernel.make":

------------------------------->8----------------------------
KERNEL_SHARED_OPT	= \
	$(KERNEL_MODULE_OPT) \
	PAHOLE=false
------------------------------->8----------------------------

So it would probably require more work to upstream to support the 
CONFIG_DEBUG_INFO_BTF kernel option in ptxdist.

Kind regards,
Ian

-- 
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2024-03-28 11:36 UTC (permalink / raw)
  To: ptxdist

On 28/03/2024 10:59, Ian Abbott wrote:
> On 28/03/2024 08:10, Michael Olbrich wrote:
>> 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.
> 
> Thanks.  I combined the two and added the following to 
> "platforms/kernel.fixup.in" in my BSP:
> 
> ------------------------------->8----------------------------
> ## SECTION=base_kernel
> 
> config KERNEL
>      select HOST_SYSTEM_PYTHON3 if KERNEL_PYTHON3
> 
> config KERNEL_PYTHON3
>      prompt "ensure Python3 is available"
>      bool
>      select HOST_SYSTEM_PYTHON3
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
I realize that line is redundant.  It was left over from my experimentation!

>      help
>        Python3 is needed at build-time when CONFIG_DEBUG_INFO is
>        enabled
> ------------------------------->8----------------------------

-- 
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
  2024-03-28 11:36     ` Ian Abbott
@ 2024-03-28 11:52       ` Ian Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2024-03-28 11:52 UTC (permalink / raw)
  To: ptxdist

On 28/03/2024 11:36, Ian Abbott wrote:
> On 28/03/2024 10:59, Ian Abbott wrote:
>> On 28/03/2024 08:10, Michael Olbrich wrote:
>>> 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.
>>
>> Thanks.  I combined the two and added the following to 
>> "platforms/kernel.fixup.in" in my BSP:
>>
>> ------------------------------->8----------------------------
>> ## SECTION=base_kernel
>>
>> config KERNEL
>>      select HOST_SYSTEM_PYTHON3 if KERNEL_PYTHON3
>>
>> config KERNEL_PYTHON3
>>      prompt "ensure Python3 is available"
>>      bool
>>      select HOST_SYSTEM_PYTHON3
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^
> I realize that line is redundant.  It was left over from my 
> experimentation!
> 
>>      help
>>        Python3 is needed at build-time when CONFIG_DEBUG_INFO is
                                                ^^^^^^^^^^^^^^^^^
And that should have been 'CONFIG_DEBUG_INFO_BTF' of course!

>>        enabled
>> ------------------------------->8----------------------------
> 

-- 
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'!
  2024-03-28 10:59   ` Ian Abbott
  2024-03-28 11:36     ` Ian Abbott
@ 2024-03-28 15:04     ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2024-03-28 15:04 UTC (permalink / raw)
  To: Ian Abbott; +Cc: ptxdist

On Thu, Mar 28, 2024 at 10:59:43AM +0000, Ian Abbott wrote:
> On 28/03/2024 08:10, Michael Olbrich wrote:
> > 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.
> 
> Thanks.  I combined the two and added the following to
> "platforms/kernel.fixup.in" in my BSP:
> 
> ------------------------------->8----------------------------
> ## SECTION=base_kernel
> 
> config KERNEL
> 	select HOST_SYSTEM_PYTHON3 if KERNEL_PYTHON3
> 
> config KERNEL_PYTHON3
> 	prompt "ensure Python3 is available"
> 	bool
> 	select HOST_SYSTEM_PYTHON3
> 	help
> 	  Python3 is needed at build-time when CONFIG_DEBUG_INFO is
> 	  enabled
> ------------------------------->8----------------------------
> 
> Then I enabled KERNEL_PYTHON3 in my platformconfig.
> 
> The kernel build gets further than before, but stops here:
> 
> ------------------------------->8----------------------------
> ----------------------
> 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
>   INSTALL libsubcmd_headers
>   UPD     include/generated/utsversion.h
>   CC      init/version-timestamp.o
> BTF: .tmp_vmlinux.btf: pahole (false) is not available
> Failed to generate BTF for vmlinux
> Try to disable CONFIG_DEBUG_INFO_BTF
> make[3]: *** [/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/scripts/Makefile.vmlinux:37:
> vmlinux] Error 1
> make[2]: *** [/mnt/lindata/work/abbotti/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/build-target/linux-6.6.21/Makefile:1165:
> vmlinux] 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/releases/ptxdist-2024.03.0/rules/kernel.make:251: /home/abbotti/work/ptxdist/projects/its-ipt4-demo/platform-its-ipt4-demo/state/kernel.compile]
> Error 2
> ------------------------------->8----------------------------
> 
> I guess that is because of these lines in the upstream "rules/kernel.make":
> 
> ------------------------------->8----------------------------
> KERNEL_SHARED_OPT	= \
> 	$(KERNEL_MODULE_OPT) \
> 	PAHOLE=false
> ------------------------------->8----------------------------
> 
> So it would probably require more work to upstream to support the
> CONFIG_DEBUG_INFO_BTF kernel option in ptxdist.

Right, so we need a host-pahole package and select it as well.

Regards,
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 |



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-28 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 17:17 [ptxdist] Getting error 'kernel' must depend on 'host-system-python3' for 'python3'! Ian Abbott
2024-03-28  8:10 ` Michael Olbrich
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox