Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-113367

headersclean check fails with gcc 12

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.5.1, 6.6.0
    • 6.5.0
    • Core: Other
    • None
    • Linux/X11
    • c25e8851e3e24cce168f731261f4fa2b3298f441 (dev), c47454d693a0bdfdc6be136d65afdcab92e1f2fc (6.5)

    Description

      Building a qtmodule against Qt 6.5 from the installer currently doesn't work because the headersclean check fails.

      This happens only with gcc 12 (tested on Debian unstable)

      The following error is shown:

      [143/328] headersclean: Checking header src/multimedia/audio/qaudiosource.h
      FAILED: src/multimedia/header_check/qaudiosource.h.o /home/gagi/work/tests/build-qtmultimedia/src/multimedia/header_check/qaudiosource.h.o 
      cd /home/gagi/work/tests/build-qtmultimedia/src/multimedia && /usr/bin/cmake -E make_directory /home/gagi/work/tests/build-qtmultimedia/src/multimedia/header_check && /usr/bin/cmake -DINPUT_HEADER_FILE=/home/gagi/work/tests/qtmultimedia/src/multimedia/audio/qaudiosource.h -DOUTPUT_ARTIFACT=/home/gagi/work/tests/build-qtmultimedia/src/multimedia/header_check/qaudiosource.h.o -DPARAMETERS=/home/gagi/work/tests/build-qtmultimedia/src/multimedia/MultimediaHeadersCheckParameters.cmake -P /home/gagi/Qt/6.5.0/gcc_64/lib/cmake/Qt6/QtModuleHeadersCheck.cmake
      CMake Error at /home/gagi/Qt/6.5.0/gcc_64/lib/cmake/Qt6/QtModuleHeadersCheck.cmake:30 (message):
        /home/gagi/work/tests/qtmultimedia/src/multimedia/audio/qaudiosource.h
        header check failed:
        /usr/bin/c++;-c;-DQT_NO_AS_CONST=1;-DQT_NO_CAST_TO_ASCII;-DQT_ASCII_CAST_WARNINGS;-DQT_MOC_COMPAT;-DQT_USE_QSTRINGBUILDER;-DQT_DEPRECATED_WARNINGS;-DQT_BUILDING_QT;-DQT_BUILD_MULTIMEDIA_LIB;-DQT_DISABLE_DEPRECATED_UP_TO=0x050000;-DQT_WARN_DEPRECATED_UP_TO=0x070000;-DQT_NO_EXCEPTIONS;-DQT_CORE_LIB;-DQT_NO_DEBUG;-DQT_GUI_LIB;-DQT_NETWORK_LIB;-DQT_NO_JAVA_STYLE_ITERATORS;-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT;-DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH;-D_LARGEFILE64_SOURCE;-D_LARGEFILE_SOURCE;-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT;-DQT_NO_DEBUG;-Wall;-Wextra;-Werror;-Woverloaded-virtual;-Wshadow;-Wundef;-Wfloat-equal;-Wnon-virtual-dtor;-Wpointer-arith;-Wformat-security;-Wno-long-long;-Wno-variadic-macros;-pedantic-errors;-fPIC;-Wchar-subscripts;-Wold-style-cast;-Wcast-align;-Wzero-as-null-pointer-constant;-Wdouble-promotion;-Wfloat-conversion;-std=c++2a;-I/home/gagi/work/tests/build-qtmultimedia/src/multimedia/Multimedia_autogen/include;-I/home/gagi/work/tests/build-qtmultimedia/include;-I/home/gagi/work/tests/build-qtmultimedia/include/QtMultimedia;-I/home/gagi/work/tests/qtmultimedia/src/multimedia;-I/home/gagi/work/tests/build-qtmultimedia/src/multimedia;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/audio;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/camera;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/controls;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/platform;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/playback;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/recording;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/video;-I/home/gagi/work/tests/build-qtmultimedia/include/QtMultimedia/6.5.0;-I/home/gagi/work/tests/build-qtmultimedia/include/QtMultimedia/6.5.0/QtMultimedia;-I/home/gagi/work/tests/qtmultimedia/src/multimedia/pulseaudio;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtCore;-I/home/gagi/Qt/6.5.0/gcc_64/include;-I/home/gagi/Qt/6.5.0/gcc_64/mkspecs/linux-g++;-I/home/gagi/Qt/6.5.0/gcc_64/include;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtGui;-I/home/gagi/Qt/6.5.0/gcc_64/include;-I/usr/include;-I/usr/include;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtNetwork;-I/home/gagi/Qt/6.5.0/gcc_64/include;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtCore/6.5.0;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtCore/6.5.0/QtCore;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtGui/6.5.0;-I/home/gagi/Qt/6.5.0/gcc_64/include/QtGui/6.5.0/QtGui;-I/usr/include;-I/usr/include;-DQT_NO_CAST_TO_ASCII;-DQT_NO_CAST_FROM_ASCII;-DQT_NO_URL_CAST_FROM_STRING;-DQT_NO_CAST_FROM_BYTEARRAY;-DQT_NO_KEYWORDS;-DQT_TYPESAFE_FLAGS;-DQT_USE_QSTRINGBUILDER;-DQT_USE_FAST_OPERATOR_PLUS;-xc++;/home/gagi/work/tests/qtmultimedia/src/multimedia/audio/qaudiosource.h;-o;/home/gagi/work/tests/build-qtmultimedia/src/multimedia/header_check/qaudiosource.h.o
      
      
         In file included from /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qmetatype.h:14,
                         from /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qobject.h:18,
                         from /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qiodevice.h:10,
                         from /home/gagi/work/tests/qtmultimedia/src/multimedia/audio/qaudiosource.h:8:
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h: In constructor
        ‘constexpr qfloat16::qfloat16(NativeType)’:
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:81:42: error:
        declaration of ‘f’ shadows a member of ‘qfloat16’ [-Werror=shadow]
      
           81 |     constexpr inline qfloat16(NativeType f) : f(f) {}
              |                               ~~~~~~~~~~~^
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:121:20: note: shadowed
        declaration is here
      
          121 |         NativeType f;
              |                    ^
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h: In constructor
        ‘constexpr qfloat16::qfloat16(NativeType)’:
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:81:42: error:
        declaration of ‘f’ shadows a member of ‘qfloat16’ [-Werror=shadow]
      
           81 |     constexpr inline qfloat16(NativeType f) : f(f) {}
              |                               ~~~~~~~~~~~^
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:121:20: note: shadowed
        declaration is here
      
          121 |         NativeType f;
              |                    ^
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h: In constructor
        ‘constexpr qfloat16::qfloat16(NativeType)’:
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:81:42: error:
        declaration of ‘f’ shadows a member of ‘qfloat16’ [-Werror=shadow]
      
           81 |     constexpr inline qfloat16(NativeType f) : f(f) {}
              |                               ~~~~~~~~~~~^
      
        /home/gagi/Qt/6.5.0/gcc_64/include/QtCore/qfloat16.h:121:20: note: shadowed
        declaration is here
      
          121 |         NativeType f;
              |                    ^
      
        cc1plus: all warnings being treated as errors
      
      
      
      ninja: build stopped: subcommand failed.
      

      I verified the problem with two modules (qtinterfaceframework and qtmultimedia), both with the same error.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            gagi Dominik Holland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes