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. Qtdeclarative error when compiling the source
QtWS25 Last Chance

Qtdeclarative error when compiling the source

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 757 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.
  • CesarC Offline
    CesarC Offline
    Cesar
    wrote on last edited by Cesar
    #1

    I'm trying to compile Qt 6.6.0 using Visual Studio 2022 Preview, Version 17.10.0 Preview 7.0 (also tried the non preview version)
    but it always fails in something related to qtdeclarative.

    I'm calling the configure.bat on x64 Native Tools Command Prompt for VS 2022 as:

    configure.bat -debug-and-release -platform win32-msvc -opensource -confirm-license -force-debug-info -webengine-proprietary-codecs -feature-vulkan -no-schannel -openssl-linked -prefix "C:\Qt\6.6.0" -- -D OPENSSL_ROOT_DIR="C:\Program Files\OpenSSL"
    

    The build fails with:

    FAILED: qtdeclarative/src/quickcontrols/fusion/.rcc/qmlcache/qtquickcontrols2fusionstyleplugin_qmlcache_loader.cpp C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qmlcache/qtquickcontrols2fusionstyleplugin_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.6.0\qtdeclarative\src\quickcontrols\fusion && C:\Qt\6.6.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_qtquickcontrols2fusionstyleplugin --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qmake_QtQuick_Controls_Fusion.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qtquickcontrols2fusionstyleplugin_raw_qml_0.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qtquickcontrols2fusionstyle.qrc -o C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qmlcache/qtquickcontrols2fusionstyleplugin_qmlcache_loader.cpp @C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/.rcc/qmlcache/qtquickcontrols2fusionstyleplugin_qml_loader_file_list.rsp"
    [7138/19556] Generating .rcc/qmlcache/QuickTest_qmlcache_loader.cpp
    FAILED: qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp C:/Qt/6.6.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.6.0\qtdeclarative\src\qmltest && C:\Qt\6.6.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_QuickTest --resource C:/Qt/6.6.0/qtdeclarative/src/qmltest/.rcc/qmake_QtTest.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/qmltest/.rcc/QuickTest_raw_qml_0.qrc -o C:/Qt/6.6.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp @C:/Qt/6.6.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qml_loader_file_list.rsp"
    [7141/19556] Generating .rcc/qmlcache/qtquickcontrols2basicstyleplugin_qmlcache_loader.cpp
    FAILED: qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_qmlcache_loader.cpp C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.6.0\qtdeclarative\src\quickcontrols\basic && C:\Qt\6.6.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_qtquickcontrols2basicstyleplugin --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qmake_QtQuick_Controls_Basic.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qtquickcontrols2basicstyleplugin_raw_qml_0.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qtquickcontrols2basicstyleplugin.qrc -o C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_qmlcache_loader.cpp @C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_qml_loader_file_list.rsp"
    [7142/19556] Generating .rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qmlcache_loader.cpp
    FAILED: qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qmlcache_loader.cpp C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.6.0\qtdeclarative\src\quickcontrols\fusion\impl && C:\Qt\6.6.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_qtquickcontrols2fusionstyleimplplugin --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qmake_QtQuick_Controls_Fusion_impl.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qtquickcontrols2fusionstyleimplplugin_raw_qml_0.qrc -o C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qmlcache_loader.cpp @C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/fusion/impl/.rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qml_loader_file_list.rsp"
    [7143/19556] Generating .rcc/qmlcache/qtquickcontrols2imaginestyleplugin_qmlcache_loader.cpp
    FAILED: qtdeclarative/src/quickcontrols/imagine/.rcc/qmlcache/qtquickcontrols2imaginestyleplugin_qmlcache_loader.cpp C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qmlcache/qtquickcontrols2imaginestyleplugin_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.6.0\qtdeclarative\src\quickcontrols\imagine && C:\Qt\6.6.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_qtquickcontrols2imaginestyleplugin --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qmake_QtQuick_Controls_Imagine.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qtquickcontrols2imaginestyleplugin_raw_qml_0.qrc --resource C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qmake_qtquickcontrols2imaginestyleplugin.qrc -o C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qmlcache/qtquickcontrols2imaginestyleplugin_qmlcache_loader.cpp @C:/Qt/6.6.0/qtdeclarative/src/quickcontrols/imagine/.rcc/qmlcache/qtquickcontrols2imaginestyleplugin_qml_loader_file_list.rsp"
    [7166/19556] Building CXX object qtdeclarative\src\plugins...rviceFactoryPlugin.dir\Debug\qquickwindowinspector.cpp.obj
    ninja: build stopped: subcommand failed.
    

    Full console log: https://pastebin.com/ttCM8AUw

    I have found two similar topics, this and this.

    The second topic, suggest it could be an issue about ninja and long paths.
    I'm already using a short path, the source is at C:/Qt/6.6.0/, i enabled on regedit LongPathsEnabled
    then reboot and tried a new clean compilation, the error persist.

    In the second topic @cristian-adam mention about also needing a "ninja manifest", see: https://github.com/ninja-build/ninja/pull/2225

    I didnt understand how to "enable" or use this manifest, on my computer i have ninja.exe on two locations:

    C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
    C:\Strawberry\c\bin
    

    I tried adding the ninja.manifest from Cristian commit, in both paths, and performed a new clean compilation, but i continue getting the same error.






    I also get this same error when compiling the 6.7.0 source

    Full log: https://pastebin.com/jrh6GRVQ

    Error:

    [7295/20214] Generating .rcc/qmlcache/QuickTest_qmlcache_loader.cpp
    FAILED: qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp C:/Qt/6.7.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp
    cmd.exe /C "cd /D C:\Qt\6.7.0\qtdeclarative\src\qmltest && C:\Qt\6.7.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.7.0/qtbase/bin/qmlcachegen.exe --resource-name qmlcache_QuickTest -o C:/Qt/6.7.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qmlcache_loader.cpp @C:/Qt/6.7.0/qtdeclarative/src/qmltest/.rcc/qmlcache/QuickTest_qml_loader_file_list.rsp"
    [7324/20214] Building CXX object qtdeclarative\src\quickwidgets\CMakeFiles\QuickWidgets.dir\Debug\cmake_pch.cxx.obj
    ninja: build stopped: subcommand failed.
    
    1 Reply Last reply
    0
    • cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by
      #2

      I can see a few problems:

      1. You have Strawberry Perl installed. It's not needed, and most probably is causing issues.
      2. Use official CMake and Ninja tools.
        I can see that you are using CMake from Strawberry Perl 🫣

      I would suggest uninstalling Strawberry Perl, getting CMake and Ninja either from Qt SDK or via winget install cmake and winget install ninja.

      This has nothing to do with long paths, as you are using a short path.

      1 Reply Last reply
      1
      • CesarC Offline
        CesarC Offline
        Cesar
        wrote on last edited by Cesar
        #3

        @cristian-adam isn't Strawberry Perl needed for compiling QWebEngine?
        When i remove the flag -openssl-linked, it does compile correctly.

        1 Reply Last reply
        0
        • cristian-adamC Offline
          cristian-adamC Offline
          cristian-adam
          wrote on last edited by
          #4

          https://doc.qt.io/qt-6/qtwebengine-platform-notes.html doesn't mention Perl at all.

          In the past when perl was needed for building Qt, I picked up the perl from git, which I already had installed.

          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