Re: [meta-virtualization][PATCH v2] libvirt-dbus: disable -Werror=inline to fix build error
Bruce Ashfield <[email protected]> Tue, 21 Apr 2026 02:27:22 +0000
| Newsgroups | org.yoctoproject.lists.meta-virtualization |
|---|---|
| Message-ID | <[email protected]> |
I had already merged v1, but since upstream hasn't done an official release in quite some time, I've gone ahead and changed this to a PV+git and moved to the tip of the tree. Which allowed me to drop the CFLAGS:append = " -Wno-error=inline" Bruce In message: [meta-virtualization][PATCH v2] libvirt-dbus: disable -Werror=inline to fix build error on 14/04/2026 Tanguy Raufflet via lists.yoctoproject.org wrote: > 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 <[email protected]> > --- > 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 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#9702): https://lists.yoctoproject.org/g/meta-virtualization/message/9702 > Mute This Topic: https://lists.yoctoproject.org/mt/118819722/1050810 > Group Owner: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=- >