Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error during build from source win10 (autoMOC?)
QtWS25 Last Chance

Error during build from source win10 (autoMOC?)

Scheduled Pinned Locked Moved Solved General and Desktop
mocbuild from sourbuildbuild errorstatic build qt
2 Posts 1 Posters 3.5k 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.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by shokarta
    #1

    Dear all,

    as far as I have tried to compile QT static version(s) - i tried 6.3.1 and 6.4.0, but I always run into same error:

    so, what do I do (all from powershell):

    1) set the environments:

    $perlPath = Split-Path -parent (get-command perl).Path					// version 5.32.1
    $pythonPath = Split-Path -parent (get-command python).Path				// version 3.10.5
    $rubyPath = Split-Path -parent (get-command ruby).Path					// version 3.1.2p20
    $cmakePath = Split-Path -parent (get-command cmake).Path				// version 3.24.0
    $mingwPath = "c:\Qt\Tools\mingw1120_64"							// version gcc 11.2.0
    $env:QT_INSTALL_PREFIX = "c:\Qt\6.4.0-Static\6.4.0-Static"				// version 6.4.0
    $env:Path = "$mingwPath\bin;$mingwPath\opt\bin;$env:SystemRoot\system32;$env:SystemRoot;$env:SystemRoot\system32\WindowsPowerShell\v1.0\;$perlPath;$pythonPath;$rubyPath;$cmake"
    

    the output:

    The variable '$cmake' cannot be retrieved because it has not been set.
    At C:\Qt\qt-windows10-static-build-qt640.ps1:142 char:172
    + ... tem32\WindowsPowerShell\v1.0\;$perlPath;$pythonPath;$rubyPath;$cmake"
    +                                                                   ~~~~~~
    	+ CategoryInfo          : InvalidOperation: (cmake:String) [], RuntimeException
    	+ FullyQualifiedErrorId : VariableIsUndefined
    
    • no problem as it works fine

    2) Patch Qt's mkspecs for static build (removing this step makes no difference whatsoever):

    $File = "c:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\qtbase\mkspecs\win32-g++\qmake.conf"
    if (-not (Select-String -Quiet -SimpleMatch -CaseSensitive "# [QT-STATIC-PATCH]" $File)) {
    Write-Output "Patching $File ..."
    Copy-Item $File "$File.orig"
    @"
    
    # [QT-STATIC-PATCH]
    QMAKE_LFLAGS += -static -static-libgcc
    QMAKE_CFLAGS_RELEASE -= -O2
    QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer
    DEFINES += QT_STATIC_BUILD
    "@ | Out-File -Append $File -Encoding Ascii
    }
    

    output (OK):

    Patching C:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\qtbase\mkspecs\win32-g++\qmake.conf ...
    
    1. Run configure.bat:
    Push-Location "c:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\configure.bat"
    cmd /c "configure.bat -static -release -platform win32-g++ -prefix c:\Qt\6.4.0-Static\6.4.0-Static `
    -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sqlite
    -opensource -confirm-license `
    -make libs -nomake tools -nomake examples -nomake tests"
    

    output (too long, so adding only which might be good to know):

    + cd qtbase
    + C:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\qtbase\configure.bat -top-level -static -release -platform win32-g++ -prefix C:\Qt\6.4.0-Static\6.4.0-Static
    -- Windows 10 SDK version:
    'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.4.0-Static/6.4.0-Static' '-DQT_QMAKE_TARGET_MKSPEC=win32-g++' '-DCMAKE_BUILD_TYPE=Release' '-G' 'Ninja' 'C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0'
    -- The CXX compiler identification is GNU 8.3.0
    -- The C compiler identification is GNU 8.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Qt/Tools/Perl/c/bin/gcc.exe
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Qt/Tools/Perl/c/bin/c++.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Qt/Tools/Perl/c/bin/gcc.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    Checking dependencies of submodule 'qtbase'
    ...
    Checking dependencies of submodule 'qtwebview'
    Configuring submodule 'qtbase'
    -- Could NOT find md4c (missing: md4c_DIR)
    QtCore: WARNING: C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/tools/qatomicscopedvaluerollback_p.h does not have the "We mean it." warning
    -- Could NOT find md4c (missing: md4c_DIR)
    Configuring submodule 'qtimageformats'
    Configuring submodule 'qtlanguageserver'
    Configuring submodule 'qtshadertools'
    Configuring submodule 'qtsvg'
    Configuring submodule 'qtdeclarative'
    shaders/SaturationLightness.frag -> shaders/SaturationLightness.frag.qsb exposed as :/qt-project.org/imports/QtQuick/Dialogs/quickimpl/shaders/SaturationLightness.frag.qsb
    QtQmlDom: WARNING: C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtdeclarative/src/qmldom/standalone/private/qtqmlcompilerexports_p.h does not have the "We mean it." warning
    Configuring submodule 'qtmultimedia'
    Configuring submodule 'qt3d'
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/render/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/scene3d/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/extras/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/scene2d/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/input/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/logic/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt3d/src/quick3d/imports/animation/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring submodule 'qt5compat'
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qt5compat/src/imports/graphicaleffects5/CMakeLists.txt:33 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring submodule 'qtactiveqt'
    Configuring submodule 'qtcharts'
    Configuring submodule 'qtcoap'
    Configuring submodule 'qtconnectivity'
    Configuring submodule 'qtdatavis3d'
    Configuring submodule 'qttools'
    -- Could NOT find Clang (missing: Clang_DIR)
    -- Could NOT find Clang (missing: Clang_DIR)
    QtDesigner: WARNING: C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qttools/src/designer/src/lib/uilib/formbuilder.h includes abstractformbuilder.h when it should include QtDesigner/abstractformbuilder.h
    Configuring submodule 'qtdoc'
    Configuring submodule 'qtwebsockets'
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwebsockets/src/imports/qmlwebsockets/CMakeLists.txt:1 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring submodule 'qthttpserver'
    Configuring submodule 'qtlottie'
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtlottie/src/imports/CMakeLists.txt:1 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring submodule 'qtmqtt'
    Configuring submodule 'qtnetworkauth'
    Configuring submodule 'qtopcua'
    Configuring submodule 'qtserialport'
    Configuring submodule 'qtpositioning'
    Configuring submodule 'qtquicktimeline'
    Configuring submodule 'qtquick3d'
    assets/shaders/frostedGlass.frag -> assets/shaders/frostedGlass.frag.qsb exposed as ://assets/shaders/frostedGlass.frag.qsb
    Configuring submodule 'qtquick3dphysics'
    Configuring submodule 'qtremoteobjects'
    Configuring submodule 'qtscxml'
    Configuring submodule 'qtsensors'
    Configuring submodule 'qtserialbus'
    Configuring submodule 'qtspeech'
    Configuring submodule 'qttranslations'
    CMake Warning at qttranslations/translations/CMakeLists.txt:37 (message):
      Directory
      'C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qttranslations/translations/../../qtlocation/src'
      for qtlocation does not exist.  Skipping...
    Call Stack (most recent call first):
      qttranslations/translations/CMakeLists.txt:105 (add_ts_targets)
    
    
    CMake Warning at qttranslations/translations/CMakeLists.txt:44 (message):
      No source files located for qtlocation, skipping target creation
    Call Stack (most recent call first):
      qttranslations/translations/CMakeLists.txt:105 (add_ts_targets)
    
    
    Configuring submodule 'qtvirtualkeyboard'
    QtVirtualKeyboard: WARNING: C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtvirtualkeyboard/src/virtualkeyboard/qvirtualkeyboard_namespace.h does not include QT_BEGIN_NAMESPACE
    Configuring submodule 'qtwayland'
    Skipping the build as the condition "LINUX OR MACOS OR QNX" is not met.
    Configuring submodule 'qtwebchannel'
    CMake Warning (dev) at qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:410 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwebchannel/src/imports/webchannel/CMakeLists.txt:7 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring submodule 'qtwebengine'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'html5lib'
    -- Windows 10 SDK version:
    -- Support check for QtWebEngine failed: Static build is not supported.
    -- Support check for QtPdf failed: node.js version 12 or later is required.
    Configuring submodule 'qtwebview'
    -- Could NOT find Qt6WebEngineCore (missing: Qt6WebEngineCore_DIR)
    CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:268 (message):
      Failed to find optional Qt component "WebEngineCore".
    
      Expected Config file at
      "C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake"
      does NOT exist
    
    Call Stack (most recent call first):
      qtwebview/CMakeLists.txt:12 (find_package)
    
    
    -- Could NOT find Qt6WebEngineQuick (missing: Qt6WebEngineQuick_DIR)
    CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:268 (message):
      Failed to find optional Qt component "WebEngineQuick".
    
      Expected Config file at
      "C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfig.cmake"
      does NOT exist
    
    Call Stack (most recent call first):
      qtwebview/CMakeLists.txt:12 (find_package)
    
    
    
    -- Configuration summary shown below. It has also been written to C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/config.summary
    -- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.
    
    -- Configure summary:
    
    Building for: win32-g++ (x86_64, CPU features: cx16 mmx sse sse2 sse3)
    Compiler: gcc 8.3.0
    Build options:
      Mode ................................... release
      Optimize release build for size ........ no
      Fully optimize release builds (-O3) .... no
      Building shared libraries .............. no
      Using C standard ....................... C11
      Using C++ standard ..................... C++17
      Relocatable ............................ no
      Using precompiled headers .............. yes
      Using LTCG ............................. no
      Using Intel CET ........................ no
      Target compiler supports:
        SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
        AVX .................................. AVX AVX2 VAES
        AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
        Other x86 ............................ AES F16C RDRAND SHA
      Sanitizers:
        Addresses ............................ no
        Threads .............................. no
        Memory ............................... no
        Fuzzer (instrumentation only) ........ no
        Undefined ............................ no
      Build parts ............................ libs tools
      App store compliance ................... no
    Qt modules and options:
      Qt Concurrent .......................... yes
    ...
    
    
    Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library.
    Note: Hunspell in Qt Virtual Keyboard is not enabled. Spelling correction will not be available.
    
    WARNING: No backend for low level audio found.
    WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
    Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation.
    On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
    On macOS, you can use Homebrew's llvm package.
    You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check.
    WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found.
    You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
    WARNING: QtWebEngine won't be built. Static build is not supported.
    --
    WARNING: QtPdf won't be built. node.js version 12 or later is required.
    
    
    Qt is now configured for building. Just run 'cmake --build . --parallel'
    
    Once everything is built, you must run 'cmake --install .'
    Qt will be installed into 'C:/Qt/6.4.0-Static/6.4.0-Static'
    
    To configure and build other Qt modules, you can use the following convenience script:
            C:/Qt/6.4.0-Static/6.4.0-Static/bin/qt-configure-module.bat
    
    If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
    

    4) run "cmake --build . --parallel":

    -- Configuring done
    -- Generating done
    

    5) run "cmake --install ."

    -- Build files have been written to: C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0
    [445/10122] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/kernel/qtimer.cpp.obj
    In file included from C:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stddef.h:1,
                     from C:/Qt/Tools/Perl/c/x86_64-w64-mingw32/include/stdint.h:32,
                     from C:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stdint.h:9,
                     from C:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/cstdint:41,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qglobal.h:12,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/qglobal.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qt_pch.h:20,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx:5,
                     from <command-line>:
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/kernel/qtimer.cpp: In static member function 'static constexpr size_t QTimerPrivate::_qt_property_isActiveData_offset()':
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/kernel/qtimer.cpp:28:32: warning: offsetof within non-standard-layout type 'QTimerPrivate' is conditionally-supported [-Winvalid-offsetof]
         Q_OBJECT_COMPUTED_PROPERTY(QTimerPrivate, bool, isActiveData,
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/kernel/qtimer.cpp:28:5: note: in expansion of macro 'Q_OBJECT_COMPUTED_PROPERTY'
         Q_OBJECT_COMPUTED_PROPERTY(QTimerPrivate, bool, isActiveData,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
    [790/10122] Building CXX object qtbase/src/sql/CMakeFiles/Sql.dir/models/qsqlquerymodel.cpp.obj
    In file included from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/qcompilerdetection.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qglobal.h:134,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/qglobal.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qt_pch.h:20,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/CMakeFiles/Sql.dir/cmake_pch.hxx:5,
                     from <command-line>:
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqlquerymodel.cpp: In member function 'void QSqlQueryModel::setQuery(const QSqlQuery&)':
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqlquerymodel.cpp:396:45: warning: 'QSqlQuery::QSqlQuery(const QSqlQuery&)' is deprecated: QSqlQuery is not meant to be copied. Use move construction instead. [-Wdeprecated-declarations]
         QT_IGNORE_DEPRECATIONS(QSqlQuery copy = query;)
                                                 ^~~~~
    In file included from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/qsqlquery.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqlquerymodel_p.h:21,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqlquerymodel.cpp:5:
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/kernel/qsqlquery.h:31:5: note: declared here
         QSqlQuery(const QSqlQuery &other);
         ^~~~~~~~~
    [801/10122] Building CXX object qtbase/src/sql/CMakeFiles/Sql.dir/models/qsqltablemodel.cpp.obj
    In file included from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/qcompilerdetection.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qglobal.h:134,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/qglobal.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qt_pch.h:20,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/CMakeFiles/Sql.dir/cmake_pch.hxx:5,
                     from <command-line>:
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqltablemodel.cpp: In member function 'void QSqlTableModel::setQuery(const QSqlQuery&)':
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqltablemodel.cpp:593:58: warning: 'void QSqlQueryModel::setQuery(const QSqlQuery&)' is deprecated: QSqlQuery is not meant to be copied. Pass it by move instead. [-Wdeprecated-declarations]
         QT_IGNORE_DEPRECATIONS(QSqlQueryModel::setQuery(query);)
                                                              ^
    In file included from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/qsqlquerymodel.h:1,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqltablemodel.h:9,
                     from C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqltablemodel.cpp:4:
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql/models/qsqlquerymodel.h:45:10: note: declared here
         void setQuery(const QSqlQuery &query);
              ^~~~~~~~
    [967/10122] Automatic MOC for target QODBCDriverPlugin
    FAILED: qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/mocs_compilation.cpp C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/mocs_compilation.cpp
    cmd.exe /C "cd /D C:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\qtbase\src\plugins\sqldrivers\odbc && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_autogen C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/CMakeFiles/QODBCDriverPlugin_autogen.dir/AutogenInfo.json Release && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_transform_depfile Ninja gccdepfile C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0 C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0 C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/deps C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/CMakeFiles/d/6ac00021a3b40f22c044c5860ffc8e86b43eda86b952c2ac47b5d7e02934ec27.d"
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/qsql_odbc_p.h"
    into
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/moc_qsql_odbc_p.cpp"
    included by
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/qsql_odbc.cpp"
    
    Command
    -------
    ...
    
    Output
    ------
    :/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qnamespace.:428:1: error: Parse error at "AA_UseHighDpiPixmaps"
    
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/main.cpp"
    into
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/main.moc"
    included by
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/main.cpp"
    
    Command
    -------
    ...
    
    Output
    ------
    :/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qnamespace.:428:1: error: Parse error at "AA_UseHighDpiPixmaps"
    
    [984/10122] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/painting/qdrawhelper.cpp.obj
    ninja: build stopped: subcommand failed.
    -- Install configuration: "Release"
    -- Installing: C:/Qt/6.4.0-Static/6.4.0-Static/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake
    ...
    -- Installing: C:/Qt/6.4.0-Static/6.4.0-Static/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake
    CMake Error at qtbase/src/dbus/cmake_install.cmake:58 (file):
      file INSTALL cannot find
      "C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/lib/libQt6DBus.a":
      File exists.
    Call Stack (most recent call first):
      qtbase/src/cmake_install.cmake:115 (include)
      qtbase/cmake_install.cmake:285 (include)
      cmake_install.cmake:42 (include)
    

    So as you can see, it drops on this error:

    [967/10122] Automatic MOC for target QODBCDriverPlugin
    FAILED: qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/mocs_compilation.cpp C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/mocs_compilation.cpp
    cmd.exe /C "cd /D C:\Qt\6.4.0-Static\src\qt-everywhere-src-6.4.0\qtbase\src\plugins\sqldrivers\odbc && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_autogen C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/CMakeFiles/QODBCDriverPlugin_autogen.dir/AutogenInfo.json Release && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/timestamp && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_transform_depfile Ninja gccdepfile C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0 C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0 C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/deps C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/CMakeFiles/d/6ac00021a3b40f22c044c5860ffc8e86b43eda86b952c2ac47b5d7e02934ec27.d"
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/qsql_odbc_p.h"
    into
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/moc_qsql_odbc_p.cpp"
    included by
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/qsql_odbc.cpp"
    
    Command
    -------
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/bin/moc.exe -DMINGW_HAS_SECURE_API=1 -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x070000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_LEAN_HEADERS=1 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_STATICPLUGIN -DUNICODE -DWIN32 -DWIN64 -DWINVER=0x0A00 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN32_WINNT=0x0A00 -D_WIN64 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/mkspecs/win32-g++ -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/6.4.0 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/6.4.0/QtCore -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/6.4.0 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/6.4.0/QtSql -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql -IC:/MinGW/include -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++ -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/x86_64-w64-mingw32 -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/backward -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include -IC:/Qt/Tools/Perl/c/include -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include-fixed -IC:/Qt/Tools/Perl/c/x86_64-w64-mingw32/include --include C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/moc_predefs.h --output-dep-file -o C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/moc_qsql_odbc_p.cpp C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/qsql_odbc_p.h
    
    Output
    ------
    :/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qnamespace.:428:1: error: Parse error at "AA_UseHighDpiPixmaps"
    
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/main.cpp"
    into
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/main.moc"
    included by
      "SRC:/qtbase/src/plugins/sqldrivers/odbc/main.cpp"
    
    Command
    -------
    C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/bin/moc.exe -DMINGW_HAS_SECURE_API=1 -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x070000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_LEAN_HEADERS=1 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_STATICPLUGIN -DUNICODE -DWIN32 -DWIN64 -DWINVER=0x0A00 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN32_WINNT=0x0A00 -D_WIN64 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/mkspecs/win32-g++ -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/6.4.0 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtCore/6.4.0/QtCore -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/sql -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/6.4.0 -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql/6.4.0/QtSql -IC:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/include/QtSql -IC:/MinGW/include -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++ -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/x86_64-w64-mingw32 -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/backward -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include -IC:/Qt/Tools/Perl/c/include -IC:/Qt/Tools/Perl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include-fixed -IC:/Qt/Tools/Perl/c/x86_64-w64-mingw32/include --include C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/moc_predefs.h --output-dep-file -o C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/QODBCDriverPlugin_autogen/include/main.moc C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/plugins/sqldrivers/odbc/main.cpp
    
    Output
    ------
    :/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/src/corelib/global/qnamespace.:428:1: error: Parse error at "AA_UseHighDpiPixmaps"
    
    [984/10122] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/painting/qdrawhelper.cpp.obj
    ninja: build stopped: subcommand failed.
    

    and later on:

    CMake Error at qtbase/src/dbus/cmake_install.cmake:58 (file):
      file INSTALL cannot find
      "C:/Qt/6.4.0-Static/src/qt-everywhere-src-6.4.0/qtbase/lib/libQt6DBus.a":
      File exists.
    Call Stack (most recent call first):
      qtbase/src/cmake_install.cmake:115 (include)
      qtbase/cmake_install.cmake:285 (include)
      cmake_install.cmake:42 (include)
    

    Running the script from run.bat, which runs the shell script qt-windows10-static-build-qt640.ps1 (files including all log attached bellow)
    https://www.transfernow.net/dl/20220823u1c2FKVe

    any idea how to move forward?
    perhaprs report as bug?

    Thank you for ANY tip to move forward, as dealing with the same error for over a month

    1 Reply Last reply
    1
    • S Offline
      S Offline
      shokarta
      wrote on last edited by
      #2

      so with help of someone from BugReport portal, the solution was extremly simple...
      as you can see form the log:
      eea6d5ef-d2db-4406-8d50-50e2ca9c185a-image.png
      C and C++ compler is pucked up from PERL, not form MinGW,
      so I have onlymoved MinGW environment variables PATH above the PERL and then all worked fine...

      they also suggested to try specify:

      -DCMAKE_CXX_COMPILER=C:/path/to/mingw/compiler/g++.exe -DCMAKE_C_COMPILER=C:/path/to/mingw/compiler/gcc.exe
      

      but im not sure where to put this realy.

      other option (im only thinking, was not suggested) is to use MingwDir parameter in configure

      • but not sure if the Qt is this smart enough to use this parameter as a compiler path for C and C++, this has to be tested realy
      1 Reply Last reply
      2

      • Login

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