QtWebEngine-5.13.0

#### Beyond Linux® From Scratch (systemd Edition) - Version 9.0

### Chapter 25. X Libraries

- Prev

  Qt-5.13.0

- Next

  startup-notification-0.12

- Up
- Home

# QtWebEngine-5.13.0

## Introduction to QtWebEngine

QtWebEngine integrates chromium's web capabilities into Qt. It ships with its own copy of ninja which it uses for the build if it cannot find a system copy, and various copies of libraries from ffmpeg, icu, libvpx, and zlib (including libminizip) which have been forked by the chromium developers.

This package is known to build and work properly using an LFS-9.0 platform.

### Note

By default, ninja will use all online CPUs +2 (if at least 4 exist), even if they are not available to the current task because the build terminal has been restricted with 'taskset'. To work around this, see the Command Explanations below.

Unusually, the shipped GN build system (used to create the Ninja files) requires a static `libstdc++.a` although the installed libraries correctly use the shared version. If that static library is not present, the build will fail quite quickly. Please note that if you try to build webengine as part of Qt and the static library is not available, that build will either complete without installing webengine, or else fail during the install (both variants have been observed in 5.12.0).

### Package Information

- Download (HTTP): https://download.qt.io/archive/qt/5.13/5.13.0/submodules/qtwebengine-everywhere-src-5.13.0.tar.xz

- Download MD5 sum: 235ecc14211ba03ae7331c175c1b7c78

- Download size: 245 MB

- Estimated disk space required: 3.5 GB (135 MB installed)

- Estimated build time: 62 SBU (using 4 cores)

### Additional Downloads

- Required patch: http://www.linuxfromscratch.org/patches/blfs/9.0/qtwebengine-5.13.0-background_rendering_fix-1.patch

### qtwebengine Dependencies

#### Required

NSS-3.45, Python-2.7.16, and Qt-5.13.0

#### Recommended

### Note

If these packages are not installed, the build process will compile and install its own (perhaps older) version, with the side effect of increasing build and installed disk space and build time.

either alsa-lib-1.1.9 or PulseAudio-12.2 (or both), FFmpeg-4.2, ICU-64.2, libwebp-1.0.3, libxslt-1.1.33, and Opus-1.3.1

#### Optional

libevent-2.1.11, Poppler-0.79.0, jsoncpp, libsrtp, snappy

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/qtwebengine

## Installation of qtwebengine

First, ensure that the local headers are available when not building as part of the complete Qt-5.13.0:

    find -type f -name "*.pr[io]" |
      xargs sed -i -e 's|INCLUDEPATH += |&$$QTWEBENGINE_ROOT/include |'

Next, apply a patch that fixes background rendering issues in Falkon, and crashes on multimedia-heavy sites.

    patch -Np1 -i ../qtwebengine-5.13.0-background_rendering_fix-1.patch

If an older version of the package's main library has been installed, when the package is built separately it will link to that in preference to its own not-yet-installed version, and fail because of missing symbols. Prevent that by, as the `root` user, moving the symlink out of the way.:

    if [ -e ${QT5DIR}/lib/libQt5WebEngineCore.so ]; then
      mv -v ${QT5DIR}/lib/libQt5WebEngineCore.so{,.old}
    fi

Install qtwebengine by running the following commands:

    mkdir build &&
    cd    build &&

    qmake .. -- -system-ffmpeg -webengine-icu &&
    make

This package does not come with a test suite.

Now, as the `root` user:

    make install

Remove references to the build directory from installed library dependency (prl) files by running the following commands as the `root` user:

    find $QT5DIR/ -name \*.prl \
       -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

## Command Explanations

qmake: This will build the included copy of ninja if it is not already installed and use it to configure the build.

-- -system-ffmpeg -webengine-icu: If any options are passed to qmake they must come after '--' which must follow '..' that points to the main directory. The options here cause it to use system ffmpeg and system icu. If built as part of full Qt5, the system icu is automatically used (only) by Qt5Core if it is available, but unless this option is used webengine will always use its shipped copy of icu, adding time and space to the build.

`NINJAJOBS=4 make`: If you patched system ninja in LFS to recognize the NINJAJOBS environment variable, this command will run system ninja with the specified number of jobs (i.e. 4). There are several reasons why you might want to do this:

- Building on a subset of CPUs allows measuring the build time for that number of processors or to run other CPU-intensive tasks on other cores.

- Improving the build speed on a less-well endowed 4-core machine. On a machine with a powerful CPU and plenty of RAM, running N+2 jobs (the ninja default for 4+ cores) for the large working sets of the C++ compiles in this package is typically only marginally faster than running N jobs at a time. But for a machine with less memory it can be much slower.

- Reducing the number of cores being used on long running, CPU intensive packages may alleviate heat problems.

## Configuring QtWebEngine

### Configuration Information

If you are upgrading from an older minor version of this application, for some webpages to load you may need to clear the browser caches, e.g. for falkon they will be found in `~/.cache/falkon/`. You will need to do this if the browser starts to render the page and then changes to a blank tab with a message that something went wrong, and a button to Retry. Even after removing the old caches, you may need to retry a few times for each affected tab.

## Contents

Installed Programs: qtwebengine_convert_dict and QtWebEngineProcess
Installed Libraries: libQt5WebEngineCore.so, libQt5WebEngine.so, and libQt5WebEngineWidgets.so
Installed Directories: $QT5PREFIX/includeQtWebEngine, $QT5PREFIX/include/QtWebEngineCore, and $QT5PREFIX/include/QtWebEngineWidgets

### Short Descriptions

qtwebengine_convert_dict | converts hunspell dictionaries (`.dic`) to chromium format (`.bdic`)
QtWebEngineProcess | is a libexec program which runs a zygote process (one that listens for spawn requests from a master process and will fork itself in response).
`libQtWebEngine.so` | provides QML types for rendering web content within a QML application.
`libQtWebEngineCore.so` | provides public API shared by both QtWebEngine and QtWebEngineWidgets.
`libQtWebEngineWidgets.so` | provides a web browser engine as well as C++ classes to render and interact with web content.

Last updated on 2019-08-21 15:14:27 -0700

- Prev

  Qt-5.13.0

- Next

  startup-notification-0.12

- Up
- Home