Unable to compile Qt because of missing litehtml
-
$ 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
$buildDirwas empty. -
@Axel-Spoerl , @Tarae
Where in what has been shown does anyqttools/src/assistant/qlitehtml/src/3rdparty/litehtml/includeappear on the include path, e.g. in a-I...option?@JonB
configureshould deal with that, and it apparently attempts to do so:-I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/includeAnd 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. -
@JonB
configureshould deal with that, and it apparently attempts to do so:-I/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/includeAnd 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.@Axel-Spoerl my
/opt/foo/qt_build/qttools/src/assistant/qlitehtml/src/qlitehtml_autogen/includedirectory is empty. Should it include thelitehtml.hfile? Is it expected to be populated after running theconfigurescript, 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/includedirectory is empty. Should it include thelitehtml.hfile? Is it expected to be populated after running theconfigurescript, 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/litehtmlto the compiler and see what it does. -
K KBentley57 referenced this topic on
-
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.
-
Similar issue for Qt 6.8.3 on MacOS Tahoe 26.1, except the missing file is
litehtml/html.h.In my case
litehtmlis indeed installed locally (its a dependency ofoctaveapparently, perhaps transitively viapyqt). And the missing file actually seems to exist at/opt/homebrew/include/litehtml/html.h. But for whatever reason the search path doesn't include the top level folder.I noticed there's an option to ignore the system
litehtml, albeit without a convenient-FEATUREflag. Even adding-DQLITEHTML_USE_SYSTEM_LITEHTML=OFFto theconfigureinvocation doesn't seem to do it. So I hacked it in by modifying the line inCMakeCache.txtafter runningconfigure:QLITEHTML_USE_SYSTEM_LITEHTML:BOOL=OFF