Qt-6.11.2

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-1374

### Chapter 25. Graphical Environment Libraries

- Prev

  Pangomm-2.56.2

- Next

  QtWebEngine-6.11.2

- Up
- Home

# Qt-6.11.2

## Introduction to Qt6

Qt6 is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt6 is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers.

### Note

This version of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable version of the System V books.

### Package Information

- Download (HTTP): https://download.qt.io/archive/qt/6.11/6.11.2/single/qt-everywhere-src-6.11.2.tar.xz

- Download MD5 sum: 669c1f3a41c37fdda389094882044d7a

- Download size: 972 MB

- Estimated disk space required: 48 GB (504 MB installed)

- Estimated build time: 14 SBU (using parallelism=8)

### Qt6 Dependencies

#### Required

Xorg Libraries

#### Recommended

alsa-lib-1.2.16.1, make-ca-1.16.1, Cups-2.4.19, dbus-1.16.2, double-conversion-3.4.0, GLib-2.88.3, FFmpeg-9.0.1 (for the QtMultimedia backend), gst-plugins-base-1.28.6, gst-plugins-good-1.28.6, and gst-plugins-bad-1.28.6 (for the QtMultimedia backend), harfBuzz-14.3.1, ICU-78.3, jasper-4.2.9, libjpeg-turbo-3.2.0, libinput-1.31.3, libmng-2.0.3, libpng-1.6.58, tiff-4.7.2, libwebp-1.6.0, libxkbcommon-1.13.2, Mesa-26.1.7, mtdev-1.1.7, Wayland-1.26.0 (Mesa must be built with Wayland EGL backend), and XCB Utilities

#### Optional

BlueZ-5.87 (for sdpscanner, and at runtime for QtConnectivity module), GTK-3.24.52, ibus-1.5.34, LLVM-22.1.8 (with Clang), libproxy-0.5.12, MariaDB-12.3.3 or MySQL, MIT Kerberos V5-1.22.2, pciutils-3.15.0, PostgreSQL-18.6, Protobuf-35.1, PulseAudio-17.0, sdl2-compat-2.32.70, unixODBC-2.3.14, assimp, Flite, Firebird, FreeTDS, OpenAL, speech-dispatcher, and tslib

### Note

Either the gstreamer stack or ffmpeg must be installed to use programs which use QtMultimedia. Not having a backend available can cause any program that uses QtMultimedia to crash. For example, Konsole can exit with a SIGABRT if no backend is provided for QtMultimedia to use.

## Setting the installation prefix

### Installing in /opt/qt6

The BLFS editors recommend installing Qt6 in a directory other than `/usr`, i.e. `/opt/qt6`. To do this, set the following environment variable:

    export QT6PREFIX=/opt/qt6

### Tip

Sometimes the installation paths are hardcoded into installed files. This is the reason why `/opt/qt6` is used as installation prefix instead of `/opt/qt-6.11.2`. To create a versioned Qt6 directory, you may rename the directory and create a symlink:

    mkdir -pv /opt/qt-6.11.2
    ln -sfnv qt-6.11.2 /opt/qt6

Later on, you may want to install other versions of Qt6. To do that, just remove the symlink, create the new versioned directory, and recreate the `/opt/qt6` symlink again before building the new version. Which version of Qt6 you use depends only on where the symlink points.

### Note

If any of libqtxdg-4.4.0, qca-2.3.10, qcoro-0.13.0, qtkeychain-0.16.0, or sddm-0.21.0 have been installed, then those packages will need to be reinstalled after installing this package.

## Installation of Qt6

### Warning

If Qt6 is being reinstalled into the same directory as an existing instance, run the commands done by `root`, such as make install, from a console or non-Qt6 based window manager. It overwrites Qt6 libraries that should not be in use during the install process.

### Caution

If you did not install some of the recommended dependencies, examine ./configure --help output to check how to disable them or use internal versions bundled in the source tarball.

### Note

The build time and space required for the full Qt6 is quite long. The instructions below do not build the tutorials and examples. Removing the `-nomake` line will create additional resources..

