Bug#997238: lordsawar: FTBFS: gatomic.h:113:19: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type

Simon McVittie smcv at debian.org
Sat Oct 23 21:53:34 BST 2021


Control: reassign -1 libgstreamermm-1.0-dev 1.10.0+dfsg-3
Control: forwarded -1 https://gitlab.gnome.org/GNOME/gstreamermm/-/issues/11
Control: tags -1 + patch
Control: affects -1 + lordsawar

On Sat, 23 Oct 2021 at 21:18:06 +0200, Lucas Nussbaum wrote:
> Source: lordsawar
...
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
...
> > /usr/include/gstreamermm-1.0/gstreamermm/register.h: In function ‘GType Gst::register_mm_type(const gchar*)’:
> > /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
> >   113 |     __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
> >       |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
> >   260 |     (!g_atomic_pointer_get (location) &&                             \
> >       |       ^~~~~~~~~~~~~~~~~~~~
> > /usr/include/gstreamermm-1.0/gstreamermm/register.h:114:9: note: in expansion of macro ‘g_once_init_enter’
> >   114 |     if (g_once_init_enter (&gonce_data)) {

This looks like a gstreamermm-1.0 bug triggered by the switch to gcc 11,
which is increasingly strict about not using 'volatile' in places where
it isn't useful, or by the switch to GLib 2.68, which avoids using
'volatile' in inappropriate places.

This would maybe also make the gstreamermm-1.0 tests fail to build,
but they're disabled in Debian.

The tl;dr version is that passing a 'volatile gsize *' to g_once_init_enter()
is no longer allowed: it must be an ordinary non-volatile 'gsize *'.

I suspect that applying the change from
https://gitlab.gnome.org/GNOME/gstreamermm/-/merge_requests/4 in
gstreamermm-1.0 would allow lordsawar to be built successfully against it
(test-builds in progress).

    smcv



More information about the Pkg-games-devel mailing list