All of lore.kernel.org
 help / color / mirror / Atom feed
* kvmtool patch error
@ 2022-12-07 16:46 Nathan.Fisher
  2022-12-07 16:55 ` [meta-virtualization] " Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nathan.Fisher @ 2022-12-07 16:46 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2118 bytes --]

To the maintainers:

I've been trying to use meta-virtualization to include kvm in a build I'm working on. In my local.conf file I have added the lines:

  1.  DISTRO_FEATURES:append = " virtualization"
  2.  IMAGE_INSTALL:append = " dtc libaio zlib kvmtool" (upon initially getting the error below, I explicitly included the stated dependencies listed in the kvmtool recipe in hopes that would change things. It did not).


However, whenever I run bitbake core-image-base, I get a build error. The following is the output:


ERROR: kvmtool-5.10.0+gitAUTOINC+336751fb10-r0 do_patch: Applying patch 'external-crosscompiler.patch' on target directory '[path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/git'
CmdError('quilt --quiltrc [path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch external-crosscompiler.patch
patching file Makefile
Hunk #2 FAILED at 337.
1 out of 2 hunks FAILED -- rejects in file Makefile
Patch external-crosscompiler.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /home/yocto/bmc3_os/build/tmp/work/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/temp/log.do_patch.15225
ERROR: Task ([path to meta-virtualization]/recipes-extended/kvmtool/kvmtool.bb:do_patch) failed with exit code '1'


I took the liberty of looking at the patch file and the makefile. The 2nd hunk in the patch appears to be trying to replace a line that no longer exists. I have tried not only your latest master branch, but also the Kirkstone, Langdale, and Dunfell releases in case any of them had a working state for the recipe (I also tried other releases but started running into syntax errors due to those versions of the recipe using the old bitbake syntax instead of the current grammar).

I was wondering if this was a known issue with a fix available, or if there were plans to update the patch files.

Thank you for your time,
Nathan Fisher
Nathan.Fisher@gd-ms.com<mailto:Nathan.Fisher@gd-ms.com>


[-- Attachment #2: Type: text/html, Size: 6663 bytes --]

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

* Re: [meta-virtualization] kvmtool patch error
  2022-12-07 16:46 kvmtool patch error Nathan.Fisher
@ 2022-12-07 16:55 ` Bruce Ashfield
       [not found] ` <172E9131448E8B3C.29158@lists.yoctoproject.org>
  2022-12-07 20:46 ` [meta-virtualization] " Fabio Estevam
  2 siblings, 0 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-12-07 16:55 UTC (permalink / raw)
  To: nathan.fisher; +Cc: meta-virtualization

