meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD = 1
@ 2025-05-14  7:59 Hongxu Jia
  2025-05-16 12:20 ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Hongxu Jia @ 2025-05-14  7:59 UTC (permalink / raw)
  To: meta-virtualization

Build libvirt failed while DEBUG_BUILD = 1
[snip]
../git/src/cpu/cpu_x86.c: In function 'cpuidSetLeaf4':
../git/src/cpu/cpu_x86.c:2563:1: error: inlining failed in call to 'cpuidCall': function not considered for inlining [-Werror=inline]
 2563 | cpuidCall(virCPUx86CPUID *cpuid)
      | ^~~~~~~~~
[snip]

Explicitly add -Wno-error=inline to CFLAGS if DEBUG_BUILD = 1 to workaround

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-extended/libvirt/libvirt_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-extended/libvirt/libvirt_git.bb b/recipes-extended/libvirt/libvirt_git.bb
index 4c6b3bdd..37a60562 100644
--- a/recipes-extended/libvirt/libvirt_git.bb
+++ b/recipes-extended/libvirt/libvirt_git.bb
@@ -50,6 +50,7 @@ USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM:${PN} = "-r qemu; -r kvm"
 USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu"
 
+CFLAGS += "${@oe.utils.vartrue('DEBUG_BUILD', '-Wno-error=inline', '', d)}"
 
 EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross"
 do_write_config:append() {
-- 
2.34.1



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

* Re: [meta-virtualization][PATCH] libvirt: fix  compile failure while DEBUG_BUILD = 1
  2025-05-14  7:59 [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD = 1 Hongxu Jia
@ 2025-05-16 12:20 ` Fabio Estevam
  2025-05-20  2:57   ` [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1 Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2025-05-16 12:20 UTC (permalink / raw)
  To: hongxu.jia; +Cc: meta-virtualization

Hi Hongxu,

On Wednesday, May 14, 2025 04:59 -03, "hongxu via lists.yoctoproject.org" <hongxu.jia=eng.windriver.com@lists.yoctoproject.org> wrote:

> Build libvirt failed while DEBUG_BUILD = 1
> [snip]
> ../git/src/cpu/cpu_x86.c: In function 'cpuidSetLeaf4':
> ../git/src/cpu/cpu_x86.c:2563:1: error: inlining failed in call to 'cpuidCall': function not considered for inlining [-Werror=inline]
>  2563 | cpuidCall(virCPUx86CPUID *cpuid)
>       | ^~~~~~~~~
> [snip]
> 
> Explicitly add -Wno-error=inline to CFLAGS if DEBUG_BUILD = 1 to workaround

I have sent a fix upstream:

https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/AB7ZAE2BCMG7CXIJHOHD3MNLBCSCOOBK/



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

* Re: [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1
  2025-05-16 12:20 ` Fabio Estevam
@ 2025-05-20  2:57   ` Bruce Ashfield
  2025-05-22 13:25     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2025-05-20  2:57 UTC (permalink / raw)
  To: festevam; +Cc: hongxu.jia, meta-virtualization

In message: Re: [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1
on 16/05/2025 Fabio Estevam via lists.yoctoproject.org wrote:

> Hi Hongxu,
> 
> On Wednesday, May 14, 2025 04:59 -03, "hongxu via lists.yoctoproject.org" <hongxu.jia=eng.windriver.com@lists.yoctoproject.org> wrote:
> 
> > Build libvirt failed while DEBUG_BUILD = 1
> > [snip]
> > ../git/src/cpu/cpu_x86.c: In function 'cpuidSetLeaf4':
> > ../git/src/cpu/cpu_x86.c:2563:1: error: inlining failed in call to 'cpuidCall': function not considered for inlining [-Werror=inline]
> >  2563 | cpuidCall(virCPUx86CPUID *cpuid)
> >       | ^~~~~~~~~
> > [snip]
> > 
> > Explicitly add -Wno-error=inline to CFLAGS if DEBUG_BUILD = 1 to workaround
> 
> I have sent a fix upstream:
> 
> https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/AB7ZAE2BCMG7CXIJHOHD3MNLBCSCOOBK/
> 

I don't see any replies to the patch, but I'll be updating libvirt in the next
couple of weeks, so I'll check to see if anything merged then.

In the meantime, I've merged the original patch.

Bruce

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9249): https://lists.yoctoproject.org/g/meta-virtualization/message/9249
> Mute This Topic: https://lists.yoctoproject.org/mt/113143907/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



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

* Re: [meta-virtualization][PATCH] libvirt: fix  compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1
  2025-05-20  2:57   ` [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1 Bruce Ashfield
@ 2025-05-22 13:25     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2025-05-22 13:25 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: hongxu.jia, meta-virtualization

Hi Bruce,

On Monday, May 19, 2025 23:57 -03, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
 
> I don't see any replies to the patch, but I'll be updating libvirt in the next
> couple of weeks, so I'll check to see if anything merged then.
> 
> In the meantime, I've merged the original patch.

The patch I sent has been applied to libvirt master:

https://gitlab.com/libvirt/libvirt/-/commit/bf79a021a6437b4f85469a53f650bff62db5f674



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

end of thread, other threads:[~2025-05-22 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14  7:59 [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD = 1 Hongxu Jia
2025-05-16 12:20 ` Fabio Estevam
2025-05-20  2:57   ` [meta-virtualization][PATCH] libvirt: fix compile failure while DEBUG_BUILD ?utf-8?q?_=3D?= 1 Bruce Ashfield
2025-05-22 13:25     ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).