Review Request 127169: By default, make KDE_INSTALL_USE_QT_SYS_PATHS share the same directory scheme as Qt if they share the prefix

Aleix Pol aleixpol at kde.org
Sun Feb 28 12:48:26 UTC 2016


On Sun, Feb 28, 2016 at 9:50 AM, Stephen Kelly <steveire at gmail.com> wrote:
> Aleix Pol Gonzalez wrote:
>>>     I think it would be good to have changes be better understood,
>>>     otherwise we end up with lots of mess. However, it looks like several
>>>     people really want this, and I don't want to stand in the way.
>>
>> I don't mind spending some time to explain it better.
>>
>> Currently what we're doing from ECM, by default, is to _guess_ where Qt
>> will have placed things. Nowadays, `KDE_INSTALL_QTQUICKIMPORTSDIR` points
>> to `${KDE_INSTALL_QTPLUGINDIR}/imports`. See `KDEInstallDirs.cmake:440`.
>>
>> If the Qt installation is configured to get the Qt imports to go to
>> `/usr/lib/IKnowBetter/imports` and we don't change our guess, we'll get
>> both the Qt directory and a `/usr/lib64/plugins/imports` directory where
>> the cmake projects will naïvely place the plugins.
>>
>> An example of a case where we can see people suffering this (I found over
>> a fast google search) is this:
>> https://forum.kde.org/viewtopic.php?f=25&t=130498
>
>
> Thanks for explaining!
>
> So, this isn't being done at the request of packagers? I've asked a few
> times if packagers have complained and no answer has come back. From now I'm
> just going to assume that no packager has complained about the default of
> the variable.

No packager complained because they just know they have to enable the
variable and be done with it.

> Instead this is motivated my issues like the one in the forum post?

Correct. Also I've been bugged about the issue a couple of times.

> What actually is the problem in the forum post? Will the plugin be found at
> runtime? Does the location simply not match the expectations of the person
> writing it, or is there some bad effect resulting from this?

The problem is that Qt won't find the plugin and the user will have to
define QT_PLUGIN_PATH.

> If this is about users installing self-built things to /usr? Should that
> person be installing things to /usr? My understanding up to now has been
> 'no, they should not'.
It's about easily co-installing with Qt. It will work better if they
install to /usr, but that doesn't mean they have to.

> So, I still don't understand. Maybe this is about whether or not the plugin
> can be found at runtime, but that has not been said, unless I missed it. I
> could understand this discussion being tedious for you, and still I don't
> want to stand in the way!

I've got the ship it, I'll commit later today, we can continue
discussing though. I think it's a good discussion, especially
considering it's at the core on the experience the newcomers receive
when developing on KF5 and by extension any KDE software.

And yes, it's mainly about getting Qt to find the run-time resources
(i.e. plugins, yes) without starting to push down environment
variables to let Qt find what ECM placed naively.

Aleix


More information about the Kde-frameworks-devel mailing list