Unable to compile Qt because of missing litehtml
-
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. -
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.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 -
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. -
$ 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
-
$ 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
@Tarae
So the include reported missing actually exists.
Is your build tree clean, or could it potentially contain stale legacy CMake files? -
@Tarae
So the include reported missing actually exists.
Is your build tree clean, or could it potentially contain stale legacy CMake files? -
@Tarae
So the include reported missing actually exists.
Is your build tree clean, or could it potentially contain stale legacy CMake files?@Axel-Spoerl before running the configure script my
$buildDir
was empty. -
@Axel-Spoerl , @Tarae
Where in what has been shown does anyqttools/src/assistant/qlitehtml/src/3rdparty/litehtml/include
appear on the include path, e.g. in a-I...
option?@JonB
configure
should 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
qttools
isn'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. -
@JonB
configure
should 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
qttools
isn'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.@Axel-Spoerl my
/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include
directory is empty. Should it include thelitehtml.h
file? Is it expected to be populated after running theconfigure
script, or is it not copied there until the actual build process? -
@Axel-Spoerl my
/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/include
directory is empty. Should it include thelitehtml.h
file? Is it expected to be populated after running theconfigure
script, or is it not copied there until the actual build process?@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. -
@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-Spoerl
You could try to pass-Dlitehtml_DIR=/path/to/local/litehtml
to the compiler and see what it does. -
-
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.