apps: qcam: Disable -Wsfinae-incomplete
diff mbox series

Message ID 20260128124011.104617-1-kieran.bingham@ideasonboard.com
State Accepted
Commit aa2a0812e6692a29a161b6790a520ba8076347f8
Headers show
Series
  • apps: qcam: Disable -Wsfinae-incomplete
Related show

Commit Message

Kieran Bingham Jan. 28, 2026, 12:40 p.m. UTC
GCC-16 has updated the warnings enabled and now includes
-Wsfinae-incomplete triggering breakage in the included headers from
Qt6:

/usr/include/qt6/QtCore/qregularexpression.h:31:21: error: defining ‘QRegularExpression’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]

This is a Qt header issue outside of libcamera’s control. Disable the
warning for qcam to restore buildability with newer GCC versions.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---

I see there's a conditional section to only disable some warnings for
specific versions, but I have no indication here as to when or if this
warning will be fixed - so I've chosen to just put it directly into the
main flags to disable the warning.

It's out side of our control, and doesn't impact what we can do.

 src/apps/qcam/meson.build | 1 +
 1 file changed, 1 insertion(+)

Comments

Barnabás Pőcze Jan. 28, 2026, 12:53 p.m. UTC | #1
2026. 01. 28. 13:40 keltezéssel, Kieran Bingham írta:
> GCC-16 has updated the warnings enabled and now includes
> -Wsfinae-incomplete triggering breakage in the included headers from
> Qt6:
> 
> /usr/include/qt6/QtCore/qregularexpression.h:31:21: error: defining ‘QRegularExpression’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]
> 
> This is a Qt header issue outside of libcamera’s control. Disable the
> warning for qcam to restore buildability with newer GCC versions.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
> 
> I see there's a conditional section to only disable some warnings for
> specific versions, but I have no indication here as to when or if this
> warning will be fixed - so I've chosen to just put it directly into the
> main flags to disable the warning.
> 
> It's out side of our control, and doesn't impact what we can do.
> 
>   src/apps/qcam/meson.build | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
> index 33600095ff9d..8eb815eed863 100644
> --- a/src/apps/qcam/meson.build
> +++ b/src/apps/qcam/meson.build
> @@ -40,6 +40,7 @@ qt6_cpp_args = [
>       apps_cpp_args,
>       '-DQT_NO_KEYWORDS',
>       '-Wno-extra-semi',
> +    '-Wno-sfinae-incomplete',
>   ]

Maybe a link to https://qt-project.atlassian.net/browse/QTBUG-143470 or similar could be added.
Otherwise I don't really see a reasonable option other than disabling the warning.
I also checked if gcc fails when disabling unknown warnings, but those appear to be ignored.

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   
>   # gcc 12 and 13 output a false positive variable shadowing warning with Qt
Kieran Bingham Jan. 28, 2026, 1:08 p.m. UTC | #2
Quoting Barnabás Pőcze (2026-01-28 12:53:46)
> 2026. 01. 28. 13:40 keltezéssel, Kieran Bingham írta:
> > GCC-16 has updated the warnings enabled and now includes
> > -Wsfinae-incomplete triggering breakage in the included headers from
> > Qt6:
> > 
> > /usr/include/qt6/QtCore/qregularexpression.h:31:21: error: defining ‘QRegularExpression’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]
> > 
> > This is a Qt header issue outside of libcamera’s control. Disable the
> > warning for qcam to restore buildability with newer GCC versions.
> > 
> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > ---
> > 
> > I see there's a conditional section to only disable some warnings for
> > specific versions, but I have no indication here as to when or if this
> > warning will be fixed - so I've chosen to just put it directly into the
> > main flags to disable the warning.
> > 
> > It's out side of our control, and doesn't impact what we can do.
> > 
> >   src/apps/qcam/meson.build | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
> > index 33600095ff9d..8eb815eed863 100644
> > --- a/src/apps/qcam/meson.build
> > +++ b/src/apps/qcam/meson.build
> > @@ -40,6 +40,7 @@ qt6_cpp_args = [
> >       apps_cpp_args,
> >       '-DQT_NO_KEYWORDS',
> >       '-Wno-extra-semi',
> > +    '-Wno-sfinae-incomplete',
> >   ]
> 
> Maybe a link to https://qt-project.atlassian.net/browse/QTBUG-143470 or similar could be added.
> Otherwise I don't really see a reasonable option other than disabling the warning.
> I also checked if gcc fails when disabling unknown warnings, but those appear to be ignored.

Ohh thanks - your search-fu was better than mine - I missed that.!

This patch doesn't close that bug, so I don't think Closes: is
appropriate so I wonder if this is :

Link: https://qt-project.atlassian.net/browse/QTBUG-143470
or 
Bug: https://qt-project.atlassian.net/browse/QTBUG-143470


