Re: [meta-virtualization][PATCH] libvirt-dbus: disable -Werror=inline to fix build error

ChenQi <[email protected]> Tue, 14 Apr 2026 10:17:03 +0800
Newsgroups org.yoctoproject.lists.meta-virtualization
Message-ID <[email protected]>
Can you check with upstream first? After all, they'll be facing the same 
issue with us.

The reason is that if we use this solution like this directly, chances 
are that nobody will ever revisit this issue any more...

Regards,
Qi

On 4/13/26 19:52, 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.
>
> Signed-off-by: Tanguy Raufflet <[email protected]>
> ---
>   recipes-extended/libvirt/libvirt-dbus_1.4.1.bb | 2 ++
>   1 file changed, 2 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..e4859b0b 100644
> --- a/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb
> +++ b/recipes-extended/libvirt/libvirt-dbus_1.4.1.bb
> @@ -16,6 +16,8 @@ SRCREV = "0c355bb8921d7cbccf93f41a8615fcd973e64f70"
>   
>   inherit meson pkgconfig
>   
> +CFLAGS:append = " -Wno-error=inline"
> +
>   FILES:${PN} += "\
>       ${datadir}/dbus-1/* \
>       ${datadir}/polkit-1/* \
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9695): https://lists.yoctoproject.org/g/meta-virtualization/message/9695
> Mute This Topic: https://lists.yoctoproject.org/mt/118803008/3618072
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>