libvirt-dbus: disable -Werror=inline to fix build error
PATCH 1/1 libvirt-dbus: disable -Werror=inline to fix build error
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.
--- recipes-extended/libvirt/libvirt-dbus_1.4.1.bb | 2 ++ 1 file changed, 2 insertions(+)
recipes-extended/libvirt/libvirt-dbus_1.4.1.bb +2 -0
@@ -16,6 +16,8 @@ SRCREV = "0c355bb8921d7cbccf93f41a8615fcd973e64f70" inherit meson pkgconfig +CFLAGS:append = " -Wno-error=inline" + FILES:${PN} += "\ ${datadir}/dbus-1/* \ ${datadir}/polkit-1/* \
Signature · 1 line
2.53.0
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
Quoted 37 lines · Tanguy Raufflet via lists.yoctoproject.org
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 headerglib-autocleanups.h, as it considers the call unlikely and estimates code size would grow.Because the function
g_autoptr_cleanup_generic_gfreeis 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(+)recipes-extended/libvirt/libvirt-dbus_1.4.1.bb +2
-1@@ -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]]
-=-=-=-=-=-=-=-=-=-=-=-
Hello,
Thanks for the review.
The flag "-Winline" has been removed recently upstream.
I've modified the commit to reference the upstream commit and a note to remove the workaround on the next version bump.
https://lists.yoctoproject.org/g/meta-virtualization/message/9702