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

QDoc and documentation aren't built, despite LLVM being present and advertised

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.15.0
    • Build tools: qdoc
    • None
    • Mac OS 10.15.5
    • macOS

    Description

      In investigating why no examples are shown in my Qt Creator installation, I discovered that QDoc doesn't exist in my Qt build. It's not built by "make docs" either.

      Running configure in the source root yields:

      WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
      Either ensure that llvm-config is in your PATH environment variable, or set 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.

      But I have all that set up. I have Homebrew's LLVM and the LLVM_INSTALL_DIR environment variable set. I've verified that at the command line.

      Examining qt-everywhere-src-5.15.0/qttools/src/qdoc/configure.pri and the logic starting around line 40 (defineTest(qtConfTest_libclang)), everything seems to check out on my system. For example, it looks for the Clang install dir here:

      macos {

      1. Default to homebrew llvm on macOS. The CLANG_VERSION test below will complain if missing.
        clangInstallDir = $$system("brew --prefix llvm")

      And if I execute that brew command myself, I get the correct path. llvm_config, libclang... everything seems to be where it's supposed to.

      The configure summary output shows the compiler as the Xcode version of Clang (11) instead of the Homebrew one under the LLVM installation that's exposed by environment variables (10); I don't know why, or if that's significant in this situation:

      Configure summary:
      Build type: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
      Compiler: clang (Apple) 11.0.3

      I've attached the output of the configure script. I tried adding a log statement to qdoc/configure.pri, but I don't know where the QtLog statements in that file send their output.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              ghs Gavin Stokes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes