Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Error during build from source (AutoMOC)
Forum Update on Monday, May 27th 2025

Error during build from source (AutoMOC)

Scheduled Pinned Locked Moved Solved Qt 6
7 Posts 5 Posters 1.1k 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.
  • C Offline
    C Offline
    cmcm
    wrote on last edited by
    #1

    I followed the tutorial on the official website (https://doc.qt.io/qt-6/windows-building.html) to compile Qt 6.5.0.

    My environment:

    • Windows 10
    • Visual Studio 2022 (MSVC 14.39.33519)
    • CMake 3.30
    • Ninja 1.12.0

    However, I keep encountering the error: Automatic MOC for XXX ... Failed .... .

    I've tried shortening the paths as much as possible and running the command prompt as an administrator, but it hasn't helped.

    Has anyone successfully built it? I need your assistance.

    Some of the log :

    F:\build>F:\VS2022\IDE\VC\Auxiliary\Build\vcvarsall.bat amd64
    **********************************************************************
    ** Visual Studio 2022 Developer Command Prompt v17.0
    ** Copyright (c) 2022 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'
    
    F:\build>..\qt6.5.0\configure
    + cd qtbase
    + F:\qt6.5.0\qtbase\configure.bat -top-level
    -- Windows 10 SDK version: 10.0.22621.0
    'E:/CMake/bin/cmake.exe' '-G' 'Ninja' 'F:/qt6.5.0'
    -- Using vcpkg from F:\VS2022\IDE\VC\vcpkg
    -- CMAKE_TOOLCHAIN_FILE is: F:/VS2022/IDE/VC/vcpkg/scripts/buildsystems/vcpkg.cmake
    -- The CXX compiler identification is MSVC 19.39.33523.0
    -- The C compiler identification is MSVC 19.39.33523.0
    -- The ASM compiler identification is MSVC
    -- Found assembler: F:/VS2022/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: F:/VS2022/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.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: F:/VS2022/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    ......
    -- Checking dependencies of submodule 'qtwebview'
    -- Configuring submodule 'qtbase'
                -DVCPKG_TARGET_TRIPLET=x64-windows
                -DVCPKG_APPLOCAL_DEPS=ON
                -DZ_VCPKG_ROOT_DIR=F:/VS2022/IDE/VC/vcpkg
                -DCMAKE_C_FLAGS=/DWIN32 /D_WINDOWS
                -DCMAKE_C_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
                -DCMAKE_C_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
                -DCMAKE_C_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
                -DCMAKE_CXX_FLAGS=/DWIN32 /D_WINDOWS /EHsc
                -DCMAKE_CXX_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
                -DCMAKE_CXX_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
                -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
                -DCMAKE_OBJCOPY=E:/TDMGCC/bin/objcopy.exe
                -DCMAKE_TOOLCHAIN_FILE=F:/VS2022/IDE/VC/vcpkg/scripts/buildsystems/vcpkg.cmake
                -DCMAKE_C_STANDARD=11
                -DCMAKE_C_STANDARD_REQUIRED=ON
                -DCMAKE_CXX_STANDARD=17
                -DCMAKE_CXX_STANDARD_REQUIRED=ON
                -DCMAKE_MODULE_PATH:STRING=F:/qt6.5.0/qtbase/cmake/platforms
    
    CMake Warning (dev) at F:/build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (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:4 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Configuring submodule 'qthttpserver'
    -- Configuring submodule 'qttools'
    -- Could NOT find Clang (missing: Clang_DIR)
    -- Could NOT find Clang (missing: Clang_DIR)
    -- Configuring submodule 'qtserialport'
    -- Configuring submodule 'qtpositioning'
    -- Configuring submodule 'qtwebchannel'
    CMake Warning (dev) at F:/build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (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:10 (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'
    [QtWebEngine] -- Windows 10 SDK version: 10.0.22621.0
    [QtWebEngine] -- Support check for QtWebEngine failed: node.js version 12 or later is required.
    [QtWebEngine] -- Support check for QtPdf failed: node.js version 12 or later is required.
    -- Configuring submodule 'qtdoc'
    -- Configuring submodule 'qtgrpc'
    -- Configuring submodule 'qtlocation'
    -- Configuring submodule 'qtlottie'
    -- Configuring submodule 'qtmqtt'
    -- Configuring submodule 'qtnetworkauth'
    -- Configuring submodule 'qtopcua'
    -- Configuring submodule 'qtquick3dphysics'
    -- Configuring submodule 'qtquickeffectmaker'
    Nodes path: ./qml/QtQuickEffectMaker/defaultnodes
    -- Configuring submodule 'qtremoteobjects'
    -- Configuring submodule 'qtscxml'
    -- Configuring submodule 'qtsensors'
    -- Configuring submodule 'qtserialbus'
    -- Configuring submodule 'qtspeech'
    -- Configuring submodule 'qttranslations'
    -- Configuring submodule 'qtvirtualkeyboard'
    -- Configuring submodule 'qtwayland'
    Skipping the build as the condition "LINUX OR MACOS OR QNX" is not met.
    -- Configuring submodule 'qtwebview'
    -- Could NOT find Qt6WebEngineCore (missing: Qt6WebEngineCore_DIR)
    CMake Warning at F:/build/qtbase/lib/cmake/Qt6/Qt6Config.cmake:214 (message):
      Failed to find optional Qt component "WebEngineCore".
    
      Expected Config file at
      "F:/build/qtbase/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake"
      does NOT exist
    
    Call Stack (most recent call first):
      F:/VS2022/IDE/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
      qtwebview/CMakeLists.txt:15 (find_package)
    
    
    -- Could NOT find Qt6WebEngineQuick (missing: Qt6WebEngineQuick_DIR)
    CMake Warning at F:/build/qtbase/lib/cmake/Qt6/Qt6Config.cmake:214 (message):
      Failed to find optional Qt component "WebEngineQuick".
    
      Expected Config file at
      "F:/build/qtbase/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfig.cmake"
      does NOT exist
    
    Call Stack (most recent call first):
      F:/VS2022/IDE/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
      qtwebview/CMakeLists.txt:15 (find_package)
    
    
    
    -- Configuration summary shown below. It has also been written to F:/build/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-msvc (x86_64, CPU features: sse sse2)
    Compiler: msvc 19.39.33523.0
    Build options:
      Mode ................................... debug
      Fully optimize release builds (-O3) .... no
      Building shared libraries .............. yes
      Using C standard ....................... C11
      Using C++ standard ..................... C++17
      Relocatable ............................ yes
      Using precompiled headers .............. yes
      Using Link Time Optimization (LTCG) .... no
      Using Intel CET ........................ no
      Target compiler supports:
        x86 Intrinsics ....................... Basic VAES AVX512VBMI2
      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
      Qt D-Bus ............................... yes
      Qt D-Bus directly linked to libdbus .... no
      Qt Gui ................................. yes
      Qt Network ............................. yes
      Qt PrintSupport ........................ yes
      Qt Sql ................................. yes
      Qt Testlib ............................. yes
      Qt Widgets ............................. yes
      Qt Xml ................................. yes
    Support enabled for:
      Using pkg-config ....................... no
      udev ................................... no
      OpenSSL ................................ no
        Qt directly linked to OpenSSL ........ no
      OpenSSL 1.1 ............................ no
      OpenSSL 3.0 ............................ no
      Using system zlib ...................... no
      Zstandard support ...................... no
      Thread support ......................... yes
    Common build options:
      Linker can resolve circular dependencies  yes
    Qt Core:
      backtrace .............................. no
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ no
      GLib ................................... no
      ICU .................................... no
      Using system libb2 ..................... no
      Built-in copy of the MIME database ..... yes
      cpp/winrt base ......................... yes
      Tracing backend ........................ <none>
      Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
      PCRE2 .................................. yes
        Using system PCRE2 ................... no
      Application permissions ................ no
    Qt Sql:
      SQL item models ........................ yes
    Qt Network:
      getifaddrs() ........................... no
      IPv6 ifname ............................ no
      libproxy ............................... no
      Schannel ............................... yes
      DTLS ................................... no
      OCSP-stapling .......................... no
      SCTP ................................... no
      Use system proxies ..................... yes
      GSSAPI ................................. no
      Brotli Decompression Support ........... no
      qIsEffectiveTLD() ...................... yes
        Built-in publicsuffix database ....... yes
        System publicsuffix database ......... no
    Core tools:
      Android deployment tool ................ yes
      macOS deployment tool .................. no
      Windows deployment tool ................ yes
      qmake .................................. yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ no
      HarfBuzz ............................... yes
        Using system HarfBuzz ................ no
      Fontconfig ............................. no
      Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
          Using system libjpeg ............... no
        PNG .................................. yes
          Using system libpng ................ no
      Text formats:
        HtmlParser ........................... yes
        CssParser ............................ yes
        OdfWriter ............................ yes
        MarkdownReader ....................... yes
          Using system libmd4c ............... no
        MarkdownWriter ....................... yes
      EGL .................................... no
      OpenVG ................................. no
      OpenGL:
        Desktop OpenGL ....................... no
        Dynamic OpenGL ....................... yes
        OpenGL ES 2.0 ........................ no
        OpenGL ES 3.0 ........................ no
        OpenGL ES 3.1 ........................ no
        OpenGL ES 3.2 ........................ no
      Vulkan ................................. no
      Session Management ..................... yes
    Features used by QPA backends:
      evdev .................................. no
      libinput ............................... no
      HiRes wheel support in libinput ........ no
      INTEGRITY HID .......................... no
      mtdev .................................. no
      tslib .................................. no
      xkbcommon .............................. no
      X11 specific:
        XLib ................................. no
        XCB Xlib ............................. no
        EGL on X11 ........................... no
        xkbcommon-x11 ........................ no
        xcb-sm ............................... no
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. no
      EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... no
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... no
        EGLFS GBM ............................ no
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGLFS X11 ............................ no
      LinuxFB ................................ no
      VNC .................................... no
      VK_KHR_display ......................... no
      QNX:
        lgmon ................................ no
        IMF .................................. no
      XCB:
        Using system-provided xcb-xinput ..... no
        GL integrations:
          GLX Plugin ......................... no
            XCB GLX .......................... no
          EGL-X11 Plugin ..................... no
      Windows:
        Direct 2D ............................ yes
        Direct 2D 1.1 ........................ yes
        DirectWrite .......................... yes
        DirectWrite 3 ........................ yes
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows WindowsVista
    Qt Testlib:
      Tester for item models ................. yes
      Batch tests ............................ no
    Qt PrintSupport:
      CUPS ................................... no
    Qt Sql Drivers:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. no
      OCI (Oracle) ........................... no
      ODBC ................................... yes
      PostgreSQL ............................. no
      SQLite ................................. yes
        Using system provided SQLite ......... no
    Further Image Formats:
      JasPer ................................. no
      MNG .................................... no
      TIFF ................................... yes
        Using system libtiff ................. no
      WEBP ................................... yes
        Using system libwebp ................. no
    Qt QML:
      QML network support .................... yes
      QML debugging and profiling support .... yes
      QML just-in-time compiler .............. yes
      QML XML http request ................... yes
      QML Locale ............................. yes
    Qt QML Models:
      QML list model ......................... yes
      QML delegate model ..................... yes
    Qt Quick:
      AnimatedImage item ..................... yes
      Canvas item ............................ yes
      Support for Qt Quick Designer .......... yes
      Flipable item .......................... yes
      GridView item .......................... yes
      ListView item .......................... yes
      TableView item ......................... yes
      TreeView item .......................... yes
      Path support ........................... yes
      PathView item .......................... yes
      Positioner items ....................... yes
      Repeater item .......................... yes
      ShaderEffect item ...................... yes
      Sprite item ............................ yes
    Qt Quick Templates 2:
      Hover support .......................... yes
      Multi-touch support .................... yes
      Calendar support ....................... yes
    Qt Quick Controls 2:
      Styles ................................. Basic Fusion Imagine iOS Material Universal macOS Windows
    QtQuick3D:
      Assimp ................................. yes
      System Assimp .......................... no
    Qt Multimedia:
      Spatial Audio .......................... yes
      Spatial Audio (Quick3D) ................ yes
      Low level Audio Backend:
        ALSA (experimental) .................. no
        PulseAudio ........................... no
        MMRenderer ........................... no
        CoreAudio ............................ no
        Windows Media SDK .................... yes
        Open SLES (Android) .................. no
        Web Assembly ......................... no
      Plugin:
        GStreamer 1.0 ........................ no
        FFmpeg ............................... no
        MMRenderer ........................... no
        AVFoundation ......................... no
        Windows Media Foundation ............. yes
      Hardware acceleration and features:
        Video for Linux ...................... no
        VAAPI support ........................ no
        Linux DMA buffer support ............. no
        VideoToolbox ......................... no
    Qt 3D:
      Assimp ................................. yes
      System Assimp .......................... no
      Use SSE2 instructions .................. yes
      Use AVX2 instructions .................. no
      Aspects:
        Render aspect ........................ yes
        Input aspect ......................... yes
        Logic aspect ......................... yes
        Animation aspect ..................... yes
        Extras aspect ........................ yes
    Qt 3D APIs:
      Vulkan ................................. no
    Qt 3D Renderers:
      OpenGL Renderer ........................ yes
      RHI Renderer ........................... yes
    Qt3D Geometry Loaders:
      Autodesk FBX ........................... no
    Qt 5 Compatibility Libraries:
      iconv .................................. no
    Qt Charts Types:
      Area Chart ............................. yes
      Line Chart ............................. yes
      Spline Chart ........................... yes
      Scatter Chart .......................... yes
      Bar Chart .............................. yes
      Pie Chart .............................. yes
      Boxplot Chart .......................... yes
      Candlestick Chart ...................... yes
    Qt Axis Types:
      DateTime Axis .......................... yes
    Qt Bluetooth:
      BlueZ .................................. no
      BlueZ Low Energy ....................... no
      Linux Crypto API ....................... no
      WinRT Bluetooth API .................... yes
    Qt Tools:
      Qt Assistant ........................... yes
      QDoc ................................... no
      Clang-based lupdate parser ............. no
      Qt Designer ............................ yes
      Qt Distance Field Generator ............ yes
      Qt Linguist ............................ yes
      pixeltool .............................. yes
      qdbus .................................. yes
      Qt Attributions Scanner ................ yes
      qtdiag ................................. yes
      qtplugininfo ........................... yes
    Serial Port:
      ntddmodm ............................... no
    WebEngine Repository Build Options:
      Build Ninja ............................ no
      Build Gn ............................... yes
      Jumbo Build ............................ yes
      Developer build ........................ no
      Build QtWebEngine Modules:
        Build QtWebEngineCore ................ no
        Build QtWebEngineWidgets ............. no
        Build QtWebEngineQuick ............... no
      Build QtPdf Modules:
        Build QtPdfWidgets ................... no
        Build QtPdfQuick ..................... no
    Qt Protobuf tools:
      Qt Protobuf generator .................. no
    Qt GRPC:
      gRPC support ........................... yes
      Native gRPC support .................... no
    Qt GRPC tools:
      Qt GRPC generator ...................... no
    Qt Opcua:
      Open62541 .............................. yes
      Unified Automation C++ SDK ............. no
      Support for namespace 0 NodeId names ... yes
      Namespace 0 NodeIds generator .......... no
      Open62541 security support ............. no
      Support for global discovery server .... no
    Qt Remote Objects:
      High Availability Manager (ham) ........ no
    Qt Scxml:
      ECMAScript data model for QtScxml ...... yes
    Qt Sensors:
      WinRT sensors backend .................. yes
    Qt SerialBus:
      Socket CAN ............................. no
      Socket CAN FD .......................... no
      SerialPort Support ..................... yes
    Qt TextToSpeech:
      Flite .................................. no
      Flite with ALSA ........................ no
      Speech Dispatcher ...................... no
    Qt Virtualkeyboard:
      Desktop integration .................... yes
      Built-in layouts ....................... yes
      Key navigation ......................... no
      Retro style as default ................. no
      Sensitive Debug ........................ no
      Cerence ................................ no
        Static Linking ....................... no
        Handwriting .......................... no
          Alphabetic ......................... no
          CJK ................................ no
        XT9 .................................. no
          XT9 Debug .......................... no
          XT9 9-key layouts .................. no
        Bundle resources ..................... no
          Handwriting ........................ no
          XT9 ................................ no
      Hunspell ............................... no
        Using Hunspell copy from 3rdparty/ ... no
      OpenWnn ................................ yes
      MyScript ............................... no
      Language support enabled for:
        Arabic ............................... yes
        Bulgarian ............................ yes
        Czech ................................ yes
        Danish ............................... yes
        German ............................... yes
        Greek ................................ yes
        English GB ........................... yes
        English US ........................... yes
        Spanish .............................. yes
        Spanish Mexico ....................... yes
        Estonian ............................. yes
        Farsi ................................ yes
        Finnish .............................. yes
        French Canada ........................ yes
        French France ........................ yes
        Hebrew ............................... yes
        Hindi ................................ yes
        Croatian ............................. yes
        Hungarian ............................ yes
        Indonesian ........................... yes
        Italian .............................. yes
        Japanese ............................. yes
        Korean ............................... yes
        Malay ................................ yes
        Norwegian ............................ yes
        Dutch ................................ yes
        Polish ............................... yes
        Portuguese Brazil .................... yes
        Portuguese Portugal .................. yes
        Romanian ............................. yes
        Russian .............................. yes
        Slovak ............................... yes
        Slovenian ............................ yes
        Albanian ............................. yes
        Serbian .............................. yes
    
    Note: Hunspell in Qt Virtual Keyboard is not enabled. Spelling correction will not be available.
    
    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. node.js version 12 or later is required.
    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/Qt-6.5.0'
    
    To configure and build other Qt modules, you can use the following convenience script:
            C:/Qt/Qt-6.5.0/bin/qt-configure-module.bat
    
    If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
    Alternatively, you can add the --fresh flag to your CMake flags.
    
    -- Configuring done (101.9s)
    -- Generating done (9.3s)
    -- Build files have been written to: F:/build
    
    F:\build>cmake --build . -- parallel
    ninja: error: unknown target 'parallel'
    
    F:\build>cmake --build . --parallel
    [1135/10883] Automatic MOC for target Gui
    FAILED: qtbase/src/gui/Gui_autogen/timestamp qtbase/src/gui/Gui_autogen/mocs_compilation.cpp F:/build/qtbase/src/gui/Gui_autogen/timestamp F:/build/qtbase/src/gui/Gui_autogen/mocs_compilation.cpp
    C:\Windows\system32\cmd.exe /C "cd /D F:\build\qtbase\src\gui && E:\CMake\bin\cmake.exe -E cmake_autogen F:/build/qtbase/src/gui/CMakeFiles/Gui_autogen.dir/AutogenInfo.json Debug && E:\CMake\bin\cmake.exe -E touch F:/build/qtbase/src/gui/Gui_autogen/timestamp && E:\CMake\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile F:/qt6.5.0 F:/qt6.5.0/qtbase/src/gui F:/build F:/build/qtbase/src/gui F:/build/qtbase/src/gui/Gui_autogen/deps F:/build/CMakeFiles/d/16dc19875420b6a2a4d780868aa15e5a098da677c46bf8469c68f2a7ddade346.d"
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/gui/itemmodels/qstandarditemmodel.h"
    into
      "BIN:/qtbase/src/gui/Gui_autogen/include/moc_qstandarditemmodel.cpp"
    included by
      "SRC:/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp"
    Process failed with return value 3221225477
    
    Command
    -------
    F:/build/qtbase/bin/moc.exe -DGui_EXPORTS -DMD4C_USE_UTF8 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_GUI_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE "-DQT_QPA_DEFAULT_PLATFORM_NAME=\"windows\"" -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -IF:/build/qtbase/include -IF:/build/qtbase/include/QtGui -IF:/qt6.5.0/qtbase/src/gui -IF:/build/qtbase/src/gui -IF:/qt6.5.0/qtbase/src/3rdparty/VulkanMemoryAllocator -IF:/build/qtbase/include/QtGui/6.5.0 -IF:/build/qtbase/include/QtGui/6.5.0/QtGui -IF:/qt6.5.0/qtbase/src/3rdparty/md4c -IF:/qt6.5.0/qtbase/src/3rdparty/zlib/src -IF:/build/qtbase/include/QtCore -IF:/qt6.5.0/qtbase/mkspecs/win32-msvc -IF:/build/qtbase/src/corelib -IF:/build/qtbase/include/QtCore/6.5.0 -IF:/build/qtbase/include/QtCore/6.5.0/QtCore -IF:/qt6.5.0/qtbase/src/3rdparty/libpng -IF:/qt6.5.0/qtbase/src/3rdparty/harfbuzz-ng/include/harfbuzz -IF:/qt6.5.0/qtbase/src/3rdparty/freetype/include --output-json --output-dep-file -o F:/build/qtbase/src/gui/Gui_autogen/include/moc_qstandarditemmodel.cpp F:/qt6.5.0/qtbase/src/gui/itemmodels/qstandarditemmodel.h
    
    Output
    ------
    
    
    [1136/10883] Automatic MOC for target Network
    FAILED: qtbase/src/network/Network_autogen/timestamp qtbase/src/network/Network_autogen/mocs_compilation.cpp F:/build/qtbase/src/network/Network_autogen/timestamp F:/build/qtbase/src/network/Network_autogen/mocs_compilation.cpp
    C:\Windows\system32\cmd.exe /C "cd /D F:\build\qtbase\src\network && E:\CMake\bin\cmake.exe -E cmake_autogen F:/build/qtbase/src/network/CMakeFiles/Network_autogen.dir/AutogenInfo.json Debug && E:\CMake\bin\cmake.exe -E touch F:/build/qtbase/src/network/Network_autogen/timestamp && E:\CMake\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile F:/qt6.5.0 F:/qt6.5.0/qtbase/src/network F:/build F:/build/qtbase/src/network F:/build/qtbase/src/network/Network_autogen/deps F:/build/CMakeFiles/d/2f55aea764164960f9b94ee962cccdc55e9bcfaa3e06669093a5a4bbb7647bd7.d"
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/qtbase/src/network/kernel/qhostinfo_p.h"
    into
      "BIN:/qtbase/src/network/Network_autogen/include/moc_qhostinfo_p.cpp"
    included by
      "SRC:/qtbase/src/network/kernel/qhostinfo.cpp"
    Process failed with return value 3221225477
    
    Command
    -------
    F:/build/qtbase/bin/moc.exe -DNetwork_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -IF:/build/qtbase/include -IF:/build/qtbase/include/QtNetwork -IF:/qt6.5.0/qtbase/src/network -IF:/build/qtbase/src/network -IF:/qt6.5.0/qtbase/src/network/kernel -IF:/build/qtbase/include/QtNetwork/6.5.0 -IF:/build/qtbase/include/QtNetwork/6.5.0/QtNetwork -IF:/qt6.5.0/qtbase/src/3rdparty/zlib/src -IF:/qt6.5.0/qtbase/src/3rdparty/libpsl -IF:/build/qtbase/include/QtCore -IF:/qt6.5.0/qtbase/mkspecs/win32-msvc -IF:/build/qtbase/src/corelib -IF:/build/qtbase/include/QtCore/6.5.0 -IF:/build/qtbase/include/QtCore/6.5.0/QtCore --output-json -D_WINSOCK_DEPRECATED_NO_WARNINGS --output-dep-file -o F:/build/qtbase/src/network/Network_autogen/include/moc_qhostinfo_p.cpp F:/qt6.5.0/qtbase/src/network/kernel/qhostinfo_p.h
    
    Output
    ------
    ......
    
    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by Axel Spoerl
      #2

      Hi,

      looking at the system configuration, nothing shouts out that it's wrong.
      A few questions though:

      • why 6.5.0, not the latest patch release 6.5.6?
      • are you using a normal command line? Or the x64 developer command line from MSVC 2022?
      • has the same issue occurred on the first attempt? Otherwise wipe the build tree and try again.
      • I don't expect much of it, but try just typing "ninja" instead of running cmake directly.
      • is a virus scanner getting in your way in the build directory?
      • does restarting the build lead to exactly the same error messages, or are other files affected with similar error messages each time? => It's a known issue on Windows, that parallel builds cause file access conflicts and you need to start over a few times. That's not your problem, if it's exactly the same files and error messages each time.

      Software Engineer
      The Qt Company, Oslo

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

        ... and why do you want to compile Qt by yourself?

        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
        1
        • Axel SpoerlA Axel Spoerl

          Hi,

          looking at the system configuration, nothing shouts out that it's wrong.
          A few questions though:

          • why 6.5.0, not the latest patch release 6.5.6?
          • are you using a normal command line? Or the x64 developer command line from MSVC 2022?
          • has the same issue occurred on the first attempt? Otherwise wipe the build tree and try again.
          • I don't expect much of it, but try just typing "ninja" instead of running cmake directly.
          • is a virus scanner getting in your way in the build directory?
          • does restarting the build lead to exactly the same error messages, or are other files affected with similar error messages each time? => It's a known issue on Windows, that parallel builds cause file access conflicts and you need to start over a few times. That's not your problem, if it's exactly the same files and error messages each time.
          C Offline
          C Offline
          cmcm
          wrote on last edited by cmcm
          #4

          @Axel-Spoerl said in Error during build from source (AutoMOC):

          Hi,

          looking at the system configuration, nothing shouts out that it's wrong.
          A few questions though:

          • why 6.5.0, not the latest patch release 6.5.6?
          • are you using a normal command line? Or the x64 developer command line from MSVC 2022?
          • has the same issue occurred on the first attempt? Otherwise wipe the build tree and try again.
          • I don't expect much of it, but try just typing "ninja" instead of running cmake directly.
          • is a virus scanner getting in your way in the build directory?
          • does restarting the build lead to exactly the same error messages, or are other files affected with similar error messages each time? => It's a known issue on Windows, that parallel builds cause file access conflicts and you need to start over a few times. That's not your problem, if it's exactly the same files and error messages each time.
          1. I’m using version 6.5.0 because I learned that 6.5 is an LTS version.
          2. I’m using the x64 developer command line from MSVC 2022.
          3. The same "Automatic MOC for XXX" error occurs, but for different files each time I try.
          4. I don’t have any virus scanner enabled.
          5. I tried running cmake --build . --parallel 1 again, and although it compiled successfully, it was very slow.

          Perhaps I should accept the fact that parallel builds may lead to temporary errors.

          Christian EhrlicherC jsulmJ 2 Replies Last reply
          0
          • C cmcm has marked this topic as solved on
          • C cmcm

            @Axel-Spoerl said in Error during build from source (AutoMOC):

            Hi,

            looking at the system configuration, nothing shouts out that it's wrong.
            A few questions though:

            • why 6.5.0, not the latest patch release 6.5.6?
            • are you using a normal command line? Or the x64 developer command line from MSVC 2022?
            • has the same issue occurred on the first attempt? Otherwise wipe the build tree and try again.
            • I don't expect much of it, but try just typing "ninja" instead of running cmake directly.
            • is a virus scanner getting in your way in the build directory?
            • does restarting the build lead to exactly the same error messages, or are other files affected with similar error messages each time? => It's a known issue on Windows, that parallel builds cause file access conflicts and you need to start over a few times. That's not your problem, if it's exactly the same files and error messages each time.
            1. I’m using version 6.5.0 because I learned that 6.5 is an LTS version.
            2. I’m using the x64 developer command line from MSVC 2022.
            3. The same "Automatic MOC for XXX" error occurs, but for different files each time I try.
            4. I don’t have any virus scanner enabled.
            5. I tried running cmake --build . --parallel 1 again, and although it compiled successfully, it was very slow.

            Perhaps I should accept the fact that parallel builds may lead to temporary errors.

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @cmcm said in Error during build from source (AutoMOC):

            I’m using version 6.5.0 because I learned that 6.5 is an LTS version.

            There is no advantage for a non-paying customer to stick at a LTS version at all.
            Use the pre-compiled binaries from the Qt online installer - much easier to use and no problems during compilation.

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

            A 1 Reply Last reply
            0
            • C cmcm

              @Axel-Spoerl said in Error during build from source (AutoMOC):

              Hi,

              looking at the system configuration, nothing shouts out that it's wrong.
              A few questions though:

              • why 6.5.0, not the latest patch release 6.5.6?
              • are you using a normal command line? Or the x64 developer command line from MSVC 2022?
              • has the same issue occurred on the first attempt? Otherwise wipe the build tree and try again.
              • I don't expect much of it, but try just typing "ninja" instead of running cmake directly.
              • is a virus scanner getting in your way in the build directory?
              • does restarting the build lead to exactly the same error messages, or are other files affected with similar error messages each time? => It's a known issue on Windows, that parallel builds cause file access conflicts and you need to start over a few times. That's not your problem, if it's exactly the same files and error messages each time.
              1. I’m using version 6.5.0 because I learned that 6.5 is an LTS version.
              2. I’m using the x64 developer command line from MSVC 2022.
              3. The same "Automatic MOC for XXX" error occurs, but for different files each time I try.
              4. I don’t have any virus scanner enabled.
              5. I tried running cmake --build . --parallel 1 again, and although it compiled successfully, it was very slow.

              Perhaps I should accept the fact that parallel builds may lead to temporary errors.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @cmcm said in Error during build from source (AutoMOC):

              I’m using version 6.5.0 because I learned that 6.5 is an LTS version.

              All minor 6.5 versions are LTS (like 6.5.6), not just 6.5.0

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                @cmcm said in Error during build from source (AutoMOC):

                I’m using version 6.5.0 because I learned that 6.5 is an LTS version.

                There is no advantage for a non-paying customer to stick at a LTS version at all.
                Use the pre-compiled binaries from the Qt online installer - much easier to use and no problems during compilation.

                A Offline
                A Offline
                ankou29666
                wrote on last edited by
                #7

                if you want to benefit from an LTS, even with free version of Qt, you have to use the latest minor release available, that is 6.5.6, which brings some bugfixes and security patches.
                If you use 6.5.0, you won't benefit those fixes that have been introduced from 6.5.1 to 6.5.6.
                And it's the same for any version, not only LTS.

                @Christian-Ehrlicher said in Error during build from source (AutoMOC):

                There is no advantage for a non-paying customer to stick at a LTS version at all.

                I personnaly prefer using the latest LTS over latest version when I don't need the new features as new features also come along with potential new bugs and security issues.

                Use the pre-compiled binaries from the Qt online installer - much easier to use and no problems during compilation.

                I agree, self-building is not needed.

                1 Reply Last reply
                0

                • Login

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