### Note

The BLFS editors do not recommend installing Qt6 into the /usr hierarchy because it becomes difficult to find components and to update to a new version.

If you are on an i686 system, disable a conflicting declaration and fix a build error due to SIMD intrinsics in QtMultimedia:

    if [ "$(uname -m)" == "i686" ]; then
        sed -e "/^#elif defined(Q_CC_GNU_ONLY)/s/.*/& \&\& 0/" \
            -i qtbase/src/corelib/global/qtypes.h                          &&
        export CXXFLAGS+="-DDISABLE_SIMD -DPFFFT_SIMD_DISABLE"
    fi

Next, remove two components that are not used in BLFS and take a long time to build. Also, remove qtwebengine because we build that component separately with system-installed components. In addition, remove the qtopcua module which is not used in BLFS and which breaks with OpenSSL-4:

    rm -rf qtwebengine qt3d qtquick3dphysics qtopcua

Install Qt6 by running the following commands:

    ./configure -prefix $QT6PREFIX   \
                -sysconfdir /etc/xdg \
                -dbus-linked         \
                -openssl-linked      \
                -system-sqlite       \
                -nomake examples     \
                -no-rpath            \
                -no-sbom             \
                -syslog              &&
    ninja

This package does not come with a test suite.

Now, as the `root` user:

    ninja install

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

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

Install images and create the menu entries for installed applications. Again as the `root` user:

    pushd qttools/src &&

    install -v -Dm644 assistant/assistant/images/assistant-128.png       \
                      /usr/share/pixmaps/assistant-qt6.png               &&

    install -v -Dm644 designer/src/designer/images/designer.png          \
                      /usr/share/pixmaps/designer-qt6.png                &&

    install -v -Dm644 linguist/linguist/images/icons/linguist-128-32.png \
                      /usr/share/pixmaps/linguist-qt6.png                &&

    install -v -Dm644 qdbus/qdbusviewer/images/qdbusviewer-128.png       \
                      /usr/share/pixmaps/qdbusviewer-qt6.png             &&
    popd &&

    cat > /usr/share/applications/assistant-qt6.desktop << EOF
    [Desktop Entry]
    Name=Qt6 Assistant
    Comment=Shows Qt6 documentation and examples
    Exec=$QT6PREFIX/bin/assistant
    Icon=assistant-qt6.png
    Terminal=false
    Encoding=UTF-8
    Type=Application
    Categories=Qt;Development;Documentation;
    EOF

    cat > /usr/share/applications/designer-qt6.desktop << EOF
    [Desktop Entry]
    Name=Qt6 Designer
    GenericName=Interface Designer
    Comment=Design GUIs for Qt6 applications
    Exec=$QT6PREFIX/bin/designer
    Icon=designer-qt6.png
    MimeType=application/x-designer;
    Terminal=false
    Encoding=UTF-8
    Type=Application
    Categories=Qt;Development;
    EOF

    cat > /usr/share/applications/linguist-qt6.desktop << EOF
    [Desktop Entry]
    Name=Qt6 Linguist
    Comment=Add translations to Qt6 applications
    Exec=$QT6PREFIX/bin/linguist
    Icon=linguist-qt6.png
    MimeType=text/vnd.trolltech.linguist;application/x-linguist;
    Terminal=false
    Encoding=UTF-8
    Type=Application
    Categories=Qt;Development;
    EOF

    cat > /usr/share/applications/qdbusviewer-qt6.desktop << EOF
    [Desktop Entry]
    Name=Qt6 QDbusViewer
    GenericName=D-Bus Debugger
    Comment=Debug D-Bus applications
    Exec=$QT6PREFIX/bin/qdbusviewer
    Icon=qdbusviewer-qt6.png
    Terminal=false
    Encoding=UTF-8
    Type=Application
    Categories=Qt;Development;Debugger;
    EOF

## Command Explanations

`-nomake examples`: This switch disables building of the example programs included in the source tarball. Remove it if you want to build them.

