Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

254.12. qt6-qtwebengine-6.11.2

Qt 6 WebEngine and Qt PDF — the Chromium web engine as Qt widgets and Qt Quick types

Version 6.11.2, release 3
Shelf qt6 — The Qt 6 modules, and everything in `group = qt6`
Phase 43_toolkits (Toolkits), 24 of 344 in build order
Licence (LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
Homepage https://www.qt.io/
Build time 212.0 SBU
Installed size 227.6 MiB in 503 files
Recipe ports/core/qt6/qt6-qtwebengine/kpkgbuild

About

Qt WebEngine is Chromium’s web engine wrapped as Qt 6 modules: QtWebEngineCore, the QWebEngineView widget and the WebEngineView Qt Quick type, with the QtWebEngineProcess helper that runs each page’s renderer. The same build produces Qt PDF, Chromium’s PDF renderer as the QtPdf and QtPdfWidgets libraries and their Qt Quick types. Qt applications that show web content, help pages or PDFs link it, and the Python bindings are python3-pyqt6-webengine.

The Chromium source is bundled inside the Qt release archive, under src/3rdparty/chromium, and is built by its own GN and ninja run inside Qt’s CMake build. Unlike every other qt6-* module, this port follows Qt WebEngine’s own release schedule and is built against whichever qt6-qtbase the set is at (see How Qt 6 is built).

Why it is in KDOS

The comment above it in script/phases/43_toolkits/packages.d/qt6.txt:

Chromium inside Qt, for the web views of Calibre, kiwix-desktop, GoldenDict-ng, Falkon and the rest.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, python3, python3-html5lib, nodejs, gperf, bison, flex, perl, qt6-qtbase, qt6-qtdeclarative, qt6-qtwebchannel, qt6-qtpositioning, qt6-qttools, nss, nspr, dbus, glib, icu, fontconfig, freetype2, harfbuzz, libjpeg-turbo, libpng, libtiff, libwebp, openjpeg, opus, lcms2, zlib, minizip, pciutils, eudev, alsa-lib, libpulse, pipewire, krb5, libva, libdrm, mesa, vulkan-headers, cups, libxkbcommon, libxkbfile, libxcb, libX11, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, libxshmfence, xorgproto.

Required by (36): akregator, angelfish, arianna, calibre, calligra, cantor, digikam, falkon, ghostwriter, goldendict-ng, grantlee-editor, kaccounts-providers, kalgebra, kdepim-addons, kdepim-runtime, kdevelop, khelpcenter, kimagemapeditor, kiwix-desktop, kmail, konqueror, kontact, ktorrent, libksieve, marble, messagelib, python3-pyqt6-webengine, python3-pyside6, qgis, qmapshack, qt6-qtwebview, qutebrowser, rkward, signon-ui, skanpage, zeal.

Patches

build.sh applies these; kpkg applies nothing by itself.

userns-probe-no-malloc.patch is KDOS’s own and is to be offered to Chromium, and to Alpine, whose musl build carries the same probe. The probe runs in the process that hosts Qt WebEngine, such as plasmashell or a KDE application with an embedded web page, so without the patch that process can hang at start.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install qt6-qtwebengine'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/qt6/qt6-qtwebengine.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/qt6/qt6-qtwebengine
echo '6101c1aa00ff933d1b65ee5d167f76e8d71b9ac5b378b0111277723ebda7c163  qt6-qtwebengine-6.11.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/qt6-qtwebengine
SRC=$SRC_ROOT/qt6-qtwebengine-6.11.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qt6-qtwebengine-6.11.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _module, group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

for p in 0001-Enable-building-on-musl 0002-temp-failure-retry \
	0003-qt-musl-mallinfo 0004-qt-musl-resolve \
	0005-qtwebengine-missing-include 0006-no-execinfo 0007-musl-sandbox \
	0008-missing-includes gcc13 no-sandbox-settls systypes fstatat-32bit \
	devtools-frontend-compress_files cr140-musl-prctl no-simd-fallback-fix; do
	patch -p1 -i "$PORT_SRC/$p.patch"
done
patch -p1 -i "$PORT_SRC/gn-cstdint.patch"
patch -p1 -i "$PORT_SRC/gn-ldflags.patch"
patch -p1 -i "$PORT_SRC/sandbox-path-max.patch"
patch -p1 -i "$PORT_SRC/userns-probe-no-malloc.patch"
export CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
export CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
export NINJAFLAGS="$MAKEFLAGS"
export NODEJS_EXECUTABLE=/usr/bin/node
mkdir build && cd build
cmake .. -G Ninja -Wno-dev \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DQT_BUILD_TESTS=OFF \
	-DQT_BUILD_EXAMPLES=OFF \
	-DFEATURE_qtwebengine_build=ON \
	-DFEATURE_qtpdf_build=ON \
	-DFEATURE_webengine_build_gn=ON \
	-DFEATURE_webengine_rust_build=OFF \
	-DFEATURE_webengine_jumbo_build=8 \
	-DFEATURE_webengine_developer_build=OFF \
	-DFEATURE_webengine_full_debug_info=OFF \
	-DFEATURE_webengine_embedded_build=OFF \
	-DFEATURE_webenginedriver=OFF \
	-DFEATURE_webengine_ozone_x11=ON \
	-DFEATURE_webengine_vulkan=ON \
	-DFEATURE_webengine_vaapi=ON \
	-DFEATURE_webengine_system_gbm=ON \
	-DFEATURE_webengine_system_alsa=ON \
	-DFEATURE_webengine_system_pulseaudio=ON \
	-DFEATURE_webengine_webrtc=ON \
	-DFEATURE_webengine_webrtc_pipewire=ON \
	-DFEATURE_webengine_webrtc_system_openh264=OFF \
	-DFEATURE_webengine_proprietary_codecs=ON \
	-DFEATURE_webengine_printing_and_pdf=ON \
	-DFEATURE_webengine_pepper_plugins=ON \
	-DFEATURE_webengine_spellchecker=ON \
	-DFEATURE_webengine_extensions=ON \
	-DFEATURE_webengine_geolocation=ON \
	-DFEATURE_webengine_webchannel=ON \
	-DFEATURE_webengine_kerberos=ON \
	-DFEATURE_webengine_v8_context_snapshot=ON \
	-DFEATURE_webengine_system_icu=ON \
	-DFEATURE_webengine_system_glib=ON \
	-DFEATURE_webengine_system_zlib=ON \
	-DFEATURE_webengine_system_libpng=ON \
	-DFEATURE_webengine_system_libjpeg=ON \
	-DFEATURE_webengine_system_libtiff=ON \
	-DFEATURE_webengine_system_libwebp=ON \
	-DFEATURE_webengine_system_libopenjpeg2=ON \
	-DFEATURE_webengine_system_opus=ON \
	-DFEATURE_webengine_system_lcms2=ON \
	-DFEATURE_webengine_system_harfbuzz=ON \
	-DFEATURE_webengine_system_freetype=ON \
	-DFEATURE_webengine_system_libpci=ON \
	-DFEATURE_webengine_system_libudev=ON \
	-DFEATURE_webengine_system_ffmpeg=OFF \
	-DFEATURE_webengine_system_libvpx=OFF \
	-DFEATURE_webengine_system_re2=OFF \
	-DFEATURE_webengine_system_snappy=OFF \
	-DFEATURE_webengine_system_openh264=OFF \
	-DFEATURE_webengine_system_minizip=ON \
	-DFEATURE_webengine_system_libxml=OFF
ninja
test -z "$(find . -path '*/obj/third_party/zlib/bundled_zlib/*' -name '*.o')"
test -z "$(find . -path '*/obj/third_party/zlib/bundled_minizip/*' -name '*.o')"
DESTDIR=$PKG ninja install
rm -f "$PKG/usr/bin/QtWebEngineProcess6"
find "$PKG/usr/share/qt6/translations/qtwebengine_locales" -name '*.pak' \
	! -name 'en-US.pak' ! -name 'en-GB.pak' -delete

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/qt6-qtwebengine, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf qt6-qtwebengine-6.11.2-3.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/qt6-qtwebengine, and runs the triggers its paths call for.

Contents

Installed libraries: libQt6Pdf.so, libQt6PdfQuick.so, libQt6PdfWidgets.so, libQt6WebEngineCore.so, libQt6WebEngineQuick.so, libQt6WebEngineQuickDelegatesQml.so, libQt6WebEngineWidgets.so.

Installed directories: /usr/include/qt6/QtPdf, /usr/include/qt6/QtPdfQuick, /usr/include/qt6/QtPdfWidgets, /usr/include/qt6/QtWebEngineCore, /usr/include/qt6/QtWebEngineQuick, /usr/include/qt6/QtWebEngineWidgets, /usr/lib/cmake/Qt6Pdf, /usr/lib/cmake/Qt6PdfPrivate, /usr/lib/cmake/Qt6PdfQuick, /usr/lib/cmake/Qt6PdfQuickPrivate, /usr/lib/cmake/Qt6PdfWidgets, /usr/lib/cmake/Qt6PdfWidgetsPrivate, /usr/lib/cmake/Qt6WebEngineCore, /usr/lib/cmake/Qt6WebEngineCorePrivate, /usr/lib/cmake/Qt6WebEngineCoreTools, /usr/lib/cmake/Qt6WebEngineQuick, /usr/lib/cmake/Qt6WebEngineQuickDelegatesQml, /usr/lib/cmake/Qt6WebEngineQuickPrivate, /usr/lib/cmake/Qt6WebEngineWidgets, /usr/lib/cmake/Qt6WebEngineWidgetsPrivate, /usr/lib/qt6/qml/QtQuick/Pdf, /usr/lib/qt6/qml/QtWebEngine, /usr/share/licenses/qt6-qtwebengine, /usr/share/qt6/resources, /usr/share/qt6/translations/qtwebengine_locales.

Short descriptions

Qt6Pdf.pc Qt Pdf module
Qt6PdfQuick.pc Qt PdfQuick module
Qt6PdfWidgets.pc Qt PdfWidgets module
Qt6WebEngineCore.pc Qt WebEngineCore module
Qt6WebEngineQuick.pc Qt WebEngineQuick module
Qt6WebEngineQuickDelegatesQml.pc Qt WebEngineQuickDelegatesQml module
Qt6WebEngineWidgets.pc Qt WebEngineWidgets module

Notes

After the Chromium build, build.sh checks that no object was compiled under third_party/zlib/bundled_zlib or third_party/zlib/bundled_minizip: Chromium compiles its own zlib and minizip whenever the system ones are not taken, and the check fails the build rather than ship a second copy of each. minizip is in depends for that reason.

QtWebEngineProcess is installed in /usr/lib/qt6/libexec, where the engine starts it from. build.sh removes the /usr/bin/QtWebEngineProcess6 that the install also puts on PATH; upstream describes the helper as Qt WebEngine’s internal process.

Of the engine’s translated locale packs, only en-US.pak and en-GB.pak ship. The engine falls back to en-US.pak for any locale whose pack is missing.

The renderer sandbox is built on unprivileged user namespaces, so no setuid helper is installed (see setuid binaries).