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. Unable to compile Qt because of missing litehtml
Forum Updated to NodeBB v4.3 + New Features

Unable to compile Qt because of missing litehtml

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 6 Posters 1.2k Views 1 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.
  • T Tarae

    Hello,

    On my Debian 12.2 system, I am attempting to compile Qt. I have installed all the dependencies as outlined in the documentation at https://doc.qt.io/qt-6/build-sources.html.

    After that, I executed the following commands:

    sourceDir=/opt/foo/qt_source
    buildDir=/opt/foo/qt_build
    installDir=/opt/foo/qt6.6.1-gcc-deb12
    
    mkdir -p "$sourceDir" "$buildDir" "$installDir"
    
    # get qt
    cd "$sourceDir"
    wget https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz
    tar xf qt-everywhere-src-6.6.1.tar.xz
    
    # configure
    cd "$buildDir"
    configureScript=${sourceDir}/qt-everywhere-src-6.6.1/configure
    $configureScript -prefix "$installDir" -release -sql-psql
     
    #build
    cmake --build . --parallel
    

    However, my build encountered an error with the following message:

    [44/3358] Building CXX object qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o
    FAILED: qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o 
    /usr/bin/c++ -DQLITEHTML_STATIC_LIBRARY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_JAVA_STYLE_ITERATORS -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include -I/opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src -I/opt/foo/qt_build/qtbase/include -I/opt/foo/qt_build/qtbase/include/QtWidgets -I/opt/foo/qt_build/qtbase/include/QtCore -I/opt/foo/qt_source/qt-everywhere-src-6.6.1/qtbase/mkspecs/linux-g++ -I/opt/foo/qt_build/qtbase/include/QtGui -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -w -fPIC -std=c++17 -MD -MT qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o -MF qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o.d -o qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o -c /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter.cpp
    In file included from /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter.cpp:5:
    /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter_p.h:8:10: fatal error: litehtml.h: No such file or directory
        8 | #include <litehtml.h>
          |          ^~~~~~~~~~~~
    compilation terminated.
    [49/3358] Building CXX object qttools/src/designer/src/components/lib/CMakeFiles/DesignerComponentsPrivate.dir/cmake_pch.hxx.gch
    ninja: build stopped: subcommand failed.
    

    I have confirmed that I have the 'litehtml' packages installed:

    $ apt install liblitehtml-dev liblitehtml0
    liblitehtml-dev is already the newest version (0.6-1).
    liblitehtml0 is already the newest version (0.6-1).
    

    Do you have any ideas on what might be causing this issue and how to solve it?
    Thank you for your help.

    Axel SpoerlA Offline
    Axel SpoerlA Offline
    Axel Spoerl
    Moderators
    wrote on last edited by
    #2

    Good morning @Tarae,

    something is wrong with the Qt installation.
    litehtml should be included in the qttools submodule, as a 3rd party library.

    What does
    ll $sourceDir/qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include
    say?

    Cheers
    Axel

    Software Engineer
    The Qt Company, Oslo

    1 Reply Last reply
    0
    • T Tarae

      Hello,

      On my Debian 12.2 system, I am attempting to compile Qt. I have installed all the dependencies as outlined in the documentation at https://doc.qt.io/qt-6/build-sources.html.

      After that, I executed the following commands:

      sourceDir=/opt/foo/qt_source
      buildDir=/opt/foo/qt_build
      installDir=/opt/foo/qt6.6.1-gcc-deb12
      
      mkdir -p "$sourceDir" "$buildDir" "$installDir"
      
      # get qt
      cd "$sourceDir"
      wget https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz
      tar xf qt-everywhere-src-6.6.1.tar.xz
      
      # configure
      cd "$buildDir"
      configureScript=${sourceDir}/qt-everywhere-src-6.6.1/configure
      $configureScript -prefix "$installDir" -release -sql-psql
       
      #build
      cmake --build . --parallel
      

      However, my build encountered an error with the following message:

      [44/3358] Building CXX object qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o
      FAILED: qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o 
      /usr/bin/c++ -DQLITEHTML_STATIC_LIBRARY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_JAVA_STYLE_ITERATORS -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include -I/opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src -I/opt/foo/qt_build/qtbase/include -I/opt/foo/qt_build/qtbase/include/QtWidgets -I/opt/foo/qt_build/qtbase/include/QtCore -I/opt/foo/qt_source/qt-everywhere-src-6.6.1/qtbase/mkspecs/linux-g++ -I/opt/foo/qt_build/qtbase/include/QtGui -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -w -fPIC -std=c++17 -MD -MT qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o -MF qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o.d -o qttools/src/assistant/qlitehtml/src/CMakeFiles/qlitehtml.dir/container_qpainter.cpp.o -c /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter.cpp
      In file included from /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter.cpp:5:
      /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/container_qpainter_p.h:8:10: fatal error: litehtml.h: No such file or directory
          8 | #include <litehtml.h>
            |          ^~~~~~~~~~~~
      compilation terminated.
      [49/3358] Building CXX object qttools/src/designer/src/components/lib/CMakeFiles/DesignerComponentsPrivate.dir/cmake_pch.hxx.gch
      ninja: build stopped: subcommand failed.
      

      I have confirmed that I have the 'litehtml' packages installed:

      $ apt install liblitehtml-dev liblitehtml0
      liblitehtml-dev is already the newest version (0.6-1).
      liblitehtml0 is already the newest version (0.6-1).
      

      Do you have any ideas on what might be causing this issue and how to solve it?
      Thank you for your help.

      andrA Offline
      andrA Offline
      andr
      wrote on last edited by
      #3

      @Tarae : is the src/assistant/qlitehtml git submodule checked out?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tarae
        wrote on last edited by
        #4
        $ ls -la /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include/
        drwxr-xr-x 2 root root 4096 Nov 20 12:56 litehtml
        -rw-r--r-- 1 root root  214 Nov 20 12:56 litehtml.h
        -rw-r--r-- 1 root root 4118 Nov 20 12:56 master.css
        
        Axel SpoerlA 1 Reply Last reply
        0
        • T Tarae
          $ ls -la /opt/foo/qt_source/qt-everywhere-src-6.6.1/qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include/
          drwxr-xr-x 2 root root 4096 Nov 20 12:56 litehtml
          -rw-r--r-- 1 root root  214 Nov 20 12:56 litehtml.h
          -rw-r--r-- 1 root root 4118 Nov 20 12:56 master.css
          
          Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #5

          @Tarae
          So the include reported missing actually exists.
          Is your build tree clean, or could it potentially contain stale legacy CMake files?

          Software Engineer
          The Qt Company, Oslo

          JonBJ T 2 Replies Last reply
          0
          • Axel SpoerlA Axel Spoerl

            @Tarae
            So the include reported missing actually exists.
            Is your build tree clean, or could it potentially contain stale legacy CMake files?

            JonBJ Online
            JonBJ Online
            JonB
            wrote on last edited by
            #6

            @Axel-Spoerl , @Tarae
            Where in what has been shown does any qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include appear on the include path, e.g. in a -I... option?

            Axel SpoerlA 1 Reply Last reply
            0
            • Axel SpoerlA Axel Spoerl

              @Tarae
              So the include reported missing actually exists.
              Is your build tree clean, or could it potentially contain stale legacy CMake files?

              T Offline
              T Offline
              Tarae
              wrote on last edited by
              #7

              @Axel-Spoerl before running the configure script my $buildDir was empty.

              1 Reply Last reply
              0
              • JonBJ JonB

                @Axel-Spoerl , @Tarae
                Where in what has been shown does any qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include appear on the include path, e.g. in a -I... option?

                Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #8

                @JonB
                configureshould deal with that, and it apparently attempts to do so:

                -I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include
                

                And that's about where the include is located in my own toplevel build, which builds nicely. So qttoolsisn't properly installed, broken or disturbed by legacy files in the build tree. If the error persists with a completely clean build tree, there might be a bug in the snapshot.

                Software Engineer
                The Qt Company, Oslo

                T 1 Reply Last reply
                0
                • Axel SpoerlA Axel Spoerl

                  @JonB
                  configureshould deal with that, and it apparently attempts to do so:

                  -I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include
                  

                  And that's about where the include is located in my own toplevel build, which builds nicely. So qttoolsisn't properly installed, broken or disturbed by legacy files in the build tree. If the error persists with a completely clean build tree, there might be a bug in the snapshot.

                  T Offline
                  T Offline
                  Tarae
                  wrote on last edited by
                  #9

                  @Axel-Spoerl my /opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include directory is empty. Should it include the litehtml.h file? Is it expected to be populated after running the configure script, or is it not copied there until the actual build process?

                  Axel SpoerlA 1 Reply Last reply
                  0
                  • T Tarae

                    @Axel-Spoerl my /opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include directory is empty. Should it include the litehtml.h file? Is it expected to be populated after running the configure script, or is it not copied there until the actual build process?

                    Axel SpoerlA Offline
                    Axel SpoerlA Offline
                    Axel Spoerl
                    Moderators
                    wrote on last edited by
                    #10

                    @Tarae
                    At least, this is the location, where CMake tells the compiler to search for it.
                    Something is broken here, but I don't have a 6.6.1 build with qttools handy.

                    Software Engineer
                    The Qt Company, Oslo

                    Axel SpoerlA 1 Reply Last reply
                    0
                    • Axel SpoerlA Axel Spoerl

                      @Tarae
                      At least, this is the location, where CMake tells the compiler to search for it.
                      Something is broken here, but I don't have a 6.6.1 build with qttools handy.

                      Axel SpoerlA Offline
                      Axel SpoerlA Offline
                      Axel Spoerl
                      Moderators
                      wrote on last edited by
                      #11

                      @Axel-Spoerl
                      You could try to pass -Dlitehtml_DIR=/path/to/local/litehtmlto the compiler and see what it does.

                      Software Engineer
                      The Qt Company, Oslo

                      1 Reply Last reply
                      0
                      • K KBentley57 referenced this topic on
                      • J Offline
                        J Offline
                        JonH
                        wrote on last edited by JonH
                        #12

                        I know this thread is a few months old but my solution was to remove the liblitehtml-dev package from the system. Having this package installed appears to confuse the Qt6 build process (Qt 6.6.3 in my instance). Removing this package enabled me to successfully run the Qt6 build process using the internally provided litehtml library.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          drwho 0
                          wrote on last edited by drwho 0
                          #13

                          I ran into this issue with Qt6.7 (Debian 12). Uninstalling liblitehtml-dev also fixed building in Qt6.7. Oddly, I was able to build Qt 6.6.3 with liblitehtml-dev installed. Thanks for posting this solution.

                          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