On Wed, Dec 7, 2022 at 11:46 AM Nathan.Fisher@gd-ms.com via
lists.yoctoproject.org
<nathan.fisher=gd-ms.com@lists.yoctoproject.org> wrote:
>
> To the maintainers:
>
>
>
> I’ve been trying to use meta-virtualization to include kvm in a build I’m working on. In my local.conf file I have added the lines:
>
> DISTRO_FEATURES:append = " virtualization"
> IMAGE_INSTALL:append = " dtc libaio zlib kvmtool" (upon initially getting the error below, I explicitly included the stated dependencies listed in the kvmtool recipe in hopes that would change things. It did not).
>
>
>
> However, whenever I run bitbake core-image-base, I get a build error. The following is the output:
>
>
>
>
>
> ERROR: kvmtool-5.10.0+gitAUTOINC+336751fb10-r0 do_patch: Applying patch 'external-crosscompiler.patch' on target directory '[path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/git'
>
> CmdError('quilt --quiltrc [path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch external-crosscompiler.patch
>
> patching file Makefile
>
> Hunk #2 FAILED at 337.
>
> 1 out of 2 hunks FAILED -- rejects in file Makefile
>
> Patch external-crosscompiler.patch does not apply (enforce with -f)
>
>
>
> stderr: ')
>
> ERROR: Logfile of failure stored in: /home/yocto/bmc3_os/build/tmp/work/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/temp/log.do_patch.15225
>
> ERROR: Task ([path to meta-virtualization]/recipes-extended/kvmtool/kvmtool.bb:do_patch) failed with exit code '1'
>
>
>
>
>
> I took the liberty of looking at the patch file and the makefile. The 2nd hunk in the patch appears to be trying to replace a line that no longer exists. I have tried not only your latest master branch, but also the Kirkstone, Langdale, and Dunfell releases in case any of them had a working state for the recipe (I also tried other releases but started running into syntax errors due to those versions of the recipe using the old bitbake syntax instead of the current grammar).
>
>
>
> I was wondering if this was a known issue with a fix available, or if there were plans to update the patch files.
>
>

When I updated it on Sept 22nd, it worked here.

But I can double check my builders and see if something was missed.

Bruce

>
> Thank you for your time,
>
> Nathan Fisher
>
> Nathan.Fisher@gd-ms.com
>
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7738): https://lists.yoctoproject.org/g/meta-virtualization/message/7738
> Mute This Topic: https://lists.yoctoproject.org/mt/95519084/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: [meta-virtualization] kvmtool patch error
       [not found] ` <172E9131448E8B3C.29158@lists.yoctoproject.org>
@ 2022-12-07 17:01   ` Bruce Ashfield
  2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
  2022-12-07 18:27     ` Nathan.Fisher@gd-ms.com
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-12-07 17:01 UTC (permalink / raw)
  To: bruce.ashfield; +Cc: nathan.fisher, meta-virtualization

It does look like a refreshed patch was missed.

Can you try master-next and confirm that it works for you.

I've only test built on x86, and need to confirm arm64 before I can
push it to master.

Bruce

On Wed, Dec 7, 2022 at 11:55 AM Bruce Ashfield via
lists.yoctoproject.org
<bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
>
> On Wed, Dec 7, 2022 at 11:46 AM Nathan.Fisher@gd-ms.com via
> lists.yoctoproject.org
> <nathan.fisher=gd-ms.com@lists.yoctoproject.org> wrote:
> >
> > To the maintainers:
> >
> >
> >
> > I’ve been trying to use meta-virtualization to include kvm in a build I’m working on. In my local.conf file I have added the lines:
> >
> > DISTRO_FEATURES:append = " virtualization"
> > IMAGE_INSTALL:append = " dtc libaio zlib kvmtool" (upon initially getting the error below, I explicitly included the stated dependencies listed in the kvmtool recipe in hopes that would change things. It did not).
> >
> >
> >
> > However, whenever I run bitbake core-image-base, I get a build error. The following is the output:
> >
> >
> >
> >
> >
> > ERROR: kvmtool-5.10.0+gitAUTOINC+336751fb10-r0 do_patch: Applying patch 'external-crosscompiler.patch' on target directory '[path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/git'
> >
> > CmdError('quilt --quiltrc [path to work directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch external-crosscompiler.patch
> >
> > patching file Makefile
> >
> > Hunk #2 FAILED at 337.
> >
> > 1 out of 2 hunks FAILED -- rejects in file Makefile
> >
> > Patch external-crosscompiler.patch does not apply (enforce with -f)
> >
> >
> >
> > stderr: ')
> >
> > ERROR: Logfile of failure stored in: /home/yocto/bmc3_os/build/tmp/work/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/temp/log.do_patch.15225
> >
> > ERROR: Task ([path to meta-virtualization]/recipes-extended/kvmtool/kvmtool.bb:do_patch) failed with exit code '1'
> >
> >
> >
> >
> >
> > I took the liberty of looking at the patch file and the makefile. The 2nd hunk in the patch appears to be trying to replace a line that no longer exists. I have tried not only your latest master branch, but also the Kirkstone, Langdale, and Dunfell releases in case any of them had a working state for the recipe (I also tried other releases but started running into syntax errors due to those versions of the recipe using the old bitbake syntax instead of the current grammar).
> >
> >
> >
> > I was wondering if this was a known issue with a fix available, or if there were plans to update the patch files.
> >
> >
>
> When I updated it on Sept 22nd, it worked here.
>
> But I can double check my builders and see if something was missed.
>
> Bruce
>
> >
> > Thank you for your time,
> >
> > Nathan Fisher
> >
> > Nathan.Fisher@gd-ms.com
> >
> >
> >
> >
> >
> >
>
>
> --
> - 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 (#7739): https://lists.yoctoproject.org/g/meta-virtualization/message/7739
> Mute This Topic: https://lists.yoctoproject.org/mt/95519084/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: kvmtool patch error
  2022-12-07 17:01   ` Bruce Ashfield