`-skip qt3d`: This switch disables building qt3d support. There is a problem building these files without an external library and no packages in BLFS use qt3d.

`-system-sqlite`: This switch enables use of the system version of SQLite.

`-dbus-linked` `-openssl-linked`: These switches enable explicit linking of the D-Bus and OpenSSL libraries into Qt6 libraries instead of dlopen()-ing them.

`-syslog`: This switch allows sending Qt messages to the syslog logging system.

`-skip qtwebengine`: This switch disables building the QtWebEngine. The BLFS editors have chosen to build qtwebengine-6.11.2 separately.

`-skip qtquick3dphysics`: This switch disables building the Qt Quick 3D Physics submodule. On 32-bit systems, this will cause the build process to fail with an inlining error in Qt6's bundled copy of the PhysX SDK.

`-libproxy`: This switch enables the usage of libproxy for determining proxy server information.

## Configuring Qt6

### Configuration Information

If Sudo-1.9.17p2 is installed, QT6DIR should be available to the super user as well. Execute the following commands as the `root` user:

    cat > /etc/sudoers.d/qt << "EOF"
    Defaults env_keep += QT6DIR
    EOF

You now need to update the following configuration files so that Qt6 is correctly found by other packages and system processes.

As the `root` user, update the `/etc/ld.so.conf` file and the dynamic linker's run-time cache file:

    cat >> /etc/ld.so.conf << EOF
    # Begin Qt addition

    /opt/qt6/lib

    # End Qt addition
    EOF

    ldconfig

As the `root` user, create the `/etc/profile.d/qt6.sh` file:

    cat > /etc/profile.d/qt6.sh << "EOF"
    # Begin /etc/profile.d/qt6.sh

    QT6DIR=/opt/qt6

    pathappend $QT6DIR/bin           PATH
    pathappend $QT6DIR/lib/pkgconfig PKG_CONFIG_PATH

    export QT6DIR

    # End /etc/profile.d/qt6.sh
    EOF

## Contents

