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

qttools module does not configure on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 6.4.0
    • Build System: CMake
    • None
    • Windows
    • I used a wrong CMake version

    Description

      I am not sure if this a bug or something else, but at least in my environment on my Windows10 machine the following configuration script:

      "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64
           
      set "CMAKE_ROOT=C:\dev\PFiles\cmake-3.24.0-rc4-windows-x86_64\bin"
      set "NINJA_ROOT=C:\dev\PFiles\ninja-win"
      set "PERL_ROOT=C:\dev\PFiles\Strawberry\perl\bin"
           
      set PATH=%CMAKE_ROOT%;%PATH%
      set PATH=%NINJA_ROOT%;%PATH%
      set PATH=%PERL_ROOT%;%PATH%
      set PATH=C:\dev\PFiles\Python35;%PATH%
           
      rem Check if the tools are in PATH
      where perl.exe
      where python.exe
      where cmake.exe
      where ninja.exe
           
      set MY_QT_SRC_DIR=C:\dev\repos\qt-everywhere-src-6.4.0
      set "MY_INSTALL_PATH=C:/dev/libs/Qt6.4/windows"
      set CL=/MP
       
      %MY_QT_SRC_DIR%\configure.bat -prefix %MY_INSTALL_PATH% -DQT_NO_EXCEPTIONS=1 -debug-and-release -force-debug-info -platform win32-msvc -opensource -confirm-license ^
        -c++std c++20 -static -static-runtime -I "C:/Program Files/OpenSSL/include" -L "C:/Program Files/OpenSSL/lib" -openssl-linked ^
        -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity ^
        -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua ^
        -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects ^
        -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland ^
        -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech
      

      fails with the following errors:

      Qt is now configured for building. Just run 'cmake --build . --parallel'
       
      Once everything is built, you must run 'ninja install'
      Qt will be installed into 'C:/dev/libs/Qt6.4/windows'
       
      To configure and build other Qt modules, you can use the following convenience script:
              C:/dev/libs/Qt6.4/windows/bin/qt-configure-module.bat
       
      If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
       
      g C++ libraries have not been found.
      You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
       
      -- Configuring done
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was
        found in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Right.ui was found
        in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was
        found in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Right.ui was found
        in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was
        found in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Right.ui was found
        in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was
        found in the sources for target Designer.
       
       
      CMake Error in qttools/src/designer/src/lib/CMakeLists.txt:
        More than one .ui file with the name Dialog_with_Buttons_Right.ui was found
        in the sources for target Designer.
       
       
      -- Generating done
      CMake Generate step failed.  Build files cannot be regenerated correctly.
      CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
        CMake exited with code 1.
      

      On my machine the workaround is to comment repeating Dialog_with_Buttons_Bottom.ui in qt-everywhere-src-6.4.0\qttools\src\designer\src\lib\CMakeLists.txt out:

      set(shared_resource_files
          "shared/defaultgradients.xml"
          "shared/icon-naming-spec.txt"
          #"shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui"
          #"shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui"
          #"shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui"
          #"shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui"
          #"shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui"
          #"shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui"
          #"shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui"
          #"shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui"
          "shared/templates/forms/Dialog_with_Buttons_Bottom.ui"
          "shared/templates/forms/Dialog_with_Buttons_Right.ui"
          "shared/templates/forms/Dialog_without_Buttons.ui"
          "shared/templates/forms/Main_Window.ui"
          "shared/templates/forms/Widget.ui"
      )
      

      On Linux and MacOS I have not seen this error.

      Versions of my build tools:

      C:\dev\build\qt>python.exe --version
      Python 3.5.4
       
      C:\dev\build\qt>cmake.exe --version
      cmake version 3.24.0-rc4
       
      CMake suite maintained and supported by Kitware (kitware.com/cmake).
       
      C:\dev\build\qt>ninja.exe --version
      1.11.1
       
      C:\dev\build\qt>perl.exe --version
       
      This is perl 5, version 28, subversion 0 (v5.28.0) built for MSWin32-x64-multi-thread
      

       

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            dmitriano Dmitry Efimov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes