Qt 6 and binaries naming

Sune Vuorela sune at vuorela.dk
Sun Sep 30 19:54:48 BST 2018


I have tried rewriting in a different style. Feel free to cut and paste as you 
feel right. I'm not sure about the best approach.

Subject: Qt6/Qt5 coinstallability (Linux distributions)

In an attempt for Qt4/Qt5 coinstallability, qtchooser was developed to help 
ensure e.g. moc, qdbus and rcc could coexist. 
Unfortunately, it seems to have been mostly provided by Qt Project without too 
much backing from the wider Qt Community, including QtCompany. And only half 
the linux distributions kind of adopted it.

QtChooser has also had its share of bugs that is either hard to fix, or by 
design impossible to fix. [*]

So, maybe for Qt6, we need a different approach; a different approach that 
maybe needs to be thought in in the beginning.

Maybe the simplest approach is to just introduce version numbers to all those 
executables. uic6. qml6. rcc6. (or some variations of that uic-6, uic-qt6, ..)
But we are open to other ideas.

Thanks in advance,
...


[*] a longer list can be provided, but just think how Qt4 default and a 
qtpaths command should work..

On Saturday, August 4, 2018 10:05:38 PM CEST Lisandro Damián Nicanor Pérez 
Meyer wrote:
> Those intersted in avoiding qtchooser, please take a look at this proposal
> for Qt's devel mailing list. Thanks!!
> 
> ---
> 
> Hi! I would like, this time with enough time, to bring to the table
> something that caused us distros some irks in Qt 5: binaries naming.
> 
> The problem is, I think, easy to explain: some binaries had the very same
> name for Qt 4 and 5: moc, uic, rcc, qdbus to name some of them.
> 
> Before qtchooser came in a user could not have the same tool installed at
> the same time for both versions, or would have to put them in another place
> other than /usr/bin or rename them or...
> 
> Admittedly we distro maintainers came up with the issue too late in the
> development process (or at least as far as I know), so Thiago created
> qtchooser which kind of solved the major issues, but not without drawbacks.
> 
> From the [list] of bugs it has in Debian in particular, the most interesting
> one is that we can not depend upon the binaries it [masks]... simply
> starting by the fact that two packages can provide that dependency.
> 
> [list] <https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=qtchooser>
> [masks] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712264>
> 
> Let's suppose for a minute that Qt 5 and 6 both provide qdbus (could have
> been any other app) and that there is a Qt 6 app calling it. Currently the
> app is not required to pass -qt6 as a parameter as qtchooser is not
> mandatory. Following current practices we have both Qt 5 and 6's qdbus
> installed. There are some possible scenarios:
> 
> - Qt 5 is the default version to use.
> 
>   * qdbus has not changed in Qt 6, so Qt 5's version handles the call
> correctly.
>   * qdbus has changed in Qt 6, so Qt 5's version fails.
> 
> - Qt 6 is the default version to use: nothing happens.
> 
> Now make the app a Qt 5 one and invert the scenarios. And let's hope we get
> rid of Qt 4 in the meantime.
> 
> The best solution that we could think of would be to add the major version
> to Qt 6's provided binaries, at very least for the ones that keep their
> name from Qt 5: uic-6, rcc-6, etc. (another scheme might be preferred, like
> maybe uic6).
> 
> Note: we are open to other solutions, we have time to discuss this and try
> to get a good solution in time.
> 
> Maybe we can relax this for build-time tools if qmake is dropped and the
> next buildsystem can use the right tool without the need of special
> switches, as currently happens with CMake.
> 
> I also understand that this might not affect other platforms like Windows,
> but a move here ideally would need to be done for all platforms for
> consistency.
> 
> I would like to acknowledge that some people might find qtchooser useful, so
> I'm not really proposing to remove it but to have another solution around.
> Those who install qtchooser would do it because they know what they are
> doing, maybe even testing different Qt compilations in the same machine.
> 
> Cheers, Lisandro.


-- 
I didn’t stop pretending when I became an adult, it’s just that when I was a 
kid I was pretending that I fit into the rules and structures of this world. 
And now that I’m an adult, I pretend that those rules and structures exist.
   - zefrank





More information about the pkg-kde-talk mailing list