Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed with glibc 2.35 #10

Open
KaiChuan-Hsieh opened this issue Apr 13, 2022 · 0 comments
Open

Build failed with glibc 2.35 #10

KaiChuan-Hsieh opened this issue Apr 13, 2022 · 0 comments

Comments

@KaiChuan-Hsieh
Copy link

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;

KaiChuan-Hsieh added a commit to KaiChuan-Hsieh/icamerasrc that referenced this issue Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant