All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH v2] libvirt-dbus: disable -Werror=inline to fix build error
@ 2026-04-14  9:00 Tanguy Raufflet
  2026-04-21  2:27 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Tanguy Raufflet @ 2026-04-14  9:00 UTC (permalink / raw)
  To: meta-virtualization; +Cc: paul.leguendekerneizon, Tanguy Raufflet

The meson.build from libvirt-dbus enables the flag -Winline. Combined
with -Werror from Yocto, this causes a build failure because GCC refuses
to inline g_autoptr_cleanup_generic_gfree() from the glib header
glib-autocleanups.h, as it considers the call unlikely and estimates
code size would grow.

Because the function g_autoptr_cleanup_generic_gfree is defined as
static inline with good reason, this patch disables -Werror=inline for
libvirt-dbus to allow the build to succeed.

Note: This patch is a workaround for a build issue in libvirt-dbus. The
underlying issue has been fixed [1] upstream in the libvirt-dbus project.
Once the next version of libvirt-dbus is released that includes the fix,
this patch should be removed.

[1]: build: Do not use -Winline
    SHA: c0fffce8c45e79b73bcb63fac70e24a827367dce
    Repo: https://gitlab.com/libvirt/libvirt-dbus

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
---
Changes in v2:
- Added comment referencing upstream fix and note to remove on next
version bump
- Link to v1:
https://lists.yoctoproject.org/g/meta-virtualization/message/9695
---
 recipes-extended/libvirt/libvirt-dbus_1.4.1.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb b/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb
index 767470e2..17db13a9 100644
--- a/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb
+++ b/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb
@@ -16,6 +16,10 @@ SRCREV = "0c355bb8921d7cbccf93f41a8615fcd973e64f70"
 
 inherit meson pkgconfig
 
+# Fixed upstream but not yet released. Remove on next version bump.
+# https://gitlab.com/libvirt/libvirt-dbus/-/commit/c0fffce8c45e79b73bcb63fac70e24a827367dce
+CFLAGS:append = " -Wno-error=inline"
+
 FILES:${PN} += "\
     ${datadir}/dbus-1/* \
     ${datadir}/polkit-1/* \
-- 
2.53.0



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

end of thread, other threads:[~2026-04-21  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14  9:00 [meta-virtualization][PATCH v2] libvirt-dbus: disable -Werror=inline to fix build error Tanguy Raufflet
2026-04-21  2:27 ` Bruce Ashfield

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.