[ceb3dc7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[21552cf] | 7 | <!ENTITY qtwebengine-major "5.15">
|
---|
[4eb513e] | 8 | <!-- URL if there is a public release
|
---|
[57e07f4] | 9 | <!ENTITY qtwebengine-download-http "https://download.qt.io/archive/qt/&qtwebengine-major;/&qtwebengine-version;/submodules/qtwebengine-everywhere-src-&qtwebengine-version;.tar.xz">
|
---|
[4eb513e] | 10 | URL for a prepared git version -->
|
---|
| 11 | <!ENTITY qtwebengine-download-http "&sources-anduin-http;/qtwebengine/qtwebengine-&qtwebengine-version;.tar.xz">
|
---|
[ceb3dc7] | 12 | <!ENTITY qtwebengine-download-ftp " ">
|
---|
[4506108] | 13 | <!ENTITY qtwebengine-md5sum "9c2009c073c4d13f5ed5cc89b8f1e2df">
|
---|
[6a0b1f8] | 14 | <!ENTITY qtwebengine-size "307 MB">
|
---|
[4506108] | 15 | <!ENTITY qtwebengine-buildsize "5.1 GB (153 MB installed)">
|
---|
[dce3118] | 16 | <!ENTITY qtwebengine-time "75 SBU (on a fast machine, Using parallelism=4)">
|
---|
[ceb3dc7] | 17 | ]>
|
---|
| 18 |
|
---|
| 19 | <sect1 id="qtwebengine" xreflabel="qtwebengine-&qtwebengine-version;">
|
---|
| 20 | <?dbhtml filename="qtwebengine.html"?>
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | <title>QtWebEngine-&qtwebengine-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="qtwebengine">
|
---|
| 26 | <primary sortas="a-qtwebengine">qtwebengine</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to QtWebEngine</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | <application>QtWebEngine</application> integrates
|
---|
[55a55f1] | 34 | <application>chromium</application>'s web capabilities into Qt. It
|
---|
[a9c0e8d] | 35 | ships with its own copy of ninja which it uses for the build if it cannot
|
---|
| 36 | find a system copy, and various copies of libraries from ffmpeg, icu,
|
---|
| 37 | libvpx, and zlib (including libminizip) which have been forked by the
|
---|
[ceb3dc7] | 38 | <application>chromium</application> developers.
|
---|
| 39 | </para>
|
---|
| 40 |
|
---|
[455eec0] | 41 | <para>
|
---|
| 42 | This package and browsers using it may be useful if you need to use a
|
---|
| 43 | website designed for google chrome, or chromium, browsers.
|
---|
| 44 | </para>
|
---|
| 45 |
|
---|
[4506108] | 46 | <important>
|
---|
| 47 | <para>
|
---|
| 48 | Qt-5.15 reaches End Of Life on 26 May 2023. Extended lifetime Qt5.15 LTS
|
---|
| 49 | has been extended until 26th May 2025 for those with subscription licenses.
|
---|
| 50 | Because qtwebengine uses chromium code under the LGPL, it is not yet
|
---|
| 51 | clear if there will be any more backported CVE fixes for QtWebEngine after
|
---|
| 52 | the 5.15.14 release (the Extended Lifetime fixes might only be in response
|
---|
| 53 | to specific issues raised by subscribers).
|
---|
| 54 | </para>
|
---|
| 55 | </important>
|
---|
[4eb513e] | 56 |
|
---|
| 57 | <warning>
|
---|
[fc0828f] | 58 | <para>
|
---|
| 59 | QtWebEngine uses a forked copy of chromium, and is therefore vulnerable
|
---|
| 60 | to many issues found there. The Qt developers have always preferred to
|
---|
| 61 | make releases at the same time as the rest of Qt (rather than adding
|
---|
[4eb513e] | 62 | emergency fixes), but with stable versions getting released after the
|
---|
| 63 | current development version. Now that they are keen to move to Qt6, the
|
---|
| 64 | 5.15.3 and later Qt-5.15 releases are initially only available to paying
|
---|
| 65 | customers. QtWebEngine is something of an exception because of its LGPL
|
---|
| 66 | licence, but getting the git sources (with the forked chromium submodule)
|
---|
| 67 | to a position where they will successfully build on a current BLFS system
|
---|
| 68 | can take a lot of effort and therefore updates to the book may be delayed.
|
---|
| 69 | </para>
|
---|
| 70 |
|
---|
| 71 | <para>
|
---|
| 72 | It seems likely that future 5.15-series versions will also be released
|
---|
[fb6d1550] | 73 | long after the chromium vulnerabilities are known, but fixes for
|
---|
| 74 | QtWebEngine can be found in git and the editors take the view that
|
---|
| 75 | known vulnerabilities in browsers should be fixed.
|
---|
[fc0828f] | 76 | </para>
|
---|
[4eb513e] | 77 |
|
---|
| 78 | <para> <!-- for git versions -->
|
---|
[9e0ab833] | 79 | The tarball linked to below was created from the 5.15 git branch
|
---|
[fb6d1550] | 80 | and the 87-branch of the chromium submodule (which is forked from
|
---|
[47d5b8be] | 81 | chromium). See the GIT-VERSIONS file in the tarball for details of the
|
---|
| 82 | latest commits.
|
---|
[4eb513e] | 83 | </para>
|
---|
| 84 | </warning>
|
---|
| 85 |
|
---|
| 86 | <!-- note for editors on obtaining webengine from git.
|
---|
| 87 | First (if you do not already have a past version)
|
---|
| 88 | git clone git://code.qt.io/qt/qtwebengine.git
|
---|
| 89 | git submodule init -
|
---|
| 90 | that will report qtwebengine-chromium.git registered for src/3rdparty
|
---|
| 91 | now find the main branch names:
|
---|
| 92 | git fetch origin
|
---|
| 93 | git branch -r
|
---|
| 94 | after a release is prepared (even if the rest is not public), the 5.15
|
---|
[d885388] | 95 | branch now seems to get updated and might be what you want. But in the
|
---|
| 96 | approach to 5.15.6 the backported CVE and other security fixes were only
|
---|
| 97 | applied to 5.15.6. So, assuming that a 5.15.7 branch now exists,
|
---|
| 98 | git checkout origin/5.15.7
|
---|
[4eb513e] | 99 | Confirm that HEAD is where you expected.
|
---|
| 100 | Now go to src/3rdparty
|
---|
| 101 | git fetch origin
|
---|
| 102 | git branch -r
|
---|
| 103 | The required branch is likely to be 87-branch unless there is a newer one
|
---|
[fb6d1550] | 104 | mentioned in the 5.15 cgit web page (below).
|
---|
[4eb513e] | 105 | git checkout origin/87-branch (or whatever)
|
---|
| 106 | Use git log or git tk to look at its HEAD and check it seems appropriate.
|
---|
[ea11b87] | 107 | If this doesn't work, use 'git submodule update'
|
---|
[4eb513e] | 108 |
|
---|
[fb6d1550] | 109 | To decide when it might be worth creating a new tarball, periodically keep
|
---|
[d885388] | 110 | an eye on https://code.qt.io/cgit/qt/qtwebengine.git/ (currently, the 5.15.6
|
---|
| 111 | branch, 5.15.7 might get used later). The interesting items are CVE fixes
|
---|
[fb6d1550] | 112 | for known chromium vulnerabilities, as well as numbered Security bugs -
|
---|
| 113 | again, these relate to chromium.
|
---|
| 114 |
|
---|
| 115 | When I noticed some updates in late March I was searching for one of the
|
---|
| 116 | CVEs mentioned, and google found a link to a review page for Michael Brüning
|
---|
| 117 | at https://codereview.qt.nokia.com/q/owner:michael.bruning%2540qt.io. At that
|
---|
| 118 | time I could see various unmerged items, so I waited. The items for the
|
---|
[d885388] | 119 | 90-based chromium module are not relevant to 5.15-series (possibly they will
|
---|
| 120 | be for qtwebengine-6+). Review queues for other Qt employees might be found
|
---|
[fb6d1550] | 121 | in a similar way, but remember that everythng EXCEPT qtwebengine and chromium
|
---|
| 122 | is private to Qt until they choose to release it.
|
---|
| 123 |
|
---|
[685b8672] | 124 | NOTE: the 3rdparty/chromium tree may contain more patches than have been
|
---|
| 125 | merged into the current 5.15.x branch. Any patches after what was in the
|
---|
[d885388] | 126 | last 'update chromium' merge in qtwebengine occasionally break the build.
|
---|
[685b8672] | 127 |
|
---|
[fb6d1550] | 128 | After merging the contents of the qtwebengine and src/3rdparty git extracts,
|
---|
| 129 | in the top level please create a GIT-VERSIONS file summarising the HEAD
|
---|
[d885388] | 130 | commits of both parts, as a reminder of where we are up to. I've nove added
|
---|
| 131 | a CVE-fixes to keep track of what has been fixed (comits before 5.15.2 did not
|
---|
| 132 | mention the CVEs until they were detailed in a release).
|
---|
[fb6d1550] | 133 |
|
---|
[4eb513e] | 134 | Now create tarballs - 'git archive' does not work across submodule boundaries,
|
---|
| 135 | so you need to create one archive from the top of qtwebengine/ and another
|
---|
| 136 | from the top of src/3rdparty (chromium, gn, ninja are apparently all part of
|
---|
| 137 | the qtwebengine-chromium module). Then in a work area untar the qtwebengine
|
---|
| 138 | tarball, go down to src/3rdparty and untar the submodule tarball.
|
---|
| 139 | Decide on what to call the result and create a full xz tarball using tar -cJf.
|
---|
[685b8672] | 140 |
|
---|
[ea11b87] | 141 | NOTE: To use git archive, use something like this:
|
---|
| 142 | git archive - -format tar.gz - -output qtwebengine.tar.gz HEAD
|
---|
| 143 | git archive - -format tar.gz - -output chromium.tar.gz HEAD
|
---|
| 144 |
|
---|
[685b8672] | 145 | UPDATE: Since we have to host the tarball, and it is over 300MB, it makes
|
---|
| 146 | sense to create a patch for subsequent fixes (for the first version, 314KB
|
---|
| 147 | including the updates to the GIT-VERSIONS file). For future updates, view
|
---|
| 148 | the current updates patch to see the previous commits. When the new commits
|
---|
| 149 | have been applied, rename the updated version to 'b', but untar the
|
---|
| 150 | unpatched tarball as 'a' and then diff a to b in the usual manner to get
|
---|
| 151 | all updates since the tarball was created.
|
---|
| 152 |
|
---|
| 153 | For our own releases, probably best to create a fresh tarball.
|
---|
| 154 |
|
---|
[fb6d1550] | 155 | end of note for editors -->
|
---|
[fc0828f] | 156 |
|
---|
[dc1a45e] | 157 | &lfs113_checked;
|
---|
[088e7e06] | 158 |
|
---|
[00032e41] | 159 | <warning>
|
---|
[55a55f1] | 160 | <para>
|
---|
| 161 | By default, ninja will use all online CPUs +2 (if at least 4 exist),
|
---|
| 162 | even if they are not available to the current task because the build
|
---|
[8558044] | 163 | terminal has been restricted with 'taskset'. In BLFS, this package
|
---|
[00032e41] | 164 | takes more time to build than than any other. In one example,
|
---|
[8558044] | 165 | the build of this package crashed at about the 90 percent point
|
---|
| 166 | due to an out of memory problem on a system with 24 cores and 32 GB
|
---|
[00032e41] | 167 | of memory.
|
---|
[55a55f1] | 168 | </para>
|
---|
| 169 |
|
---|
[00032e41] | 170 | <para>
|
---|
| 171 | To work around this, see the Command Explanations below.
|
---|
| 172 | </para>
|
---|
| 173 | </warning>
|
---|
| 174 |
|
---|
| 175 | <note>
|
---|
[9e0ab833] | 176 | <para>
|
---|
| 177 | If you are upgrading and have installed a newer version of <xref
|
---|
| 178 | linkend='icu'/> since you last installed <xref linkend='qt5'/>, you
|
---|
| 179 | will need to reinstall Qt5 before upgrading, otherwise the final link
|
---|
| 180 | of this package will fail with a warning that the version of icu
|
---|
| 181 | libraries needed by libQt5Core.so may conflict with the version
|
---|
| 182 | used for this package.
|
---|
| 183 | </para>
|
---|
| 184 |
|
---|
[55a55f1] | 185 | <para>
|
---|
| 186 | Unusually, the shipped GN build system (used to create the Ninja files)
|
---|
| 187 | requires a static <filename class="libraryfile">libstdc++.a</filename>
|
---|
| 188 | although the installed libraries correctly use the shared version. If
|
---|
| 189 | that static library is not present, the build will fail quite quickly.
|
---|
[5510d3e] | 190 | Please note that if you try to build webengine as part of
|
---|
| 191 | <application>Qt</application> and the static library is not available,
|
---|
[baac59c] | 192 | that build will either complete without installing webengine, or else
|
---|
[d885388] | 193 | fail during the install (both variants were observed in 5.12.0).
|
---|
[55a55f1] | 194 | </para>
|
---|
| 195 | </note>
|
---|
[ceb3dc7] | 196 |
|
---|
| 197 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 198 | <itemizedlist spacing="compact">
|
---|
| 199 | <listitem>
|
---|
| 200 | <para>
|
---|
| 201 | Download (HTTP): <ulink url="&qtwebengine-download-http;"/>
|
---|
| 202 | </para>
|
---|
| 203 | </listitem>
|
---|
| 204 | <listitem>
|
---|
| 205 | <para>
|
---|
| 206 | Download (FTP): <ulink url="&qtwebengine-download-ftp;"/>
|
---|
| 207 | </para>
|
---|
| 208 | </listitem>
|
---|
| 209 | <listitem>
|
---|
| 210 | <para>
|
---|
| 211 | Download MD5 sum: &qtwebengine-md5sum;
|
---|
| 212 | </para>
|
---|
| 213 | </listitem>
|
---|
| 214 | <listitem>
|
---|
| 215 | <para>
|
---|
| 216 | Download size: &qtwebengine-size;
|
---|
| 217 | </para>
|
---|
| 218 | </listitem>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>
|
---|
| 221 | Estimated disk space required: &qtwebengine-buildsize;
|
---|
| 222 | </para>
|
---|
| 223 | </listitem>
|
---|
| 224 | <listitem>
|
---|
| 225 | <para>
|
---|
| 226 | Estimated build time: &qtwebengine-time;
|
---|
| 227 | </para>
|
---|
| 228 | </listitem>
|
---|
| 229 | </itemizedlist>
|
---|
[72119155] | 230 |
|
---|
[1d776f0b] | 231 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 232 | <itemizedlist spacing="compact">
|
---|
[9e0ab833] | 233 | <!--<listitem>
|
---|
[1d776f0b] | 234 | <para>
|
---|
[52249aa] | 235 | Required patch:
|
---|
[9e0ab833] | 236 | <!\-\- keep links for releases and git versions as a reminder
|
---|
[94f5f13d] | 237 | that the tarball names names differ
|
---|
[9e0ab833] | 238 | <ulink url="&patch-root;/qtwebengine-everywhere-src-&qtwebengine-version;-ICU68-2.patch"/> \-\->
|
---|
[7a9a7b26] | 239 |
|
---|
[86e62cc] | 240 | <ulink url="&patch-root;/qtwebengine-&qtwebengine-version;-5.15.7-1.patch"/>
|
---|
[685b8672] | 241 | </para>
|
---|
[9e0ab833] | 242 | </listitem>-->
|
---|
[685b8672] | 243 | <listitem>
|
---|
| 244 | <para>
|
---|
[aebb5271] | 245 | Required patch:
|
---|
[47d5b8be] | 246 | <ulink url="&patch-root;/qtwebengine-&qtwebengine-version;-build_fixes-1.patch"/>
|
---|
[927e12e] | 247 | </para>
|
---|
| 248 | </listitem>
|
---|
[aebb5271] | 249 | <listitem>
|
---|
| 250 | <para>
|
---|
| 251 | Required patch:
|
---|
| 252 | <ulink url="&patch-root;/qtwebengine-&qtwebengine-version;-ffmpeg5_fixes-1.patch"/>
|
---|
| 253 | </para>
|
---|
| 254 | </listitem>
|
---|
[cae21bc] | 255 | <!--
|
---|
[2a89d308] | 256 | <listitem>
|
---|
| 257 | <para>
|
---|
| 258 | Required patch:
|
---|
| 259 | <ulink url="&patch-root;/qtwebengine-&qtwebengine-version;-icu_73-1.patch"/>
|
---|
| 260 | </para>
|
---|
| 261 | </listitem>
|
---|
[cae21bc] | 262 | -->
|
---|
[1d776f0b] | 263 | </itemizedlist>
|
---|
[72119155] | 264 |
|
---|
[ceb3dc7] | 265 | <bridgehead renderas="sect3">qtwebengine Dependencies</bridgehead>
|
---|
| 266 |
|
---|
| 267 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 268 | <!-- the qmake output tends to be misleading. 'khr' is from Mesa -->
|
---|
| 269 | <para role="required">
|
---|
[639a5b9] | 270 | <xref linkend="nodejs"/>,
|
---|
[ceb3dc7] | 271 | <xref linkend="nss"/>,
|
---|
[70e458ba] | 272 | <xref linkend="pciutils"/>, and
|
---|
| 273 | <!-- <xref linkend="python2"/>, and -->
|
---|
[b3867c5] | 274 | (<xref linkend='qt5'/> or
|
---|
| 275 | <xref role="nodep" linkend='qt5-components'/> with qtlocation and qtwebchannel)
|
---|
[ceb3dc7] | 276 | </para>
|
---|
| 277 |
|
---|
| 278 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 279 | <note>
|
---|
| 280 | <para>
|
---|
| 281 | If these packages are not installed, the build process will compile and
|
---|
| 282 | install its own (perhaps older) version, with the side effect of
|
---|
| 283 | increasing build and installed disk space and build time.
|
---|
| 284 | </para>
|
---|
| 285 | </note>
|
---|
| 286 |
|
---|
| 287 | <para role="recommended">
|
---|
[55a55f1] | 288 | either <xref linkend="alsa-lib"/> or
|
---|
| 289 | <xref linkend="pulseaudio"/> (or both),
|
---|
| 290 | <xref linkend="ffmpeg"/>,
|
---|
[d885388] | 291 | <!-- awkward wording - libxslt needs libxml2, if libxml2 is built
|
---|
| 292 | before icu then the *shipped* icu will be used -->
|
---|
| 293 | <xref linkend="icu"/> (built before <xref linkend="libxml2"/>) ,
|
---|
[ceb3dc7] | 294 | <xref linkend="libwebp"/>,
|
---|
[55a55f1] | 295 | <xref linkend="libxslt"/>, and
|
---|
[f5932da] | 296 | <xref linkend="opus"/>
|
---|
[ceb3dc7] | 297 | </para>
|
---|
| 298 |
|
---|
| 299 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 300 | <para role="optional">
|
---|
| 301 | <xref linkend="libevent"/>,
|
---|
[ff00f810] | 302 | <xref linkend="mitkrb"/>,
|
---|
[d885388] | 303 | <xref linkend="pipewire"/>,
|
---|
[e847737] | 304 | <xref linkend="poppler"/>,
|
---|
[ceb3dc7] | 305 | <ulink url="https://github.com/open-source-parsers/jsoncpp/releases">jsoncpp</ulink>,
|
---|
| 306 | <ulink url="https://github.com/cisco/libsrtp/releases">libsrtp</ulink>,
|
---|
[87fc185] | 307 | <ulink url="https://google.github.io/snappy/">snappy</ulink>
|
---|
[ceb3dc7] | 308 | </para>
|
---|
| 309 |
|
---|
| 310 | <para condition="html" role="usernotes">
|
---|
[42ddc30] | 311 | Editor Notes: <ulink url="&blfs-wiki;/qtwebengine"/>
|
---|
[ceb3dc7] | 312 | </para>
|
---|
| 313 | </sect2>
|
---|
| 314 |
|
---|
| 315 | <sect2 role="installation">
|
---|
| 316 | <title>Installation of qtwebengine</title>
|
---|
| 317 |
|
---|
[70e458ba] | 318 | <!-- following merely commented instead of deleted, in case we need to
|
---|
| 319 | drop back when a future version of python3 is released -->
|
---|
| 320 | <!--<note>
|
---|
[4eb513e] | 321 | <para>
|
---|
| 322 | Unlike version 5.15.2, the chromium-derived build system now needs
|
---|
| 323 | <command>python</command> to be available and to be python2. In
|
---|
| 324 | BLFS-10.1 the creation of the python symlink was removed as a step
|
---|
| 325 | towards eventually getting rid of python2 (other old packages which
|
---|
| 326 | need python2 usually work by invoking python2). If you are still
|
---|
| 327 | using an earlier version of BLFS where
|
---|
| 328 | <filename>/usr/bin/python</filename> exists, you can skip the
|
---|
| 329 | commands to create the symlink, and to later remove it.
|
---|
| 330 | </para>
|
---|
| 331 | </note>
|
---|
| 332 |
|
---|
[55a55f1] | 333 | <para>
|
---|
[4eb513e] | 334 | First, as the <systemitem class="username">root</systemitem>
|
---|
| 335 | user, create the python symlink:
|
---|
[55a55f1] | 336 | </para>
|
---|
| 337 |
|
---|
[70e458ba] | 338 | <screen role="root"><userinput>ln -svf /usr/bin/python{2,}</userinput></screen>-->
|
---|
[72119155] | 339 |
|
---|
[685b8672] | 340 |
|
---|
[9e0ab833] | 341 | <!--<para>
|
---|
[86e62cc] | 342 | Now apply a patch to update from 5.15.6 to the security and other fixes
|
---|
| 343 | contained in the 5.15.7 source:
|
---|
[685b8672] | 344 | </para>
|
---|
| 345 |
|
---|
[9e0ab833] | 346 | <screen><userinput remap="pre">patch -Np1 -i ../qtwebengine-&qtwebengine-version;-5.15.7-1.patch</userinput></screen>-->
|
---|
[72119155] | 347 |
|
---|
[927e12e] | 348 | <para>
|
---|
[70e458ba] | 349 | Apply a patch to fix several issues that can prevent the build from completing,
|
---|
| 350 | and to force it to use python3:
|
---|
[927e12e] | 351 | </para>
|
---|
| 352 |
|
---|
[366573e] | 353 | <screen><userinput remap="pre">patch -Np1 -i ../qtwebengine-&qtwebengine-version;-build_fixes-1.patch</userinput></screen>
|
---|
[927e12e] | 354 |
|
---|
[aebb5271] | 355 | <para>
|
---|
[dce3118] | 356 | Apply a patch that resolves problems when building with ffmpeg-5 and later:
|
---|
[aebb5271] | 357 | </para>
|
---|
| 358 |
|
---|
| 359 | <screen><userinput remap="pre">patch -Np1 -i ../qtwebengine-&qtwebengine-version;-ffmpeg5_fixes-1.patch</userinput></screen>
|
---|
[cae21bc] | 360 | <!--
|
---|
[2a89d308] | 361 | <para>
|
---|
| 362 | Apply a patch that resolves problems when building with icu-73 and later:
|
---|
| 363 | </para>
|
---|
| 364 |
|
---|
| 365 | <screen><userinput remap="pre">patch -Np1 -i ../qtwebengine-&qtwebengine-version;-icu_73-1.patch</userinput></screen>
|
---|
| 366 |
|
---|
[cae21bc] | 367 | -->
|
---|
[4eb513e] | 368 | <!-- start of commands for git versions only -->
|
---|
[8ed3ef2a] | 369 | <para>
|
---|
[86e62cc] | 370 | Although the build_fixes patch has ensured that git is not invoked during the build,
|
---|
[4eb513e] | 371 | the build system has labyrinthine rules of byzantine complexity, and in
|
---|
| 372 | particular trying to build without two <filename>.git</filename> directories
|
---|
| 373 | will lead to it eventually falling into unexpected and unbuildable code
|
---|
| 374 | which references a private header that has not been created. Avoid this
|
---|
| 375 | by creating the required directories:
|
---|
[8ed3ef2a] | 376 | </para>
|
---|
| 377 |
|
---|
[4eb513e] | 378 | <screen><userinput>mkdir -pv .git src/3rdparty/chromium/.git</userinput></screen>
|
---|
| 379 |
|
---|
| 380 | <para>
|
---|
| 381 | Because this version of qtwebengine is aimed at a later release than the
|
---|
| 382 | current public releases, change it to build for qt-&qt5-version; using a
|
---|
| 383 | sed:
|
---|
| 384 | </para>
|
---|
| 385 |
|
---|
| 386 | <screen><userinput>sed -e '/^MODULE_VERSION/s/5.*/&qt5-version;/' -i .qmake.conf</userinput></screen>
|
---|
| 387 | <!-- end of commands for git versions only -->
|
---|
| 388 |
|
---|
| 389 | <para>
|
---|
| 390 | Now, ensure that the local headers are available when not building as
|
---|
| 391 | part of the complete <xref linkend="qt5"/>:
|
---|
| 392 | </para>
|
---|
| 393 |
|
---|
| 394 | <screen><userinput>find -type f -name "*.pr[io]" |
|
---|
| 395 | xargs sed -i -e 's|INCLUDEPATH += |&$$QTWEBENGINE_ROOT/include |'</userinput></screen>
|
---|
[8ed3ef2a] | 396 |
|
---|
[ae39488] | 397 | <para>
|
---|
| 398 | Next, allow the pulseaudio library to be linked at build time, instead
|
---|
| 399 | of run time. This also prevents an issue with newer pulseaudio:
|
---|
| 400 | </para>
|
---|
| 401 |
|
---|
| 402 | <screen><userinput>sed -e '/link_pulseaudio/s/false/true/' \
|
---|
| 403 | -i src/3rdparty/chromium/media/media_options.gni</userinput></screen>
|
---|
| 404 |
|
---|
[5377506] | 405 | <para>
|
---|
| 406 | Next, fix the build tools so they can be run with Python-3.11+:
|
---|
| 407 | </para>
|
---|
| 408 |
|
---|
| 409 | <screen><userinput>sed -e 's/\^(?i)/(?i)^/' \
|
---|
| 410 | -i src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py &&
|
---|
| 411 | sed -e "s/'rU'/'r'/" \
|
---|
| 412 | -i src/3rdparty/chromium/tools/grit/grit/util.py</userinput></screen>
|
---|
| 413 |
|
---|
[e90b81d] | 414 | <para>
|
---|
| 415 | Finally, fix a change in the build system which allows its developers to
|
---|
| 416 | pass e.g. -j20 to make (for quick tests of some areas) but breaks the
|
---|
| 417 | build with LFS's use of the NINJAJOBS environment variable:
|
---|
| 418 | </para>
|
---|
| 419 |
|
---|
| 420 | <!-- editors: See thread at
|
---|
| 421 | http://lists.linuxfromscratch.org/pipermail/blfs-dev/2019-December/036996.html
|
---|
| 422 | et.seq, particularly 037002.html which shows the commit near the end. -->
|
---|
| 423 |
|
---|
| 424 | <screen><userinput>sed -i 's/NINJAJOBS/NINJA_JOBS/' src/core/gn_run.pro</userinput></screen>
|
---|
| 425 |
|
---|
[d885388] | 426 | <!-- now that we always install this as 5.15.2, this seems to be redundant
|
---|
[55a55f1] | 427 | <para>
|
---|
| 428 | If an older version of the package's main library has been installed,
|
---|
| 429 | when the package is built separately it will link to that in preference
|
---|
| 430 | to its own not-yet-installed version, and fail because of missing symbols.
|
---|
| 431 | Prevent that by, as the <systemitem class="username">root</systemitem>
|
---|
[fa4e429] | 432 | user, moving the symlink out of the way:
|
---|
[55a55f1] | 433 | </para>
|
---|
| 434 |
|
---|
[8eb0021] | 435 | <screen role="root"><userinput>if [ -e ${QT5DIR}/lib/libQt5WebEngineCore.so ]; then
|
---|
| 436 | mv -v ${QT5DIR}/lib/libQt5WebEngineCore.so{,.old}
|
---|
[d885388] | 437 | fi</userinput></screen>-->
|
---|
[55a55f1] | 438 |
|
---|
[70e458ba] | 439 | <!--<para>
|
---|
[3241bb9] | 440 | The last fix is needed to build with gcc-12:
|
---|
| 441 | </para>
|
---|
| 442 |
|
---|
| 443 | <screen><userinput>sed -e '/#include/i#include <vector>' \
|
---|
[70e458ba] | 444 | -i src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp</userinput></screen>-->
|
---|
[3241bb9] | 445 |
|
---|
[d4bafcc7] | 446 | <para>
|
---|
| 447 | Install <application>qtwebengine</application> by running the following
|
---|
| 448 | commands:
|
---|
| 449 | </para>
|
---|
[1d776f0b] | 450 |
|
---|
[2f3c55c5] | 451 | <screen><userinput>mkdir build &&
|
---|
| 452 | cd build &&
|
---|
[6a0b1f8] | 453 | qmake .. -- -system-ffmpeg -proprietary-codecs -webengine-icu &&
|
---|
[2f3c55c5] | 454 | make</userinput></screen>
|
---|
[ceb3dc7] | 455 |
|
---|
[640f4c21] | 456 | <!--
|
---|
[ceb3dc7] | 457 | <para>
|
---|
| 458 | if you wish to build the HTML documentation, issue:
|
---|
| 459 | </para>
|
---|
| 460 |
|
---|
| 461 | <screen><userinput>make docs</userinput></screen>
|
---|
[640f4c21] | 462 | -->
|
---|
[ceb3dc7] | 463 | <para>
|
---|
| 464 | This package does not come with a test suite.
|
---|
| 465 | </para>
|
---|
| 466 |
|
---|
| 467 | <para>
|
---|
| 468 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 469 | </para>
|
---|
| 470 |
|
---|
[640f4c21] | 471 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[4eb513e] | 472 |
|
---|
[e847737] | 473 | <!-- EDITORS NOTE: If you are updating this package, use INSTALL_ROOT=
|
---|
| 474 | instead of DESTDIR= -->
|
---|
[640f4c21] | 475 | <!--
|
---|
[ceb3dc7] | 476 | <para>
|
---|
| 477 | If you built the HTML documentation, install it with:
|
---|
| 478 | </para>
|
---|
| 479 |
|
---|
| 480 | <screen role="root"><userinput>make install_docs</userinput></screen>
|
---|
[640f4c21] | 481 | -->
|
---|
[ceb3dc7] | 482 | <para>
|
---|
| 483 | Remove references to the build directory from installed library
|
---|
| 484 | dependency (prl) files by running the following
|
---|
| 485 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 486 | </para>
|
---|
| 487 |
|
---|
[dff94d4] | 488 | <screen role="root"><userinput>find $QT5DIR/ -name \*.prl \
|
---|
[ceb3dc7] | 489 | -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
|
---|
[4eb513e] | 490 |
|
---|
[70e458ba] | 491 | <!--<para>
|
---|
[4eb513e] | 492 | Finally, as the <systemitem class="username">root</systemitem>
|
---|
| 493 | user, remove the python symlink:
|
---|
| 494 | </para>
|
---|
| 495 |
|
---|
[70e458ba] | 496 | <screen role="root"><userinput>rm -v /usr/bin/python</userinput></screen>-->
|
---|
[ceb3dc7] | 497 | </sect2>
|
---|
| 498 |
|
---|
| 499 | <sect2 role="commands">
|
---|
| 500 | <title>Command Explanations</title>
|
---|
| 501 |
|
---|
| 502 | <para>
|
---|
[640f4c21] | 503 | <command>qmake</command>: This will build the included copy of
|
---|
| 504 | <application>ninja</application> if it is not already installed
|
---|
[088e7e06] | 505 | and use it to configure the build.
|
---|
| 506 | </para>
|
---|
| 507 |
|
---|
[55a55f1] | 508 | <para>
|
---|
[6a0b1f8] | 509 | <command>-- -system-ffmpeg -proprietary-codecs -webengine-icu</command>: If
|
---|
| 510 | any options are passed to qmake they must come after '--' which must follow
|
---|
| 511 | '..' that points to the main directory. The options here cause it to use
|
---|
| 512 | system ffmpeg and system icu. The '-proprietary-codecs' option allows
|
---|
| 513 | ffmpeg to decode H264 and H265 codecs. If built as part of full Qt5, the
|
---|
| 514 | system icu is automatically used (only) by Qt5Core if it is available, but
|
---|
| 515 | unless this option is used webengine will always use its shipped copy of icu,
|
---|
| 516 | adding time and space to the build.
|
---|
[55a55f1] | 517 | </para>
|
---|
| 518 |
|
---|
[d885388] | 519 | <para>
|
---|
| 520 | <option>-webengine-jumbo-build 0</option>: If this is added to the qmake
|
---|
| 521 | command it will cause the 'Jumbo Build Merge Limit' to be reported as 'no'
|
---|
| 522 | instead of 8. That turns off the jumbo build. Some distros do that to get
|
---|
| 523 | a smaller build on some architectures such as MIPS. On x86_64 it might save
|
---|
| 524 | a little space in the build, but the build time will increase by a very
|
---|
| 525 | large amount.
|
---|
| 526 | </para>
|
---|
| 527 |
|
---|
[ff00f810] | 528 | <para>
|
---|
| 529 | <option>-webengine-kerberos</option>: Add this if you have installed <xref
|
---|
| 530 | linkend="mitkrb"/> and wish to connect from a browser using QtWebEngine
|
---|
| 531 | to a webserver which requires you to connect via kerberos.
|
---|
| 532 | </para>
|
---|
| 533 |
|
---|
[c716497] | 534 | <!--
|
---|
[8558044] | 535 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[52249aa] | 536 | href="../../xincludes/SIOCGSTAMP.xml"/>
|
---|
[c716497] | 537 | -->
|
---|
[52249aa] | 538 |
|
---|
[088e7e06] | 539 | <para>
|
---|
| 540 | <option>NINJAJOBS=4 make</option>: If you patched system ninja in LFS to
|
---|
| 541 | recognize the NINJAJOBS environment variable, this command will run system
|
---|
[8558044] | 542 | ninja with the specified number of jobs (i.e. 4).
|
---|
[d885388] | 543 | There are several reasons why you might want to use options like this this:
|
---|
[4eb513e] | 544 | </para>
|
---|
[d885388] | 545 |
|
---|
[5c7f2497] | 546 | <itemizedlist>
|
---|
| 547 | <listitem>
|
---|
[baac59c] | 548 | <para>
|
---|
| 549 | Building on a subset of CPUs allows measuring the build time
|
---|
[d885388] | 550 | for a smaller number of processors, and/or running other
|
---|
| 551 | CPU-intensive tasks at the same time. For an editor on a machine
|
---|
| 552 | with a lot of CPUs, trying to measure the build time for a 4-CPU
|
---|
| 553 | machine, <option>NINJAJOBS=4 make</option> will give a reasonable
|
---|
[70e458ba] | 554 | approximation (there is a short period where N+2 python and node
|
---|
[d885388] | 555 | jobs run).
|
---|
[baac59c] | 556 | </para>
|
---|
[5c7f2497] | 557 | </listitem>
|
---|
| 558 | <listitem>
|
---|
[baac59c] | 559 | <para>
|
---|
[d885388] | 560 | On a machine with only 4 CPUs online, the default of scheduling
|
---|
[c7ce2b46] | 561 | N+2 jobs for qtwebengine is slower by between 3% and 7%, probably
|
---|
[d885388] | 562 | because of the size of the C++ files and their many includes and
|
---|
| 563 | templates. Therefore, if in doubt set NINJAJOBS to the number of CPUs.
|
---|
[baac59c] | 564 | </para>
|
---|
[5c7f2497] | 565 | </listitem>
|
---|
| 566 | <listitem>
|
---|
[baac59c] | 567 | <para>
|
---|
| 568 | Reducing the number of cores being used on long running, CPU
|
---|
| 569 | intensive packages may alleviate heat problems.
|
---|
| 570 | </para>
|
---|
[5c7f2497] | 571 | </listitem>
|
---|
[00032e41] | 572 | <listitem>
|
---|
| 573 | <para>
|
---|
| 574 | Reducing the number of cores will prevent potential out-of-memory
|
---|
| 575 | problems on systems that do not have enough memory (or swap)
|
---|
[8558044] | 576 | when all cores are active. A suggested approach is to limit
|
---|
| 577 | the number of cores to about one core for each 1.5 GB of
|
---|
[00032e41] | 578 | combined RAM and swap space.
|
---|
| 579 | </para>
|
---|
| 580 | </listitem>
|
---|
[5c7f2497] | 581 | </itemizedlist>
|
---|
[ceb3dc7] | 582 |
|
---|
| 583 | </sect2>
|
---|
| 584 |
|
---|
[55a55f1] | 585 | <sect2 role="configuration">
|
---|
| 586 | <title>Configuring QtWebEngine</title>
|
---|
| 587 |
|
---|
| 588 | <sect3 id="qtwebengine-config">
|
---|
| 589 | <title>Configuration Information</title>
|
---|
| 590 |
|
---|
| 591 | <para>
|
---|
| 592 | If you are upgrading from an older minor version of this
|
---|
| 593 | application, for some webpages to load you may need to
|
---|
| 594 | clear the <emphasis>browser</emphasis> caches, e.g. for
|
---|
| 595 | <application>falkon</application> they will be found in
|
---|
| 596 | <filename class="directory">~/.cache/falkon/</filename>.
|
---|
| 597 | You will need to do this if the browser starts to render
|
---|
| 598 | the page and then changes to a blank tab with a message
|
---|
| 599 | that something went wrong, and a button to Retry. Even
|
---|
| 600 | after removing the old caches, you may need to retry a
|
---|
| 601 | few times for each affected tab.
|
---|
| 602 | </para>
|
---|
| 603 |
|
---|
[4eb513e] | 604 | <para>
|
---|
| 605 | If a browser using this package fails to run and when run
|
---|
| 606 | from a term it reports 'Trace/breakpoint trap' that is
|
---|
| 607 | probably a kernel configuration issue - there is no need
|
---|
| 608 | to rebuild QtWebEngine, see the next section, recompile
|
---|
| 609 | the kernel and reboot to the new kernel.
|
---|
| 610 | </para>
|
---|
| 611 |
|
---|
[55a55f1] | 612 | </sect3>
|
---|
| 613 |
|
---|
| 614 | </sect2>
|
---|
| 615 |
|
---|
[4eb513e] | 616 | <sect2 role="kernel" id="qtwebengine-kernel">
|
---|
| 617 | <title>Kernel Configuration</title>
|
---|
| 618 |
|
---|
| 619 | <para>
|
---|
[866d8e15] | 620 | This package does not require any of the optional kernel namespace items,
|
---|
| 621 | but if User namespace is enabled <phrase revision="systemd">(as happens
|
---|
| 622 | in some unit files, for hardening)</phrase> PID namespace must also be
|
---|
| 623 | enabled. In that case enable the following options in the kernel
|
---|
| 624 | configuration and recompile the kernel if necessary:
|
---|
[4eb513e] | 625 | </para>
|
---|
| 626 |
|
---|
| 627 | <!-- Spaces are significant in <screen> sections -->
|
---|
| 628 | <screen><literal>General setup --->
|
---|
| 629 | -*- Namespaces support --->
|
---|
[866d8e15] | 630 | [ ] User namespace [CONFIG_USER_NS]
|
---|
| 631 | [*] PID namespace [CONFIG_PID_NS]</literal></screen>
|
---|
[4eb513e] | 632 |
|
---|
| 633 | <indexterm zone="qtwebengine qtwebengine-kernel">
|
---|
| 634 | <primary sortas="d-qtwebengine">qtwebengine</primary>
|
---|
| 635 | </indexterm>
|
---|
| 636 | </sect2>
|
---|
[55a55f1] | 637 |
|
---|
[ceb3dc7] | 638 | <sect2 role="content">
|
---|
| 639 | <title>Contents</title>
|
---|
| 640 |
|
---|
| 641 | <segmentedlist>
|
---|
| 642 | <segtitle>Installed Programs</segtitle>
|
---|
| 643 | <segtitle>Installed Libraries</segtitle>
|
---|
| 644 | <segtitle>Installed Directories</segtitle>
|
---|
| 645 |
|
---|
| 646 | <seglistitem>
|
---|
| 647 | <seg>
|
---|
[8558044] | 648 | qtwebengine_convert_dict and
|
---|
[e10e1a8e] | 649 | QtWebEngineProcess (in $QT5DIR/libexec)
|
---|
[ceb3dc7] | 650 | </seg>
|
---|
| 651 | <seg>
|
---|
[21552cf] | 652 | libQt5Pdf.so,
|
---|
| 653 | libQt5PdfWidgets.so,
|
---|
[8558044] | 654 | libQt5WebEngineCore.so,
|
---|
| 655 | libQt5WebEngine.so, and
|
---|
[640f4c21] | 656 | libQt5WebEngineWidgets.so
|
---|
[ceb3dc7] | 657 | </seg>
|
---|
| 658 | <seg>
|
---|
[21552cf] | 659 | $QT5DIR/include/QtPdf,
|
---|
| 660 | $QT5DIR/include/QtPdfWidgets,
|
---|
[e10e1a8e] | 661 | $QT5DIR/include/QtWebEngine,
|
---|
| 662 | $QT5DIR/include/QtWebEngineCore,
|
---|
| 663 | $QT5DIR/include/QtWebEngineWidgets,
|
---|
| 664 | $QT5DIR/qml/QtWebEngine, and
|
---|
| 665 | $QT5DIR/translations/qtwebengine_locales
|
---|
[ceb3dc7] | 666 | </seg>
|
---|
| 667 | </seglistitem>
|
---|
| 668 | </segmentedlist>
|
---|
| 669 |
|
---|
| 670 | <variablelist>
|
---|
| 671 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 672 | <?dbfo list-presentation="list"?>
|
---|
| 673 | <?dbhtml list-presentation="table"?>
|
---|
| 674 |
|
---|
| 675 | <varlistentry id="qtwebengine_convert_dict">
|
---|
| 676 | <term><command>qtwebengine_convert_dict</command></term>
|
---|
| 677 | <listitem>
|
---|
| 678 | <para>
|
---|
| 679 | converts hunspell dictionaries (<literal>.dic</literal>) to chromium
|
---|
| 680 | format (<literal>.bdic</literal>)
|
---|
| 681 | </para>
|
---|
| 682 | <indexterm zone="qtwebengine qtwebengine_convert_dict">
|
---|
| 683 | <primary sortas="b-qtwebengine_convert_dict">qtwebengine_convert_dict</primary>
|
---|
| 684 | </indexterm>
|
---|
| 685 | </listitem>
|
---|
| 686 | </varlistentry>
|
---|
| 687 |
|
---|
| 688 | <varlistentry id="QtWebEngineProcess">
|
---|
| 689 | <term><command>QtWebEngineProcess</command></term>
|
---|
| 690 | <listitem>
|
---|
| 691 | <para>
|
---|
| 692 | is a libexec program which runs a zygote process (one that listens
|
---|
| 693 | for spawn requests from a master process and will fork itself in
|
---|
[4c24eb0a] | 694 | response)
|
---|
[ceb3dc7] | 695 | </para>
|
---|
| 696 | <indexterm zone="qtwebengine QtWebEngineProcess">
|
---|
| 697 | <primary sortas="b-QtWebEngineProcess">QtWebEngineProcess</primary>
|
---|
| 698 | </indexterm>
|
---|
| 699 | </listitem>
|
---|
| 700 | </varlistentry>
|
---|
| 701 |
|
---|
| 702 | <varlistentry id="libQtWebEngine-lib">
|
---|
| 703 | <term><filename class="libraryfile">libQtWebEngine.so</filename></term>
|
---|
| 704 | <listitem>
|
---|
| 705 | <para>
|
---|
[4c24eb0a] | 706 | provides QML types for rendering web content within a QML application
|
---|
[ceb3dc7] | 707 | </para>
|
---|
| 708 | <indexterm zone="qtwebengine libQtWebEngine-lib">
|
---|
| 709 | <primary sortas="c-libQtWebEngine">libQtWebEngine.so</primary>
|
---|
| 710 | </indexterm>
|
---|
| 711 | </listitem>
|
---|
| 712 | </varlistentry>
|
---|
| 713 |
|
---|
| 714 | <varlistentry id="libQtWebEngineCore">
|
---|
| 715 | <term><filename class="libraryfile">libQtWebEngineCore.so</filename></term>
|
---|
| 716 | <listitem>
|
---|
| 717 | <para>
|
---|
[4c24eb0a] | 718 | provides public API shared by both QtWebEngine and QtWebEngineWidgets
|
---|
[ceb3dc7] | 719 | </para>
|
---|
| 720 | <indexterm zone="qtwebengine libQtWebEngineCore">
|
---|
| 721 | <primary sortas="c-libQtWebEngineCore">libQtWebEngineCore.so</primary>
|
---|
| 722 | </indexterm>
|
---|
| 723 | </listitem>
|
---|
| 724 | </varlistentry>
|
---|
| 725 |
|
---|
| 726 | <varlistentry id="libQtWebEngineWidgets">
|
---|
| 727 | <term><filename class="libraryfile">libQtWebEngineWidgets.so</filename></term>
|
---|
| 728 | <listitem>
|
---|
| 729 | <para>
|
---|
| 730 | provides a web browser engine as well as C++ classes to render and
|
---|
[4c24eb0a] | 731 | interact with web content
|
---|
[ceb3dc7] | 732 | </para>
|
---|
| 733 | <indexterm zone="qtwebengine libQtWebEngineWidgets">
|
---|
| 734 | <primary sortas="c-libQtWebEngineWidgets">libQtWebEngineWidgets.so</primary>
|
---|
| 735 | </indexterm>
|
---|
| 736 | </listitem>
|
---|
| 737 | </varlistentry>
|
---|
| 738 |
|
---|
| 739 | </variablelist>
|
---|
| 740 | </sect2>
|
---|
[4c24eb0a] | 741 |
|
---|
[ceb3dc7] | 742 | </sect1>
|
---|