1.18.4: build fails with glib 2.67.6 and gcc-11: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
glib version 2.67.6
[tkloczko@barrel x86_64-redhat-linux-gnu]$ ninja -k 0
[1/6] Compiling C++ object ext/qt/libgstqmlgl.so.p/gstqtglutility.cc.o
FAILED: ext/qt/libgstqmlgl.so.p/gstqtglutility.cc.o
/usr/bin/g++ -Iext/qt/libgstqmlgl.so.p -Iext/qt -I../ext/qt -I. -I.. -I../gst-libs -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/lib64/gstreamer-1.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQmlModels -I/usr/include/qt5/QtX11Extras -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -Wno-unused -O2 -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -DQT_X11EXTRAS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DHAVE_CONFIG_H -DHAVE_QT_QPA_HEADER '-DQT_QPA_HEADER=<5.15.2/QtGui/qpa/qplatformnativeinterface.h>' -DHAVE_QT_X11 -DHAVE_QT_EGLFS -MD -MQ ext/qt/libgstqmlgl.so.p/gstqtglutility.cc.o -MF ext/qt/libgstqmlgl.so.p/gstqtglutility.cc.o.d -o ext/qt/libgstqmlgl.so.p/gstqtglutility.cc.o -c ../ext/qt/gstqtglutility.cc
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from ../ext/qt/gstqtglutility.h:24,
from ../ext/qt/gstqtglutility.cc:25:
../ext/qt/gstqtglutility.cc: In function ‘GstGLDisplay* gst_qt_get_gl_display()’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/gstqtglutility.cc:73:7: note: in expansion of macro ‘g_once_init_enter’
73 | if (g_once_init_enter (&_debug)) {
| ^~~~~~~~~~~~~~~~~
[2/6] Compiling C++ object ext/qt/libgstqmlgl.so.p/gstqsgtexture.cc.o
FAILED: ext/qt/libgstqmlgl.so.p/gstqsgtexture.cc.o
/usr/bin/g++ -Iext/qt/libgstqmlgl.so.p -Iext/qt -I../ext/qt -I. -I.. -I../gst-libs -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/lib64/gstreamer-1.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQmlModels -I/usr/include/qt5/QtX11Extras -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -Wno-unused -O2 -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -DQT_X11EXTRAS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DHAVE_CONFIG_H -DHAVE_QT_QPA_HEADER '-DQT_QPA_HEADER=<5.15.2/QtGui/qpa/qplatformnativeinterface.h>' -DHAVE_QT_X11 -DHAVE_QT_EGLFS -MD -MQ ext/qt/libgstqmlgl.so.p/gstqsgtexture.cc.o -MF ext/qt/libgstqmlgl.so.p/gstqsgtexture.cc.o.d -o ext/qt/libgstqmlgl.so.p/gstqsgtexture.cc.o -c ../ext/qt/gstqsgtexture.cc
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from /usr/include/gstreamer-1.0/gst/video/video.h:23,
from ../ext/qt/gstqsgtexture.cc:28:
../ext/qt/gstqsgtexture.cc: In constructor ‘GstQSGTexture::GstQSGTexture()’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/gstqsgtexture.cc:42:7: note: in expansion of macro ‘g_once_init_enter’
42 | if (g_once_init_enter (&_debug)) {
| ^~~~~~~~~~~~~~~~~
[3/6] Compiling C++ object ext/qt/libgstqmlgl.so.p/qtitem.cc.o
FAILED: ext/qt/libgstqmlgl.so.p/qtitem.cc.o
/usr/bin/g++ -Iext/qt/libgstqmlgl.so.p -Iext/qt -I../ext/qt -I. -I.. -I../gst-libs -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/lib64/gstreamer-1.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQmlModels -I/usr/include/qt5/QtX11Extras -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -Wno-unused -O2 -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -DQT_X11EXTRAS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DHAVE_CONFIG_H -DHAVE_QT_QPA_HEADER '-DQT_QPA_HEADER=<5.15.2/QtGui/qpa/qplatformnativeinterface.h>' -DHAVE_QT_X11 -DHAVE_QT_EGLFS -MD -MQ ext/qt/libgstqmlgl.so.p/qtitem.cc.o -MF ext/qt/libgstqmlgl.so.p/qtitem.cc.o.d -o ext/qt/libgstqmlgl.so.p/qtitem.cc.o -c ../ext/qt/qtitem.cc
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from /usr/include/gstreamer-1.0/gst/video/video.h:23,
from ../ext/qt/qtitem.cc:27:
../ext/qt/qtitem.cc: In constructor ‘QtGLVideoItem::QtGLVideoItem()’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/qtitem.cc:109:7: note: in expansion of macro ‘g_once_init_enter’
109 | if (g_once_init_enter (&_debug)) {
| ^~~~~~~~~~~~~~~~~
[4/6] Compiling C++ object ext/qt/libgstqmlgl.so.p/qtwindow.cc.o
FAILED: ext/qt/libgstqmlgl.so.p/qtwindow.cc.o
/usr/bin/g++ -Iext/qt/libgstqmlgl.so.p -Iext/qt -I../ext/qt -I. -I.. -I../gst-libs -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/lib64/gstreamer-1.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQmlModels -I/usr/include/qt5/QtX11Extras -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -Wno-unused -O2 -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -DQT_X11EXTRAS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DHAVE_CONFIG_H -DHAVE_QT_QPA_HEADER '-DQT_QPA_HEADER=<5.15.2/QtGui/qpa/qplatformnativeinterface.h>' -DHAVE_QT_X11 -DHAVE_QT_EGLFS -MD -MQ ext/qt/libgstqmlgl.so.p/qtwindow.cc.o -MF ext/qt/libgstqmlgl.so.p/qtwindow.cc.o.d -o ext/qt/libgstqmlgl.so.p/qtwindow.cc.o -c ../ext/qt/qtwindow.cc
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from /usr/include/gstreamer-1.0/gst/video/video.h:23,
from ../ext/qt/qtwindow.cc:27:
../ext/qt/qtwindow.cc: In constructor ‘QtGLWindow::QtGLWindow(QWindow*, QQuickWindow*)’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/qtwindow.cc:110:7: note: in expansion of macro ‘g_once_init_enter’
110 | if (g_once_init_enter (&_debug)) {
| ^~~~~~~~~~~~~~~~~
../ext/qt/qtwindow.cc: In member function ‘void QtGLWindow::beforeRendering()’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/qtwindow.cc:156:7: note: in expansion of macro ‘g_once_init_enter’
156 | if (g_once_init_enter(&once)) {
| ^~~~~~~~~~~~~~~~~
[5/6] Compiling C++ object ext/qt/libgstqmlgl.so.p/qtglrenderer.cc.o
FAILED: ext/qt/libgstqmlgl.so.p/qtglrenderer.cc.o
/usr/bin/g++ -Iext/qt/libgstqmlgl.so.p -Iext/qt -I../ext/qt -I. -I.. -I../gst-libs -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/lib64/gstreamer-1.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQmlModels -I/usr/include/qt5/QtX11Extras -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -Wno-unused -O2 -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -DQT_X11EXTRAS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DHAVE_CONFIG_H -DHAVE_QT_QPA_HEADER '-DQT_QPA_HEADER=<5.15.2/QtGui/qpa/qplatformnativeinterface.h>' -DHAVE_QT_X11 -DHAVE_QT_EGLFS -MD -MQ ext/qt/libgstqmlgl.so.p/qtglrenderer.cc.o -MF ext/qt/libgstqmlgl.so.p/qtglrenderer.cc.o.d -o ext/qt/libgstqmlgl.so.p/qtglrenderer.cc.o -c ../ext/qt/qtglrenderer.cc
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from /usr/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:24,
from /usr/include/gstreamer-1.0/gst/gl/gl.h:24,
from ../ext/qt/qtglrenderer.cc:13:
../ext/qt/qtglrenderer.cc: In function ‘void init_debug()’:
/usr/include/glib-2.0/glib/gatomic.h:117:73: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
117 | __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) && \
| ^~~~~~~~~~~~~~~~~~~~
../ext/qt/qtglrenderer.cc:27:7: note: in expansion of macro ‘g_once_init_enter’
27 | if (g_once_init_enter (&_debug)) {
| ^~~~~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors.
Edited by Tim-Philipp Müller