intel / intel/icamerasrc

Build failed with glibc 2.35

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
27
Forks
40
PR merge metrics
No merged PRs in 30d

Description

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();
- static volatile GType type;
+ 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 volatile gsize cam_base_src_type = 0;
+ static gsize cam_base_src_type = 0;

if (g_once_init_enter(&cam_base_src_type)) {
GType _type;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.