Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Why isn't QDoc (and thus the docs) being built?
Forum Updated to NodeBB v4.3 + New Features

Why isn't QDoc (and thus the docs) being built?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 3 Posters 4.5k Views 2 Watching
  • 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.
  • JKSHJ Online
    JKSHJ Online
    JKSH
    Moderators
    wrote on last edited by
    #2

    Qt checks at configure time if it can build QDoc or not. If the check fails, then the necessary lines for building QDoc won't appear in the Makefile.

    Have a look in your build root directory for a file called configure.summary. My last build used this configuration:

    Qt Tools:
      QDoc ................................... yes
    

    If you get a no for QDoc then you must clean your build directory, re-configure, and re-build.

    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

    1 Reply Last reply
    1
    • StokestackS Offline
      StokestackS Offline
      Stokestack
      wrote on last edited by Stokestack
      #3

      Thanks for that info. There's no configure.summary file in the source root or the Qt build-product root.

      I can't even rebuild because I don't know why the doc wasn't built in the first place (considering that I had the LLVM path exported).

      And so you're saying the documentation is wrong, where it says that QDoc will be built if you do "make docs?"

      JKSHJ 1 Reply Last reply
      0
      • StokestackS Stokestack

        Thanks for that info. There's no configure.summary file in the source root or the Qt build-product root.

        I can't even rebuild because I don't know why the doc wasn't built in the first place (considering that I had the LLVM path exported).

        And so you're saying the documentation is wrong, where it says that QDoc will be built if you do "make docs?"

        JKSHJ Online
        JKSHJ Online
        JKSH
        Moderators
        wrote on last edited by
        #4

        @Stokestack said in Why isn't QDoc being built?:

        There's no configure.summary file in the source root or the Qt build-product root.

        How did you configure and build Qt 5.15.0?

        And so you're saying the documentation is wrong, where it says that QDoc will be built if you do "make docs?"

        I can't say for sure as it works fine for me (on Windows) and I haven't looked at the QDoc source code in a long time.

        For now, try to build QDoc manually. Scroll down further on the wiki and you'll find these steps:

        cd qt5/qtdeclarative/src
        make sub-qmldevtools
        
        cd qt5/qttools/src
        make sub-qdoc
        

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        StokestackS 1 Reply Last reply
        0
        • JKSHJ JKSH

          @Stokestack said in Why isn't QDoc being built?:

          There's no configure.summary file in the source root or the Qt build-product root.

          How did you configure and build Qt 5.15.0?

          And so you're saying the documentation is wrong, where it says that QDoc will be built if you do "make docs?"

          I can't say for sure as it works fine for me (on Windows) and I haven't looked at the QDoc source code in a long time.

          For now, try to build QDoc manually. Scroll down further on the wiki and you'll find these steps:

          cd qt5/qtdeclarative/src
          make sub-qmldevtools
          
          cd qt5/qttools/src
          make sub-qdoc
          
          StokestackS Offline
          StokestackS Offline
          Stokestack
          wrote on last edited by Stokestack
          #5

          @JKSH I followed the steps for the Mac OS here.

          Following steps farther down the page as you suggest, I get here and it fails:

          /qt-everywhere-src-5.15.0/qttools/src % make sub-qdoc
          make: *** No rule to make target `sub-qdoc'. Stop.

          JKSHJ 1 Reply Last reply
          0
          • StokestackS Stokestack

            @JKSH I followed the steps for the Mac OS here.

            Following steps farther down the page as you suggest, I get here and it fails:

            /qt-everywhere-src-5.15.0/qttools/src % make sub-qdoc
            make: *** No rule to make target `sub-qdoc'. Stop.

            JKSHJ Online
            JKSHJ Online
            JKSH
            Moderators
            wrote on last edited by
            #6

            @Stokestack said in Why isn't QDoc being built?:

            make: *** No rule to make target `sub-qdoc'. Stop.

            I'm guessing that your configure script decided that it can't build QDoc so it didn't put QDoc in the Makefiles, like I described before.

            I'm not sure why you didn't get a configure summary file, but you can capture it yourself:

            ./configure > config.log

            Look through the log and see what it says about QDoc.

            Note: To be safe, clean out your build directory before you run configure again. If you downloaded the source code as a zip file, delete the whole folder or extract a pristine copy of the code into a different folder. If you used git to clone the Qt repos, run this to remove all generated files:

            git clean -dfx && git submodule foreach "git clean -dfx"

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            1
            • StokestackS Offline
              StokestackS Offline
              Stokestack
              wrote on last edited by Stokestack
              #7

              Thanks. All I see in the log file is this:

              loaded result for config test config.qttools_qdoc.tests.libclang
              test config.qttools_qdoc.tests.libclang FAILED

              But the console output says:

              WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

              But clang is available:

              /usr/local/opt/llvm/bin % which clang
              /usr/local/opt/llvm/bin/clang

              JKSHJ 1 Reply Last reply
              0
              • StokestackS Stokestack

                Thanks. All I see in the log file is this:

                loaded result for config test config.qttools_qdoc.tests.libclang
                test config.qttools_qdoc.tests.libclang FAILED

                But the console output says:

                WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

                But clang is available:

                /usr/local/opt/llvm/bin % which clang
                /usr/local/opt/llvm/bin/clang

                JKSHJ Online
                JKSHJ Online
                JKSH
                Moderators
                wrote on last edited by
                #8

                @Stokestack said in Why isn't QDoc being built?:

                loaded result for config test config.qttools_qdoc.tests.libclang
                test config.qttools_qdoc.tests.libclang FAILED

                This test is specified at https://github.com/qt/qttools/blob/5.15.0/src/qdoc/configure.json

                I'm not 100% sure how it works or what exactly is failing in your tests, but perhaps those variable names might provide a clue.

                But the console output says:

                WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

                But clang is available:

                /usr/local/opt/llvm/bin % which clang
                /usr/local/opt/llvm/bin/clang

                Which version? If it's version 10.0, does it help if you install an older version instead (say, v6.0.1?

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                StokestackS 1 Reply Last reply
                0
                • JKSHJ JKSH

                  @Stokestack said in Why isn't QDoc being built?:

                  loaded result for config test config.qttools_qdoc.tests.libclang
                  test config.qttools_qdoc.tests.libclang FAILED

                  This test is specified at https://github.com/qt/qttools/blob/5.15.0/src/qdoc/configure.json

                  I'm not 100% sure how it works or what exactly is failing in your tests, but perhaps those variable names might provide a clue.

                  But the console output says:

                  WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

                  But clang is available:

                  /usr/local/opt/llvm/bin % which clang
                  /usr/local/opt/llvm/bin/clang

                  Which version? If it's version 10.0, does it help if you install an older version instead (say, v6.0.1?

                  StokestackS Offline
                  StokestackS Offline
                  Stokestack
                  wrote on last edited by Stokestack
                  #9

                  @JKSH Thanks for that. I had searched for the "QDoc will not be compiled" string, but my search utility stupidly defaulted to excluding tons of file types.

                  The Clang in the Brew-installed LLVM structure is version 10. Interestingly, the one in Xcode is version 11.

                  I'm leery of downgrading it, and don't really know the proper way of going about it. configure.pri contains references up to version 9, and the only check on version numbers is to ensure that the current version is at least 3.9.0.

                  Looking through the logic of this file, everything seems OK. It should be getting the correct LLVC/Clang directories from this:

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

                  I executed that command, and it returns the right result... BUT, the console output of configure says it's using the wrong Clang:

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

                  I wonder why that is. Where does the output from the QtLog statements in qttools/src/qdoc/configure.pri go? I don't see them in the console or if I send the output of configure to a log file.

                  JKSHJ 1 Reply Last reply
                  0
                  • StokestackS Stokestack

                    @JKSH Thanks for that. I had searched for the "QDoc will not be compiled" string, but my search utility stupidly defaulted to excluding tons of file types.

                    The Clang in the Brew-installed LLVM structure is version 10. Interestingly, the one in Xcode is version 11.

                    I'm leery of downgrading it, and don't really know the proper way of going about it. configure.pri contains references up to version 9, and the only check on version numbers is to ensure that the current version is at least 3.9.0.

                    Looking through the logic of this file, everything seems OK. It should be getting the correct LLVC/Clang directories from this:

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

                    I executed that command, and it returns the right result... BUT, the console output of configure says it's using the wrong Clang:

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

                    I wonder why that is. Where does the output from the QtLog statements in qttools/src/qdoc/configure.pri go? I don't see them in the console or if I send the output of configure to a log file.

                    JKSHJ Online
                    JKSHJ Online
                    JKSH
                    Moderators
                    wrote on last edited by
                    #10

                    @Stokestack said in Why isn't QDoc (and thus the docs) being built?:

                    The Clang in the Brew-installed LLVM structure is version 10. Interestingly, the one in Xcode is version 11.

                    Interesting. LLVM 11 isn't even released yet on the official LLVM website...

                    Looking through the logic of this file, everything seems OK. It should be getting the correct LLVC/Clang directories from this:

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

                    I executed that command, and it returns the right result... BUT, the console output of configure says it's using the wrong Clang:

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

                    I wonder why that is.

                    It looks like the Homebrew installation of LLVM is only used if LLVM_INSTALL_DIR is not set? The full logic is

                    LLVM_INSTALL_DIR = $$clean_path($$LLVM_INSTALL_DIR)
                    
                    contains(QMAKE_HOST.arch, x86_64): \
                    	clangInstallDir = $$replace(LLVM_INSTALL_DIR, _ARCH_, 64)
                    else: \
                    	clangInstallDir = $$replace(LLVM_INSTALL_DIR, _ARCH_, 32)
                    isEmpty(LLVM_INSTALL_DIR) {
                    	win32 {
                    		return(false)
                    	}
                    	macos {
                    		# Default to homebrew llvm on macOS. The CLANG_VERSION test below will complain if missing.
                    		clangInstallDir = $$system("brew --prefix llvm")
                    	} else {
                    		clangInstallDir = /usr
                    	}
                    }
                    

                    Which copy of LLVM does your LLVM_INSTALL_DIR point to? What happens if you unset that variable?

                    Where does the output from the QtLog statements in qttools/src/qdoc/configure.pri go? I don't see them in the console or if I send the output of configure to a log file.

                    Good question. I don't know, but I would've expected it to go to stdout or stderr

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Michaelis
                      wrote on last edited by
                      #11

                      Is this still unresolved? I cannot build the docs either, just get "make[4]: Nothing to be done for 'prepare_docs'." all the way. No matter if i make docs or make html_docs.

                      And config.summary shows the following:

                      Qt Tools:
                        QDoc ................................... yes
                      

                      Somehow Arch manages to build the docs with the build script below. Not sure how but can it be something about the dependencies?

                      pkgbase=qt5-doc
                      pkgname=(qt5-doc qt5-examples)
                      _basever=5.15.8
                      pkgver=$_basever
                      pkgrel=1
                      arch=('any')
                      url='https://www.qt.io'
                      license=('GPL3' 'LGPL3' 'FDL' 'custom')
                      makedepends=('qt5-tools' 'python' 'pciutils' 'libxtst' 'libxcursor' 'libxrandr' 'libxss' 'libxcomposite' 'libxkbfile'
                                   'gperf' 'nss' 'clang' 'nodejs')
                      groups=('qt' 'qt5')
                      _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
                      source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz"
                               qt5-webengine-python3.patch
                               no-qmake.patch)
                      sha256sums=('776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9'
                                  '398c996cb5b606695ac93645143df39e23fa67e768b09e0da6dbd37342a43f32'
                                  '7893df4981d6611c5aaeb4cc69bc77d14b4251842b205591a563f9a7184dfb0a')
                      
                      prepare() {
                        cd ${_pkgfqn/opensource-/}
                      
                        ln -s /usr/bin qttools/
                        ln -s /usr/bin/{rcc,uic,moc,qmake} qtbase/bin/
                      
                        patch -d qtbase -p1 < "$srcdir"/no-qmake.patch # Use system qmake
                        patch -d qtwebengine -p1 < "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
                      }
                      
                      build() {
                        cd ${_pkgfqn/opensource-/}
                      
                        ./configure -confirm-license -opensource \
                          -prefix /usr \
                          -docdir /usr/share/doc/qt \
                          -headerdir /usr/include/qt \
                          -archdatadir /usr/lib/qt \
                          -datadir /usr/share/qt \
                          -sysconfdir /etc/xdg \
                          -nomake examples
                        make docs
                      }
                      
                      package_qt5-doc() {
                        pkgdesc='A cross-platform application and UI framework (Documentation)'
                        depends=('qt5-base')
                      
                        cd ${_pkgfqn/opensource-/}
                        make INSTALL_ROOT="$pkgdir" install_docs
                      
                        install -d "$pkgdir"/usr/share/licenses
                        ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
                      }
                      
                      package_qt5-examples() {
                        pkgdesc='Examples and demos from qt5 documentation'
                        depends=('qt5-doc')
                      
                        _base="$pkgdir"/usr/share/doc/qt/examples
                      
                        # The various example dirs have conflicting .pro files, but
                        # QtCreator requires them to be in the same top-level directory.
                        # Matching the Qt5 installer, only the qtbase project is kept.
                        mkdir -p $_base
                        cp ${_pkgfqn/opensource-/}/qtbase/examples/examples.pro $_base
                      
                        _fdirs=$(find "${_pkgfqn/opensource-/}" -maxdepth 2 -type d -name examples)
                        for _dir in $_fdirs; do
                            _mod=$(basename ${_dir%/examples})
                      
                            if [ -e "$_dir/README" ]; then
                              cp $_dir/README $_dir/README.$_mod
                            fi
                      
                      #     mkdir $_base/$_mod
                            cp -rn $_dir/* $_base
                        done
                      }
                      
                      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