Bug 456593 - plasma-wayland-protocol builds, but doesn't install properly
Summary: plasma-wayland-protocol builds, but doesn't install properly
Status: RESOLVED WORKSFORME
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-11 16:46 UTC by Thiago Sueto
Modified: 2025-09-19 21:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kdesrc-buildrc (3.16 KB, text/plain)
2022-07-11 16:47 UTC, Thiago Sueto
Details
stderr and stdout of kdesrc-build command (44.07 KB, text/plain)
2022-07-11 16:48 UTC, Thiago Sueto
Details
refresh build error? (157.53 KB, image/png)
2022-07-11 16:50 UTC, Thiago Sueto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2022-07-11 16:46:30 UTC
I followed the installation instructions in https://community.kde.org/Get_Involved/development#Set_up_kdesrc-build

KGuiAddons fails to build because it's not finding the built plasma-wayland-protocols from master, it's instead attempting to use my system version (1.5.0):

CMake Error at CMakeLists.txt:55 (find_package):
  Could not find a configuration file for package "PlasmaWaylandProtocols"
  that is compatible with requested version "1.7.0".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake, version: 1.5.0
    /lib64/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake, version: 1.5.0

I'll add my kdesrc-buildrc as attachment together with the stdout/stderr of running kdesrc-build plasma-desktop systemsettings krunner --include-dependencies.

I also found it rather weird that trying to run --refresh-build still renders a message "No changes from build, skipping install (--refresh-build this module to force install)". I'll add this as an attachment too.
Comment 1 Thiago Sueto 2022-07-11 16:47:14 UTC
Created attachment 150540 [details]
kdesrc-buildrc
Comment 2 Thiago Sueto 2022-07-11 16:48:27 UTC
Created attachment 150541 [details]
stderr and stdout of kdesrc-build command
Comment 3 Thiago Sueto 2022-07-11 16:50:42 UTC
Created attachment 150542 [details]
refresh build error?
Comment 4 Thiago Sueto 2022-07-11 16:55:29 UTC
Almost forgot, system requirements:

Operating System: Red Hat Enterprise Linux 9.0
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.14.0-70.17.1.el9_0.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 5 Thiago Sueto 2022-07-11 16:57:11 UTC
(system info I mean)
Comment 6 Thiago Sueto 2022-07-14 14:42:12 UTC
Alexander Lohnau over #kde-devel assisted me with this issue, plasma-wayland-protocols did not install at all, so kguiaddons wasn't able to find kde/usr/lib64/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake. I had to cd to kde/build/plasma-wayland-protocols and run `ninja install` manually.

That it didn't install properly is clearly a bug, so I'm renaming this issue.

I'm not sure if this would be a kdesrc-build bug or a plasma-wayland-protocols bug.
Comment 7 Michael Pyne 2022-07-14 22:50:43 UTC
Git commit 7e1a75e66d5b6ac4fc0db3e828d13728cd04f83c by Michael Pyne.
Committed on 14/07/2022 at 22:47.
Pushed by mpyne into branch 'master'.

buildsystem: Be more restrictive on when to skip install.

This fixes a bug where the documentation of how to force kdesrc-build to
proceed with the install "--refresh-build this module to force install"
did not match kdesrc-build's behavior.

But in addition this adds a check that the module was ever successfully
installed by checking for a matching persistent option.  I suspect this
might be part of the problem experienced by a user in bug 456593.

M  +6    -3    modules/ksb/Module.pm

https://invent.kde.org/sdk/kdesrc-build/commit/7e1a75e66d5b6ac4fc0db3e828d13728cd04f83c
Comment 8 Andrew Shark 2024-04-15 14:34:07 UTC
This is fixed.
Comment 9 Andrew Shark 2025-09-19 21:06:19 UTC
Git commit 3579712a31a61971319fb4028b94d873f2b38586 by Andrew Shark.
Committed on 19/09/2025 at 20:59.
Pushed by ashark into branch 'master'.

fix: Remove faulty optimization for skipping installation

In kdesrc-build, there was an attempt to add optimization for skipping
installation in case the ninja build tool "had no work to do" during
build. That feature was requested in https://invent.kde.org/sdk/kdesrc-build/-/issues/92.

This optimization was introduced by commit:
https://invent.kde.org/sdk/kdesrc-build/-/commit/8c693eeef39466bfd3dc3b7132b3200884236aa5

A new problem was that even with "--refresh-build", it was not possible
to bypass the unwanted "optimization" triggering.

Later, the check for presence of "--refresh-build" was added:
https://invent.kde.org/sdk/kdesrc-build/-/commit/7e1a75e66d5b6ac4fc0db3e828d13728cd04f83c

However, a problem still remained. Sometimes, users want to update some
project files, which do not affect "ninja work", and reinstall the
project. And user may not want to use the "--refresh-build", because
it is very expensive. See this issue:
https://invent.kde.org/sdk/kdesrc-build/-/issues/107

In kdesrc-build, the optimization was half-incorrectly disabled in
https://invent.kde.org/sdk/kdesrc-build/-/commit/fb7c8f06a082ec676798434cc33e8f7523f6bdab.
It was done by not allowing "work_done" variable be set to false
(except the bug when using --debug, which was fixed in kde-builder).

Also, there was a problem with making a decision if installation is needed,
depending on the presence of "last-install-rev" in persistent options.
This was not entirely correct. The user may have some local changes,
not yet committed (i.e. having the same install-revision number).
And this check forced user to skip reinstallation of the project.

So, there is no point in such "optimization". At least, with such implementation.
So remove it now.

M  +0    -15   kde_builder_lib/build_system/build_system.py
M  +1    -4    kde_builder_lib/module/module.py
M  +0    -1    kde_builder_lib/util/logged_subprocess.py

https://invent.kde.org/sdk/kde-builder/-/commit/3579712a31a61971319fb4028b94d873f2b38586