| Message ID | 20260107193607.2168539-2-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
On Wed, Jan 07, 2026 at 08:36:03PM +0100, Barnabás Pőcze wrote: > Older versions of glib may use `volatile` qualified variables, triggering > the warning in C++20. So suppress it. > > Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > src/gstreamer/meson.build | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build > index fd83e073d..602f978e8 100644 > --- a/src/gstreamer/meson.build > +++ b/src/gstreamer/meson.build > @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') > libcamera_gst_cpp_args += ['-Wno-unused-function'] > endif > > +# In C++20 many operations involving the `volatile` qualifier became deprecated. > +# glib however made use of `volatile` in certain macros that would trigger > +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. > +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') glib 2.67.1 is old. We still support due to CI on Debian Bullseye, which is the current Debian LTS release, supported until end of August this year. Will we then be able to drop this, or are there other users of glib <2.67.1 ? Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + libcamera_gst_cpp_args += ['-Wno-volatile'] > +endif > + > libcamera_gst = shared_library('gstlibcamera', > libcamera_gst_sources, > cpp_args : libcamera_gst_cpp_args,
2026. 01. 07. 21:25 keltezéssel, Laurent Pinchart írta: > On Wed, Jan 07, 2026 at 08:36:03PM +0100, Barnabás Pőcze wrote: >> Older versions of glib may use `volatile` qualified variables, triggering >> the warning in C++20. So suppress it. >> >> Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> --- >> src/gstreamer/meson.build | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build >> index fd83e073d..602f978e8 100644 >> --- a/src/gstreamer/meson.build >> +++ b/src/gstreamer/meson.build >> @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') >> libcamera_gst_cpp_args += ['-Wno-unused-function'] >> endif >> >> +# In C++20 many operations involving the `volatile` qualifier became deprecated. >> +# glib however made use of `volatile` in certain macros that would trigger >> +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. >> +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') > > glib 2.67.1 is old. We still support due to CI on Debian Bullseye, which > is the current Debian LTS release, supported until end of August this > year. Will we then be able to drop this, or are there other users of > glib <2.67.1 ? How do you mean? Currently libcamera states that it can work with any version of `glib-2.0`. So I imagine after debian bullseye ceases to be supported, the version requirement, if needed, can be increased, and these workarounds removed. > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > >> + libcamera_gst_cpp_args += ['-Wno-volatile'] >> +endif >> + >> libcamera_gst = shared_library('gstlibcamera', >> libcamera_gst_sources, >> cpp_args : libcamera_gst_cpp_args, >
On Thu, Jan 08, 2026 at 09:47:01AM +0100, Barnabás Pőcze wrote: > 2026. 01. 07. 21:25 keltezéssel, Laurent Pinchart írta: > > On Wed, Jan 07, 2026 at 08:36:03PM +0100, Barnabás Pőcze wrote: > >> Older versions of glib may use `volatile` qualified variables, triggering > >> the warning in C++20. So suppress it. > >> > >> Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 > >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > >> --- > >> src/gstreamer/meson.build | 7 +++++++ > >> 1 file changed, 7 insertions(+) > >> > >> diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build > >> index fd83e073d..602f978e8 100644 > >> --- a/src/gstreamer/meson.build > >> +++ b/src/gstreamer/meson.build > >> @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') > >> libcamera_gst_cpp_args += ['-Wno-unused-function'] > >> endif > >> > >> +# In C++20 many operations involving the `volatile` qualifier became deprecated. > >> +# glib however made use of `volatile` in certain macros that would trigger > >> +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. > >> +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') > > > > glib 2.67.1 is old. We still support due to CI on Debian Bullseye, which > > is the current Debian LTS release, supported until end of August this > > year. Will we then be able to drop this, or are there other users of > > glib <2.67.1 ? > > How do you mean? Currently libcamera states that it can work with any version > of `glib-2.0`. So I imagine after debian bullseye ceases to be supported, the > version requirement, if needed, can be increased, and these workarounds removed. I meant to ask if there's any other reason than Debian Bullseye to keep supporting glib2 <2.67.1. > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > >> + libcamera_gst_cpp_args += ['-Wno-volatile'] > >> +endif > >> + > >> libcamera_gst = shared_library('gstlibcamera', > >> libcamera_gst_sources, > >> cpp_args : libcamera_gst_cpp_args,
2026. 01. 08. 10:15 keltezéssel, Laurent Pinchart írta: > On Thu, Jan 08, 2026 at 09:47:01AM +0100, Barnabás Pőcze wrote: >> 2026. 01. 07. 21:25 keltezéssel, Laurent Pinchart írta: >>> On Wed, Jan 07, 2026 at 08:36:03PM +0100, Barnabás Pőcze wrote: >>>> Older versions of glib may use `volatile` qualified variables, triggering >>>> the warning in C++20. So suppress it. >>>> >>>> Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 >>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >>>> --- >>>> src/gstreamer/meson.build | 7 +++++++ >>>> 1 file changed, 7 insertions(+) >>>> >>>> diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build >>>> index fd83e073d..602f978e8 100644 >>>> --- a/src/gstreamer/meson.build >>>> +++ b/src/gstreamer/meson.build >>>> @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') >>>> libcamera_gst_cpp_args += ['-Wno-unused-function'] >>>> endif >>>> >>>> +# In C++20 many operations involving the `volatile` qualifier became deprecated. >>>> +# glib however made use of `volatile` in certain macros that would trigger >>>> +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. >>>> +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') >>> >>> glib 2.67.1 is old. We still support due to CI on Debian Bullseye, which >>> is the current Debian LTS release, supported until end of August this >>> year. Will we then be able to drop this, or are there other users of >>> glib <2.67.1 ? >> >> How do you mean? Currently libcamera states that it can work with any version >> of `glib-2.0`. So I imagine after debian bullseye ceases to be supported, the >> version requirement, if needed, can be increased, and these workarounds removed. > > I meant to ask if there's any other reason than Debian Bullseye to keep > supporting glib2 <2.67.1. Based on https://repology.org/project/glib/versions there is ubuntu 20.04, which has 2.64.6, but not sure how relevant that is since there is only ESM for that version. So I cannot see anything that needs it. > >>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> >>> >>>> + libcamera_gst_cpp_args += ['-Wno-volatile'] >>>> +endif >>>> + >>>> libcamera_gst = shared_library('gstlibcamera', >>>> libcamera_gst_sources, >>>> cpp_args : libcamera_gst_cpp_args, >
diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build index fd83e073d..602f978e8 100644 --- a/src/gstreamer/meson.build +++ b/src/gstreamer/meson.build @@ -50,6 +50,13 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') libcamera_gst_cpp_args += ['-Wno-unused-function'] endif +# In C++20 many operations involving the `volatile` qualifier became deprecated. +# glib however made use of `volatile` in certain macros that would trigger +# this warning. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. +if cc.get_id() == 'gcc' and glib_dep.version().version_compare('<2.67.1') + libcamera_gst_cpp_args += ['-Wno-volatile'] +endif + libcamera_gst = shared_library('gstlibcamera', libcamera_gst_sources, cpp_args : libcamera_gst_cpp_args,
Older versions of glib may use `volatile` qualified variables, triggering the warning in C++20. So suppress it. Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/gstreamer/meson.build | 7 +++++++ 1 file changed, 7 insertions(+)