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

make qttools configure more user firendly on windows

    XMLWordPrintable

Details

    Description

      Currently when configure runs on Windows we get

      WARNING:
      QDoc will not be compiled, probably because clang's C and C++ libraries could not be located.
      This means that you cannot build the Qt documentation. You may need to set the CMake variables
      CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation.
      Other than clang's libraries, you may need to install another package, such as clang itself, to
      provide the ClangConfig.cmake file needed to detect your libraries. Once this file is in place,
      the configure script may be able to detect your system-installed libraries without further
      environment variables.
      
      NOTE: You WILL also need to set the FEATURE_clang CMake variable to ON to re-try finding the
      dependencies.
      
      On macOS, you can use Homebrew's llvm package.
      Run `brew install llvm` and then configure with
      
       `configure LLVM_INSTALL_DIR=/opt/homebrew/opt/llvm FEATURE_clang=ON` for macOS arm64
      or
       `configure LLVM_INSTALL_DIR=/usr/local/opt/llvm FEATURE_clang_ON` for macOS x86_64.
      
      On Linux, you can try installing the clang package from your distribution's package manager.
      On Debian / Ubuntu run `sudo apt install libclang-dev`.
      On Fedora / RHEL run `sudo dnf install clang-devel`.
      On ArchLinux run `sudo pacman -S clang llvm`.
      
      Alternatively, you can use the prebuilt binaries hosted by Qt.
      These let you link LLVM/Clang libraries statically, but only support Release builds on Windows.
      https://download.qt.io/development_releases/prebuilt/libclang/qt/
      
      After installing, reconfigure with
      
       `/qt_src/configure FEATURE_clang=ON` for a top-level build that includes the qttools repo
      or
       `/qt_build/qt-configure-module /path/to/qttools FEATURE_clang=ON` for a per-submodule build
      
      WARNING: The Clang-based lupdate parser will not be available. Suitable LLVM and Clang C++ libraries
      s check.
      WARNING: Qt WebEngine And Qt Pdf SBOM generation will be skipped due to missing dependencies.
      

      It is nice to be verbose about ways of installing llvm on mac or linux, however feels like relly unrelated information when you are windows user.

      I see now customer case where this gets missused.

      F:\qt\x>qt-configure-module F:\Qt\Src\qtwebengine -webengine-proprietary-codecs -no-webengine-jumbo-build 1>configure_2025_06_10.txt
      F:\qt\x>qt-configure-module F:\Qt\Src\qtwebengine FEATURE_clang=ON
      

      The output could be done better and show only relevant information.

      Attachments

        For Gerrit Dashboard: QTBUG-137569
        # Subject Branch Project Status CR V

        Activity

          People

            paulwicking Paul Wicking
            michal Michal Klocek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change