Installed Programs: androiddeployqt (hard link to androiddeployqt6), androiddeployqt6, androidtestrunner, assistant, balsam, balsamui, canbusutil, designer, instancer, kmap2qmap, lcheck, lconvert, lightmapviewer, linguist, lottietoqml, lrelease, lrelease-pro, ltext2id, lupdate, lupdate-pro, materialeditor, meshdebug, particleshadergen, pixeltool, qcshadergen, qdbus, qdbuscpp2xml, qdbusviewer, qdbusxml2cpp, qdistancefieldgenerator, qmake (hard link to qmake6), qmake6, qml, qmlcontextpropertydump, qmldom, qmleasing, qmlformat, qmllint, qmlls, qmlplugindump, qmlpreview, qmlprofiler, qmlscene, qmltc, qmltestrunner, qmltime, qqem, qsb, qtdiag (hard link to qtdiag6), qtdiag6, qtpaths (hard link to qtpaths6), qtpaths6, qtplugininfo, qt-cmake, qt-cmake-create, qt-configure-module, shadergen, shapegen, svgtoqml, wasmdeployqt, and wasmdeployqt6
Installed Libraries: libQt6Bluetooth.so, libQt6BundledEmbree.a, libQt6BundledOpenXR.a, libQt6BundledResonanceAudio.a, libQt6CanvasPainter.so, libQt6Charts.so, libQt6ChartsQml.so, libQt6Coap.so, libQt6Concurrent.so, libQt6Core.so, libQt6Core5Compat.so, libQt6DBus.so, libQt6DataVisualization.so, libQt6DataVisualizationQml.so, libQt6Designer.so, libQt6DesignerComponents.so, libQt6DeviceDiscoverySupport.a, libQt6EglFSDeviceIntegration.so, libQt6EglFsKmsGbmSupport.so, libQt6EglFsKmsSupport.so, libQt6FbSupport.a, libQtFFmpegMediaPluginImpl.a, libQt6Graphs.so, libQt6GraphsWidgets.so, libQt6Grpc.so, libQt6GrpcQuick.so, libQt6GstreamerMediaPluginImpl.a, libQt6Gui.so, libQt6Help.so, libQt6HttpServer.so, libQt6InputSupport.a, libQt6JsonRpc.so, libQt6KmsSupport.a, libQt6LabsAnimation.so, libQt6LabsFolderListModel.so, libQt6LabsPlatform.so, libQt6LabsQmlModels.so, libQt6LabsSettings.so, libQt6LabsSharedImage.so, libQt6LabsStyleKitImpl.so, libQt6LabsSynchronizer.so, libQt6LabsWavefrontMesh.so, libQt6LanguageServer.a, libQt6Location.so, libQt6Lottie.so, libQt6LottieVectorImageGenerator.so, libQt6LottieVectorImageHelpers.so, libQt6Mqtt.so, libQt6Multimedia.so, libQt6MultimediaQuick.so, libQt6MultimediaTestLib.a, libQt6MultimediaWidgets.so, libQt6Network.so, libQt6NetworkAuth.so, libQt6Nfc.so, libQt6OpenGL.so, libQt6OpenGLWidgets.so, libQt6PacketProtocol.a, libQt6Positioning.so, libQt6PositioningQuick.so, libQt6PrintSupport.so, libQt6Protobuf.so, libQt6ProtobufQtCoreTypes.so, libQt6ProtobufQtGuiTypes.so, libQt6ProtobufQuick.so, libQt6ProtobufWellKnownTypes.so, libQt6Qml.so, libQt6QmlAssetDownloader.a, libQt6QmlCompiler.so, libQt6QmlCore.so, libQt6QmlDebug.a, libQt6QmlDom.a, libQt6QmlFormat.a, libQt6QmlLocalStorage.so, libQt6QmlLS.a, libQt6QmlMeta.so, libQt6QmlModels.so, libQt6QmlNetwork.so, libQt6QmlToolingSettings.a, libQt6QmlTypeRegistrar.a, libQt6QmlWorkerScript.so, libQt6QmlXmlListModel.so, libQt6Quick.so, libQt6Quick3D.so, libQt6Quick3DAssetImport.so, libQt6Quick3DAssetUtils.so, libQt6Quick3DEffects.so, libQt6Quick3DGlslParser.so, libQt6Quick3DHelpers.so, libQt6Quick3DHelpersImpl.so, libQt6Quick3DIblBaker.so, libQt6Quick3DParticleEffects.so, libQt6Quick3DParticles.so, libQt6Quick3DRuntimeRender.so, libQt6Quick3DSpatialAudio.so, libQt6Quick3DUtils.so, libQt6Quick3DXr.so, libQt6QuickControls2.so, libQt6QuickControls2Basic.so, libQt6QuickControls2BasicStyleImpl.so, libQt6QuickControls2FluentWinUI3StyleImpl.so, libQt6QuickControls2Fusion.so, libQt6QuickControls2FusionStyleImpl.so, libQt6QuickControls2Imagine.so, libQt6QuickControls2ImagineStyleImpl.so, libQt6QuickControls2Impl.so, libQt6QuickControls2Material.so, libQt6QuickControls2MaterialStyleImpl.so, libQt6QuickControls2Universal.so, libQt6QuickControls2UniversalStyleImpl.so, libQt6QuickControlsTestUtils.a, libQt6QuickDialogs2.so, libQt6QuickDialogs2QuickImpl.so, libQt6QuickDialogs2Utils.so, libQt6QuickEffects.so, libQt6QuickLayouts.so, libQt6QuickParticles.so, libQt6QuickShapes.so, libQt6QuickShapesDesignHelpers.so, libQt6QuickTemplates2.so, libQt6QuickTimelineBlendTrees.so, libQt6QuickTest.so, libQt6QuickTestUtils.a, libQt6QuickTimeline.so, libQt6QuickTimelineBlendTrees.so, libQt6QuickVectorImageGenerator.so, libQt6QuickVectorImageHelpers.so, libQt6QuickVectorImage.so, libQt6QuickWidgets.so, libQt6RemoteObjects.so, libQt6RemoteObjectsQml.so, libQt6Scxml.so, libQt6ScxmlQml.so, libQt6Sensors.so, libQt6SensorsQuick.so, libQt6SerialBus.so, libQt6SerialPort.so, libQt6ShaderTools.so, libQt6SpatialAudio.so, libQt6Sql.so, libQt6StateMachine.so, libQt6StateMachineQml.so, libQt6Svg.so, libQt6SvgWidgets.so, libQt6TaskTree.so, libQt6Test.so, libQt6TextToSpeech.so, libQt6UiTools.so, libQt6VirtualKeyboard.so, libQt6VirtualKeyboardQml.so, libQt6VirtualKeyboardSettings.so, libQt6WaylandClient.so, libQt6WaylandCompositor.so, libQt6WaylandCompositorIviapplication.so, libQt6WaylandCompositorPresentationTime.so, libQt6WaylandCompositorWLShell.so, libQt6WaylandCompositorXdgShell.so, libQt6WaylandEglClientHwIntegration.so, libQt6WaylandEglCompositorHwIntegration.so, libQt6WebChannel.so, libQt6WebChannelQuick.so, libQt6WebSockets.so, libQt6WebView.so, libQt6WebViewQuick.so, libQt6Widgets.so, libQt6WlShellIntegration.so, libQt6XcbQpa.so, and libQt6Xml.so
Installed Directories: /opt/qt6 and /opt/qt-6.11.2

