Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 6.10 failing compilation on "qsocketnotifier"

Qt 6.10 failing compilation on "qsocketnotifier"

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 273 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MaximeCD
    wrote on last edited by
    #1

    Hello,

    Following security issues, we tried updating to latest qt available 6.10, building it from sources from the download.qt.io website.
    For some reasons though, it fails quite early during the "qsocketnotifier" file compilation, the main error being:
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(262): error C2065: 'result': undeclared identifier

    Here are the error messages for more details:

    FAILED: [code=2] qtbase/src/corelib/CMakeFiles/Core.dir/kernel/qsocketnotifier.cpp.obj 
    C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x64\cl.exe  /nologo /TP -DCore_EXPORTS -DNOMINMAX -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_QSNPRINTF -DQT_NO_STD_FORMAT_SUPPORT -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -DQT_ZLIB_LIB -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -IC:\Qt_build\qtbase\src\corelib\Core_autogen\include -IC:\Qt_build\qtbase\include -IC:\Qt_build\qtbase\include\QtCore -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib -IC:\Qt_build\qtbase\src\corelib -IC:\Qt_build\qtbase\src\corelib\global -IC:\Qt_build\qtbase\src\corelib\kernel -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\..\3rdparty\tinycbor\src -IC:\Qt_build\qtbase\include\QtCore\6.10.0 -IC:\Qt_build\qtbase\include\QtCore\6.10.0\QtCore -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\..\3rdparty\double-conversion\double-conversion -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\..\3rdparty\double-conversion -IC:\Qt_build\qtbase\src\corelib\.rcc -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\mkspecs\win32-msvc -IC:\Qt_build\qtbase\include\QtZlib -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\3rdparty\zlib -IC:\Qt_build\qtbase\src\3rdparty\zlib -IC:\Qt\qt-everywhere-src-6.10.0\qtbase\src\3rdparty\pcre2\src /DWIN32 /D_WINDOWS /Zi     /DNDEBUG -O2 -Ob3 -std:c++17 -MD /W3 /wd5105 -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:ternary -Zc:externConstexpr -Zc:wchar_t -bigobj -guard:cf -Gw /EHsc /d2FH4 /showIncludes /Foqtbase\src\corelib\CMakeFiles\Core.dir\kernel\qsocketnotifier.cpp.obj /Fdqtbase\src\corelib\CMakeFiles\Core.dir\ /FS -c C:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\kernel\qsocketnotifier.cpp
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(408): warning C4305: 'if': truncation from 'size_t' to 'bool'
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(408): note: while compiling class template member function 'QtMocHelpers::FunctionData<F,4>::FunctionData(uint,uint,uint,uint,std::array<QtMocHelpers::FunctionData<F,4>::FunctionParameter,2>)'
    C:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\kernel\qsocketnotifier.h(15): note: while evaluating constexpr function 'QSocketNotifier::qt_create_metaobjectdata'
    C:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\kernel\qsocketnotifier.h(15): note: see reference to variable template 'const QtMocHelpers::MetaObjectContents<53,16,101,10> QSocketNotifier::qt_staticMetaObjectContent<`anonymous namespace'::qt_meta_tag_ZN15QSocketNotifierE_t>' being compiled
    C:\Qt_build\qtbase\src\corelib\Core_autogen\include\moc_qsocketnotifier.cpp(78): note: see reference to variable template 'const auto QSocketNotifier::qt_staticMetaObjectStaticContent<`anonymous namespace'::qt_meta_tag_ZN15QSocketNotifierE_t>' being compiled
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(262): error C2065: 'result': undeclared identifier
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(200): note: see reference to function template instantiation 'auto QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo::<lambda_516565b1e1cb9a5944561498aff3bc0f>::operator ()<T>(const T &) const' being compiled
            with
            [
                T=QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>
            ]
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(200): note: see reference to function template instantiation 'auto QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3>,QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::forEach::<lambda_c5853e91abea1dd4427102778104cba3>::operator ()<QtMocHelpers::detail::UintDataEntry<0,QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>>>(const QtMocHelpers::detail::UintDataEntry<0,QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>> &) const' being compiled
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(252): note: see reference to function template instantiation 'void QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3>,QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::forEach<QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo::<lambda_516565b1e1cb9a5944561498aff3bc0f>>(F &&) const' being compiled
            with
            [
                F=QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo::<lambda_516565b1e1cb9a5944561498aff3bc0f>
            ]
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(255): note: see reference to function template instantiation 'void QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3>,QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::forEach<QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo::<lambda_516565b1e1cb9a5944561498aff3bc0f>>(F &&) const' being compiled
            with
            [
                F=QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo::<lambda_516565b1e1cb9a5944561498aff3bc0f>
            ]
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(563): note: see reference to function template instantiation 'void QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo<Unique,QtMocHelpers::MetaObjectContents<53,16,101,10>>(Result &,size_t,uint &) const' being compiled
            with
            [
                Unique=`anonymous-namespace'::qt_meta_tag_ZN15QSocketNotifierE_t,
                Result=QtMocHelpers::MetaObjectContents<53,16,101,10>
            ]
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(563): note: see reference to function template instantiation 'void QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo<Unique,QtMocHelpers::MetaObjectContents<53,16,101,10>>(Result &,size_t,uint &) const' being compiled
            with
            [
                Unique=`anonymous-namespace'::qt_meta_tag_ZN15QSocketNotifierE_t,
                Result=QtMocHelpers::MetaObjectContents<53,16,101,10>
            ]
    C:\Qt_build\qtbase\src\corelib\Core_autogen\include\moc_qsocketnotifier.cpp(74): note: see reference to function template instantiation 'QtMocHelpers::MetaObjectContents<53,16,101,10> QtMocHelpers::metaObjectData<QSocketNotifier,`anonymous-namespace'::qt_meta_tag_ZN15QSocketNotifierE_t,QtMocHelpers::StringRefStorage<char [16],char [10],char [1],char [18],char [7],char [22],char [16],char [11]>,QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>,QtMocHelpers::UintData<>,QtMocHelpers::UintData<>,QtMocHelpers::UintData<>,QtMocHelpers::detail::UintDataBlock<0,0>>(uint,const Strings &,const Methods &,const Properties &,const Enums &,const Constructors &,const ClassInfo &)' being compiled
            with
            [
                Strings=QtMocHelpers::StringRefStorage<char [16],char [10],char [1],char [18],char [7],char [22],char [16],char [11]>,
                Methods=QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>,
                Properties=QtMocHelpers::UintData<>,
                Enums=QtMocHelpers::UintData<>,
                Constructors=QtMocHelpers::UintData<>,
                ClassInfo=QtMocHelpers::detail::UintDataBlock<0,0>
            ]
    C:/Qt/qt-everywhere-src-6.10.0/qtbase/src/corelib/kernel/qtmochelpers.h(563): note: while evaluating constexpr function 'QtMocHelpers::UintData<QtMocHelpers::SignalData<void (QSocketDescriptor,QSocketNotifier::Type)>,QtMocHelpers::SignalData<void (QSocketDescriptor)>,QtMocHelpers::SignalData<void (int)>,QtMocHelpers::SlotData<void (bool)>>::copyTo'
    C:\Qt_build\qtbase\src\corelib\Core_autogen\include\moc_qsocketnotifier.cpp(73): note: while evaluating constexpr function 'QtMocHelpers::metaObjectData'
    C:\Qt\qt-everywhere-src-6.10.0\qtbase\src\corelib\kernel\qsocketnotifier.h(15): note: while evaluating constexpr function 'QSocketNotifier::qt_create_metaobjectdata'
    
    

    I am compiling with Visual Studio 2022, cmake (tested with v4 and 3.31 to see if there was any differences), with these options
    C:\Qt\qt-everywhere-src-6.10.0/qtbase/configure.bat -top-level -prefix C:/deps/Qt -release -force-debug-info -separate-debug-info -shared -skip qtconnectivity -skip qtdeclarative -skip qtlocation -skip qtmultimedia -skip qtquick1 -skip qtquickcontrols -skip qtsensors -skip qtwebsockets -skip qtwinextras -skip qtwebchannel -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -nomake examples -nomake tests -submodules qt3d,qtsvg -- -DBUILD_qt3d=ON -DBUILD_qtsvg=ON

    Would you have any idea?

    Thanks
    Regards
    Maxime

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #4

      17.0 is to old. Update to a recent version (17.14.x)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        What exact VS2022 version do you use? Please also see what cl.exe version you are using.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MaximeCD
          wrote on last edited by
          #3

          Here is the result from cmake,

          -- The CXX compiler identification is MSVC 19.30.30715.0
          -- The C compiler identification is MSVC 19.30.30715.0
          

          And the visual studio version, from the command prompt in which we are launching the commands

          ** Visual Studio 2022 Developer Command Prompt v17.0.23
          
          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            17.0 is to old. Update to a recent version (17.14.x)

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            2
            • M Offline
              M Offline
              MaximeCD
              wrote on last edited by
              #5

              Ok, got to use a newer version of the image I ran this on, it worked fine with 17.9.3.
              Thank you very much for the quick answer!

              1 Reply Last reply
              0
              • M MaximeCD has marked this topic as solved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved