Control: tags -1 + patch On Sat, 23 Oct 2021 at 21:23:19 +0200, Lucas Nussbaum wrote: > During a rebuild of all packages in sid, your package failed to build > on amd64. > > Relevant part (hopefully): > > /<<PKGBUILDDIR>>/elements/gstqtvideosink/gstqtvideosinkbase.cpp: In static > > member function ‘static GType GstQtVideoSinkBase::get_type()’: > > /usr/include/glib-2.0/glib/gatomic.h:113:19: error: argument 2 of > > ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
The attached patch seems to resolve the FTBFS. I have not tested the resulting binaries, but it's a trivial change following the same pattern seen in many other GLib-based libraries. The documentation of g_once_init_enter() now says: While location has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile. volatile behaves like const, so it is valid to pass a pointer of type "T*" to a function like g_once_init_enter() that is declared to take an argument of type "volatile T*". (Conversely, it would not be valid to pass a pointer of type "volatile T*" to a function like g_mutex_lock() that is declared to take an argument of type "T*" - again, this is the same rule as for const.) smcv
From: Simon McVittie <s...@debian.org> Date: Fri, 22 Jul 2022 02:10:35 +0100 Subject: Drop unnecessary volatile qualifier from g_once_init_enter() argument When compiling with gcc, g_once_init_enter() is a macro implemented in terms of gcc's C++11-style atomic operations. Since gcc 11 it is considered to be an error to pass a volatile pointer to these built-in functions. The volatile qualifier appears to have been added as a result of a past misunderstanding about whether volatile is beneficial for thread-safety in C/C++ (it is not). Bug-Debian: https://bugs.debian.org/997252 --- elements/gstqtvideosink/gstqtvideosinkplugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/gstqtvideosink/gstqtvideosinkplugin.h b/elements/gstqtvideosink/gstqtvideosinkplugin.h index dc04671..a72c572 100644 --- a/elements/gstqtvideosink/gstqtvideosinkplugin.h +++ b/elements/gstqtvideosink/gstqtvideosinkplugin.h @@ -27,7 +27,7 @@ GST_DEBUG_CATEGORY_EXTERN(gst_qt_video_sink_debug); #define DEFINE_TYPE_FULL(cpp_type, type_name, parent_type, additional_initializations) \ GType cpp_type::get_type() \ { \ - static volatile gsize gonce_data = 0; \ + static gsize gonce_data = 0; \ if (g_once_init_enter(&gonce_data)) { \ GType type = 0; \ GTypeInfo info; \