Build failed:
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/allocators/gstdmabuf.h:24,
from gstcamerasrcbufferpool.cpp:56:
gstcamerasrcbufferpool.cpp: In function ‘GType gst_camerasrc_meta_api_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
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) && \
| ^~~~~~~~
gstcamerasrcbufferpool.cpp:85:7: note: in expansion of macro ‘g_once_init_enter’
85 | if (g_once_init_enter (&type)) {
| ^~~~~
make[4]: *** [Makefile:642: libgsticamerasrc_la-gstcamerasrcbufferpool.lo] Error 1
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 gstcambasesrc.h:47,
from gstcambasesrc.cpp:48:
gstcambasesrc.cpp: In function ‘GType gst_cam_base_src_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
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) && \
| ^~~~~~~~
gstcambasesrc.cpp:251:7: note: in expansion of macro ‘g_once_init_enter’
251 | if (g_once_init_enter(&cam_base_src_type)) {
| ^~~~~
I apply the patch to workaround it.
--- a/src/gstcamerasrcbufferpool.cpp
+++ b/src/gstcamerasrcbufferpool.cpp
@@ -79,7 +79,7 @@
gst_camerasrc_meta_api_get_type (void)
{
PERF_CAMERA_ATRACE();
Build failed: 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/allocators/gstdmabuf.h:24, from gstcamerasrcbufferpool.cpp:56: gstcamerasrcbufferpool.cpp: In function ‘GType gst_camerasrc_meta_api_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 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) && \ | ^~~~~~~~ gstcamerasrcbufferpool.cpp:85:7: note: in expansion of macro ‘g_once_init_enter’ 85 | if (g_once_init_enter (&type)) { | ^~~~~ make[4]: *** [Makefile:642: libgsticamerasrc_la-gstcamerasrcbufferpool.lo] Error 1In 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 gstcambasesrc.h:47, from gstcambasesrc.cpp:48: gstcambasesrc.cpp: In function ‘GType gst_cam_base_src_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 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) && \ | ^~~~~~~~ gstcambasesrc.cpp:251:7: note: in expansion of macro ‘g_once_init_enter’ 251 | if (g_once_init_enter(&cam_base_src_type)) { | ^~~~~I apply the patch to workaround it. --- a/src/gstcamerasrcbufferpool.cpp +++ b/src/gstcamerasrcbufferpool.cpp @@ -79,7 +79,7 @@ gst_camerasrc_meta_api_get_type (void) { PERF_CAMERA_ATRACE();
static GType type; static const gchar *tags[] = { "memory", NULL };
if (g_once_init_enter (&type)) { --- a/src/gstcambasesrc.cpp +++ b/src/gstcambasesrc.cpp @@ -246,7 +246,7 @@ GType gst_cam_base_src_get_type (void) {
static gsize cam_base_src_type = 0;
if (g_once_init_enter(&cam_base_src_type)) { GType _type;