QtChooser doesn't support qt6

Bug #1964763 reported by Andrea Marchesini
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
qtchooser (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

qtchooser doesn't run qt6 applications because it doesn't have a qt6.conf/6.conf file yet.

In order to work, it must have two files `/usr/lib/x86_64-linux-gnu/qtchooser/qt6.conf` and a `/usr/lib/x86_64-linux-gnu/qtchooser/6.conf` with this content:

```
/usr/lib/qt6/bin
/usr/lib/x86_64-linux-gnu
```

Without it, lupdate, lrelease, and any other qt6 tools show this error: `could not find a Qt installation of ''`

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtchooser (Ubuntu):
status: New → Confirmed
Revision history for this message
tom stevens (tsteven4) wrote :

This is a debdiff for qtchooser applicable to qtchooser_66-2build1. I built this in pbuilder
and it builds successfully, and I installed it, the patch works as intended.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "1-qtchooser_66-2ubuntu1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Be (be.ing) wrote :

I stumbled over this setting up CI for a Qt project that supports both Qt6 and Qt5. I confirm that creating a /usr/lib/x86_64-linux-gnu/qtchooser/qt6.conf file with the contents:

```
/usr/lib/qt6/bin
/usr/lib/x86_64-linux-gnu
```

and setting the QT_SELECT environment variable to `qt6` works around the bug.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

I was going to request this change into Debian as well, but appears that has already been attempted and was rejected due to "qtchooser is dead upstream". https://salsa.debian.org/qt-kde-team/qt/qtchooser/-/merge_requests/2

I wonder if the situation can be improved though as if you are trying to use Qt 6 tooling in a container image then you need workarounds :-/

Revision history for this message
Thomas Ward (teward) wrote (last edit ):

If Qtchooser is dead upstream, then it's probably a candidate for removal as soon as Qt5 is retired.

Note that because Debian has refused to even add Qt6 because QtChooser is dead upstream by design, and I'm gathering as such should not be used with Qt6, I opened a Debian bug suggesting that they mark the package as "Breaks:" for all Qt6 libraries.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011935

Revision history for this message
Anders F Björklund (afbjorklund) wrote :

There also needs to be a default.conf, to avoid having to set QT_SELECT

Revision history for this message
Eric Levy (8mabmzqcnyc1g4i7tjyvuprzli-contact-clubl5mz6ldresgvtiayqw6wzb) wrote :

Adding further configuration for Chooser may support invocation of tools for Qt 6, but desktop icons, for example, for Designer, are also unavailable except for Qt 5.

Perhaps the report would be more appropriate for a different package. Unfortunately, I am not adequately familiar with the system. The organization of the various packages for Qt 6 is quite chaotic.

Revision history for this message
Julian Andres Klode (juliank) wrote :

The reasoning for rejection on the Debian side seems valid, and since that's a universe package maintained by the community it's best left that way.

Changed in qtchooser (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
tom stevens (tsteven4) wrote :

If you are using cmake you might get your builds to find the desired flavor by setting
CMAKE_PREFIX_PATH to something like /usr/lib/x86_64-linux-gnu/cmake/Qt6 or /usr/lib/x86_64-linux-gnu/cmake/Qt5 either on the command line or by exporting that variable.

Revision history for this message
Andi McClure (andi-mcc) wrote :

Just found this and I am unhappy about this outcome.

Currently, if you type "qmake" into the command line on a new (23.10) Ubuntu with no qt, it says qmake is provided by the package qtchooser.

So I install qtchooser as recommended by Ubuntu, then I find out that qtchooser is considered a dead project by Ubuntu and does not support current qt. It's not obvious to me what the correct thing for Ubuntu have done here is, but overall that's kind of weird.

I don't guess y'all have a way to flag, in that command line "executable not found, try this package", that certain listed packages are deprecated?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.