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