### Short Descriptions

assistant | is a tool for presenting on-line documentation
balsam | is a tool to convert 3D scenes from various creation tools to QML format, for use by the new QtQuick 3D library
canbustil | is a tool to deal with arbitrary CAN bus frames. A Controller Area Network (CAN) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer
designer | is a full-fledged GUI builder. It includes powerful features such as preview mode, automatic widget layout, support for custom widgets, and an advanced property editor
lconvert | is part of Qt6's Linguist tool chain. It can be used as a standalone tool to convert and filter translation data files
lightmapviewer-qt6 | displays lightmaps generated in Qt's format, and lists information about them
linguist | provides support for translating applications into local languages
lottietoqml | converts lottie files (which are in SVG format) to QML files
lrelease | is a simple command line tool. It reads XML-based translation files in TS format and produces message files used by the application
lupdate | finds the translatable strings in the specified source, header and Qt Designer interface files, and stores the extracted messages in translation files to be processed by lrelease
meshdebug | displays information about qtquick-3d mesh files
pixeltool | is a desktop magnifier - as you move your mouse around the screen, it will show the magnified contents in its window
qdbus | lists available services, object paths, methods, signals, and properties of objects on a bus
qdbuscpp2xml | takes a C++ source file and generates a D-Bus XML definition of the interface
qdbusviewer | is a graphical D-Bus browser
qdbusxml2cpp | is a tool that can be used to parse interface descriptions and produce static code representing those interfaces,
qdistancefieldgenerator | allows a font cache to be pregenerated for Text.QtRendering to speed up an application's startup if the user interface has a lot of text, or multiple fonts, or a large amount of distinct characters, e.g. in CJK writing systems
qmake | uses information stored in project files to determine what should go in the makefiles it generates
qml | executes a QML file
qmleasing | is a tool used to define the easing curves using an interactive curve editor
qmlformat | formats QML files according to the QML coding conventions
qmllint | is a syntax checker for QML files
qmlplugindump | is a tool to create a qmltypes file
qmlpreview | is a tool used to analyze QML applications
qmlprofiler | is a tool which watches QML and JavaScript files on disk and updates the application live with any changes
qmlscene | is a utility that loads and displays QML documents even before the application is complete
qmltestrunner | is a tool used to make tests
qtdiag | is a tool for reporting diagnostic information about Qt and its environment
qtpaths | is a tool to query Qt path information
qtplugininfo | dumps meta-data about Qt plugins in JSON format

- Prev

  Pangomm-2.56.2

- Next

  QtWebEngine-6.11.2

- Up
- Home