On Wed, Aug 31, 2022 at 8:27 AM Peter Hoyes <[email protected]> wrote:
>
>
> On 16/08/2022 14:02, Peter Hoyes wrote:
>
> On 16/08/2022 13:42, Bruce Ashfield via lists.yoctoproject.org wrote:
>
> On Tue, Aug 16, 2022 at 8:34 AM Peter Hoyes <[email protected]> wrote:
>
> Hi,
>
> We have discovered an issue in yocto-kernel-tools that only arises with a
> certain combination of host build paths. Some steps to reproduce are as
> follows:
>
> Create directories /build and /work at the root of the filesystem (e.g. in a
> container or VM)
> Checkout poky at /work/poky
> Run `source /work/poky/oe-init-build-env /build`
> Modify conf/bblayers.conf, so that:
>
> The layer paths are defined relative to ${TOPDIR}
> poky/meta-skeleton is included
>
> i.e.:
>
> BBLAYERS ?= " \
> ${TOPDIR}/../work/poky/meta \
> ${TOPDIR}/../work/poky/meta-poky \
> ${TOPDIR}/../work/poky/meta-yocto-bsp \
> ${TOPDIR}/../work/poky/meta-skeleton \
> "
>
> 5. Create
> /work/poky/meta-skeleton/recipes-kernel/linux/linux-yocto_%.bbappend with the
> following:
>
> FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-custom:"
> SRC_URI += "file://0001-linux-version-tweak.patch"
>
> 6. Run `bitbake virtual/kernel`
>
> This fails with the following (slightly cryptic) error:
>
> [ERROR]: processing of file /tmp/tmp.qjyDcHw7rx failed
> | # _reloc_dir
> /build/tmp/work/qemuarm64-poky-linux/linux-yocto/5.19+gitAUTOINC+89fdc2046b_e0e977e1b0-r0
> | # _reloc_dir /work/poky/meta-skeleton/recipes-kernel/linux
> | /build/tmp/hosttools/dirname: missing operand
> | Try '/build/tmp/hosttools/dirname --help' for more information.
> | ERROR: Could not generate configuration queue for qemuarm64.
>
> I've spent a little time trying to root-cause the issue and I think it lies
> in the path-processing logic in the 'spp' tool, but I'm not very familiar
> with the code. The `dirname` error above seems to be thrown from patch.cmd,
> because the $prefix generated by spp somehow manages to equal $patch_name.
>
> I'm a bit pressed for time this week, as I have to get a ELCe
> presentation completed before I head out on vacation, but I can fire
> up a background build and see if I can reproduce the error here.
>
> But no matter what, I can take care of fixing it.
>
> Bruce
>
>
> Thanks. I'm on vacation next week too, but let me know if I can help with the
> repro or with verifying any patches.
>
> Peter
>
>
> We have worked around the issue here by changing our path layout, but I
> thought I should raise it in case it affects others. The recent Kas 3.1
> release contains a change
> (https://github.com/siemens/kas/commit/94e0e999f206689b2732940436d4a9f312da2213)
> which causes BBLAYERS to be described relative to ${TOPDIR} (as above), so
> this might be more likely to happen in the future. Additionally, if you're
> using the Kas Docker container you're probably more likely to use unusual
> path layouts, such as rooted /work and /build directories.
>
> Regards,
>
> Peter
>
>
>
>
> Hi all,
>
> I only recently spotted that the same issue came up on the Kas mailing list
> (https://groups.google.com/g/kas-devel/c/cz_HzB5LO4Q), so cross-referencing
> and cc'ing the relevant people here.
That could very well fix the issue, but I'm still on holidays until
September 6th, and I don't have access to my build resources at the
moment.
I'll pop this onto a testing queue, and perform extra testing when I'm
back to the office.
Bruce
>
> Jan Kiska (cc'ed) suggested the following patch there, which may help:
>
> diff --git a/tools/spp b/tools/spp
> index 4d3fa10..27a99d1 100755
> --- a/tools/spp
> +++ b/tools/spp
> @@ -112,7 +112,7 @@ warn()
> # search paths, and can be found later.
> strip_common_prefix()
> {
> - in_name=$1
> + in_name=$(readlink -f $1)
>
> Regards,
>
> Peter
--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11618):
https://lists.yoctoproject.org/g/linux-yocto/message/11618
Mute This Topic: https://lists.yoctoproject.org/mt/93057468/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-