@ 2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
  2022-12-07 17:23       ` [meta-virtualization] " Fabio Estevam
  2022-12-07 17:42       ` Bruce Ashfield
  2022-12-07 18:27     ` Nathan.Fisher@gd-ms.com
  1 sibling, 2 replies; 10+ messages in thread
From: Nathan.Fisher@gd-ms.com @ 2022-12-07 17:15 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 76 bytes --]

I just tried a build using the master-next branch and I got the same error

[-- Attachment #2: Type: text/html, Size: 76 bytes --]

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

* Re: [meta-virtualization] kvmtool patch error
  2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
@ 2022-12-07 17:23       ` Fabio Estevam
  2022-12-07 17:42       ` Bruce Ashfield
  1 sibling, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2022-12-07 17:23 UTC (permalink / raw)
  To: nathan.fisher; +Cc: meta-virtualization

Hi Nathan,

On 07/12/2022 14:15, Nathan.Fisher@gd-ms.com via lists.yoctoproject.org 
wrote:
> I just tried a build using the master-next branch and I got the same
> error

I am on kirstone using aarch64 and kvmtool built without errors for me.



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

* Re: [meta-virtualization] kvmtool patch error
  2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
  2022-12-07 17:23       ` [meta-virtualization] " Fabio Estevam
@ 2022-12-07 17:42       ` Bruce Ashfield
  2022-12-07 18:05         ` Nathan.Fisher@gd-ms.com
  1 sibling, 1 reply; 10+ messages in thread
From: Bruce Ashfield @ 2022-12-07 17:42 UTC (permalink / raw)
  To: nathan.fisher; +Cc: meta-virtualization

Hmmm you must have something different in your environment.

It patches and builds fine from a fully cleaned build here.

At this point, you'll have to send a patch to fix it, as it is somehow
unique to your setup.

Bruce



Bruce

On Wed, Dec 7, 2022 at 12:15 PM Nathan.Fisher@gd-ms.com via
lists.yoctoproject.org
<nathan.fisher=gd-ms.com@lists.yoctoproject.org> wrote:
>
> I just tried a build using the master-next branch and I got the same error
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7741): https://lists.yoctoproject.org/g/meta-virtualization/message/7741
> Mute This Topic: https://lists.yoctoproject.org/mt/95519084/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: kvmtool patch error
  2022-12-07 17:42       ` Bruce Ashfield
@ 2022-12-07 18:05         ` Nathan.Fisher@gd-ms.com
  0 siblings, 0 replies; 10+ messages in thread
From: Nathan.Fisher@gd-ms.com @ 2022-12-07 18:05 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

The problem I think is here

Makefile contents lines 337 to 343:

> 
> # This comment is on line 337
> ifeq ($(call try-build,$(SOURCE_STATIC),$(CFLAGS),$(LDFLAGS) -static),y)
> CFLAGS += -DCONFIG_GUEST_INIT
> GUEST_INIT := guest/init
> GUEST_OBJS = guest/guest_init.o
> ifeq ($(ARCH_PRE_INIT),)
> GUEST_INIT_FLAGS += -static $(PIE_FLAGS)
> 

Hunk 2 of external-crosscompiler.patch

> 
> @@ -343,7 +337,7 @@ $(warning No static libc found. Skipping guest init)
> endif
> 
> ifeq (y,$(ARCH_WANT_LIBFDT))
> - ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
> + ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS) $(CFLAGS),-lfdt),y)
> 
> $(error No libfdt found. Please install libfdt-dev package)
> else
> CFLAGS_DYNOPT += -DCONFIG_HAS_LIBFDT
> 
> 
> 