> 
> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> 
> 
> >   
> >   # gcc 12 and 13 output a false positive variable shadowing warning with Qt
>
Barnabás Pőcze Jan. 28, 2026, 1:10 p.m. UTC | #3
2026. 01. 28. 14:08 keltezéssel, Kieran Bingham írta:
> Quoting Barnabás Pőcze (2026-01-28 12:53:46)
>> 2026. 01. 28. 13:40 keltezéssel, Kieran Bingham írta:
>>> GCC-16 has updated the warnings enabled and now includes
>>> -Wsfinae-incomplete triggering breakage in the included headers from
>>> Qt6:
>>>
>>> /usr/include/qt6/QtCore/qregularexpression.h:31:21: error: defining ‘QRegularExpression’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]
>>>
>>> This is a Qt header issue outside of libcamera’s control. Disable the
>>> warning for qcam to restore buildability with newer GCC versions.
>>>
>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>> ---
>>>
>>> I see there's a conditional section to only disable some warnings for
>>> specific versions, but I have no indication here as to when or if this
>>> warning will be fixed - so I've chosen to just put it directly into the
>>> main flags to disable the warning.
>>>
>>> It's out side of our control, and doesn't impact what we can do.
>>>
>>>    src/apps/qcam/meson.build | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
>>> index 33600095ff9d..8eb815eed863 100644
>>> --- a/src/apps/qcam/meson.build
>>> +++ b/src/apps/qcam/meson.build
>>> @@ -40,6 +40,7 @@ qt6_cpp_args = [
>>>        apps_cpp_args,
>>>        '-DQT_NO_KEYWORDS',
>>>        '-Wno-extra-semi',
>>> +    '-Wno-sfinae-incomplete',
>>>    ]
>>
>> Maybe a link to https://qt-project.atlassian.net/browse/QTBUG-143470 or similar could be added.
>> Otherwise I don't really see a reasonable option other than disabling the warning.
>> I also checked if gcc fails when disabling unknown warnings, but those appear to be ignored.
> 
> Ohh thanks - your search-fu was better than mine - I missed that.!
> 
> This patch doesn't close that bug, so I don't think Closes: is
> appropriate so I wonder if this is :
> 
> Link: https://qt-project.atlassian.net/browse/QTBUG-143470
> or
> Bug: https://qt-project.atlassian.net/browse/QTBUG-143470

"Bug" is no longer accepted by checkstyle.py as far as I know, so that leaves "Link".


> 
> 
>>
>> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>>
>>
>>>    
>>>    # gcc 12 and 13 output a false positive variable shadowing warning with Qt
>>
Laurent Pinchart Jan. 28, 2026, 1:15 p.m. UTC | #4
On Wed, Jan 28, 2026 at 01:08:13PM +0000, Kieran Bingham wrote:
> Quoting Barnabás Pőcze (2026-01-28 12:53:46)
> > 2026. 01. 28. 13:40 keltezéssel, Kieran Bingham írta:
> > > GCC-16 has updated the warnings enabled and now includes
> > > -Wsfinae-incomplete triggering breakage in the included headers from
> > > Qt6:
> > > 
> > > /usr/include/qt6/QtCore/qregularexpression.h:31:21: error: defining ‘QRegularExpression’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]
> > > 
> > > This is a Qt header issue outside of libcamera’s control. Disable the
> > > warning for qcam to restore buildability with newer GCC versions.
> > > 
> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > ---
> > > 
> > > I see there's a conditional section to only disable some warnings for
> > > specific versions, but I have no indication here as to when or if this
> > > warning will be fixed - so I've chosen to just put it directly into the
> > > main flags to disable the warning.
> > > 
> > > It's out side of our control, and doesn't impact what we can do.
> > > 
> > >   src/apps/qcam/meson.build | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
> > > index 33600095ff9d..8eb815eed863 100644
> > > --- a/src/apps/qcam/meson.build
> > > +++ b/src/apps/qcam/meson.build
> > > @@ -40,6 +40,7 @@ qt6_cpp_args = [
> > >       apps_cpp_args,
> > >       '-DQT_NO_KEYWORDS',
> > >       '-Wno-extra-semi',
> > > +    '-Wno-sfinae-incomplete',
> > >   ]
> > 
> > Maybe a link to https://qt-project.atlassian.net/browse/QTBUG-143470 or similar could be added.
> > Otherwise I don't really see a reasonable option other than disabling the warning.
> > I also checked if gcc fails when disabling unknown warnings, but those appear to be ignored.
> 
> Ohh thanks - your search-fu was better than mine - I missed that.!
> 
> This patch doesn't close that bug, so I don't think Closes: is
> appropriate so I wonder if this is :
> 
> Link: https://qt-project.atlassian.net/browse/QTBUG-143470
> or 
> Bug: https://qt-project.atlassian.net/browse/QTBUG-143470

Bug is mostly synonymous for Closes:. I'd use Link:.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > 
> > >   # gcc 12 and 13 output a false positive variable shadowing warning with Qt

Patch
diff mbox series

diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
index 33600095ff9d..8eb815eed863 100644
--- a/src/apps/qcam/meson.build
+++ b/src/apps/qcam/meson.build
@@ -40,6 +40,7 @@  qt6_cpp_args = [
     apps_cpp_args,
     '-DQT_NO_KEYWORDS',
     '-Wno-extra-semi',
+    '-Wno-sfinae-incomplete',
 ]
 
 # gcc 12 and 13 output a false positive variable shadowing warning with Qt