[Development] Qt 6 co-installability with Qt 5

Joerg Bornemann joerg.bornemann at qt.io
Fri Feb 12 10:21:39 CET 2021


Hi,

here comes an update on the status of co-installability of Qt5 and Qt6.

For the main issue QTBUG-89170, I've created 
https://codereview.qt-project.org/c/qt/qtbase/+/334054
Package maintainers, please review this patch.

Let me paste parts of the commit message to fill you in what this is about.

---snip---
When packaging different Qt versions for Linux distributions (or any
distribution with a common bin dir), Qt tools cannot be installed to
/usr/bin, because the executable names of the different Qt versions
clash.

To solve this conflict, our recommendation is to install Qt's tools to
/usr/qt6/bin and to create versioned symlinks to user-facing tools in
/usr/bin.

User-facing tools are tools that are supposed to be started manually by
the user. They are marked in Qt's build system. Distro package
maintainers can now configure with
   -DCMAKE_INSTALL_PREFIX=/usr
   -DINSTALL_BINDIR=/usr/qt6/bin
   -DINSTALL_PUBLICBINDIR=/usr/bin
and will find a file called user_facing_tool_links.txt in the build
directory after the cmake run. Nothing will be installed to
INSTALL_PUBLICBINDIR.

Each line of user_facing_tool_links.txt consists of the installation
path of a user-facing application followed by a space and the versioned
link name in INSTALL_PUBLICBINDIR.

Example content:
/usr/qt6/bin/qmake /usr/bin/qmake6

To actually create the versioned symlinks, the content of this file can
be fed to ln like this:
   xargs ln -s < build-dir/user_facing_tool_links.txt

Or the package maintainer may decide to do something completely
different as suits their needs.
---snap---

Apart from that, we still plan to move the non-user-facing tools to 
libexec. QTBUG-88791 tracks this.
Patch is here: https://codereview.qt-project.org/c/qt/qtbase/+/331332



Cheers,

Joerg


More information about the Development mailing list