Would the issue here be that the patch is trying to remove a line that is not present?
Closest I can find to what the patch file alludes to is more around line 370:

> 
> else ifeq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
> LIBFDT_STATIC :=
> CFLAGS_DYNOPT += -DCONFIG_HAS_LIBFDT
> CFLAGS_STATOPT += -DCONFIG_HAS_LIBFDT
> LIBS_DYNOPT += -lfdt
> LIBS_STATOPT += -lfdt
> else
> $(error No libfdt found. Please install libfdt-dev package or set
> LIBFDT_DIR)
> 

Except the patch is looking for an ifneq instead of an ifeq/else ifeq
(Note the ifneq at line 370 is the only place where the string "$(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y" exists in the makefile)

If my build environment may be at fault, my host machine is running ubuntu 20.04 (x86) and I'm building for a device using an AMD embedded processor (AMD64)

[-- Attachment #2: Type: text/html, Size: 3104 bytes --]

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

* Re: kvmtool patch error
  2022-12-07 17:01   ` Bruce Ashfield
  2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
@ 2022-12-07 18:27     ` Nathan.Fisher@gd-ms.com
  2022-12-07 20:28       ` Nathan.Fisher@gd-ms.com
  1 sibling, 1 reply; 10+ messages in thread
From: Nathan.Fisher@gd-ms.com @ 2022-12-07 18:27 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

the patch file that throws the error does not appear to have changed between master and master-next

[-- Attachment #2: Type: text/html, Size: 101 bytes --]

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

* Re: kvmtool patch error
  2022-12-07 18:27     ` Nathan.Fisher@gd-ms.com
@ 2022-12-07 20:28       ` Nathan.Fisher@gd-ms.com
  0 siblings, 0 replies; 10+ messages in thread
From: Nathan.Fisher@gd-ms.com @ 2022-12-07 20:28 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

Just as an experiment I removed the 2nd hunk from the patch file in its entirety. It builds now.

[-- Attachment #2: Type: text/html, Size: 98 bytes --]

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

* Re: [meta-virtualization] kvmtool patch error
  2022-12-07 16:46 kvmtool patch error Nathan.Fisher
  2022-12-07 16:55 ` [meta-virtualization] " Bruce Ashfield
       [not found] ` <172E9131448E8B3C.29158@lists.yoctoproject.org>
@ 2022-12-07 20:46 ` Fabio Estevam
  2 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2022-12-07 20:46 UTC (permalink / raw)
  To: nathan.fisher; +Cc: meta-virtualization

On 07/12/2022 13:46, Nathan.Fisher@gd-ms.com via lists.yoctoproject.org 
wrote:

> ERROR: kvmtool-5.10.0+gitAUTOINC+336751fb10-r0 do_patch: Applying
> patch 'external-crosscompiler.patch' on target directory '[path to
> work
> directory]/core2-64-amd-linux/kvmtool/5.10.0+gitAUTOINC+336751fb10-r0/git'

This looks like an old version of kvmtool.

In kirsktone and master you should see:

kvmtool-5.10.0+gitAUTOINC+faae833a74-r0

And then the patch will apply cleanly.

Regards,

Fabio Estevam


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

end of thread, other threads:[~2022-12-07 20:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 16:46 kvmtool patch error Nathan.Fisher
2022-12-07 16:55 ` [meta-virtualization] " Bruce Ashfield
     [not found] ` <172E9131448E8B3C.29158@lists.yoctoproject.org>
2022-12-07 17:01   ` Bruce Ashfield
2022-12-07 17:15     ` Nathan.Fisher@gd-ms.com
2022-12-07 17:23       ` [meta-virtualization] " Fabio Estevam
2022-12-07 17:42       ` Bruce Ashfield
2022-12-07 18:05         ` Nathan.Fisher@gd-ms.com
2022-12-07 18:27     ` Nathan.Fisher@gd-ms.com
2022-12-07 20:28       ` Nathan.Fisher@gd-ms.com
2022-12-07 20:46 ` [meta-virtualization] " Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.