Bug 431226 - plugins/extensions/pykrita/kritarunner: Missing dependency on ui_info.h and ui_manager.h
Summary: plugins/extensions/pykrita/kritarunner: Missing dependency on ui_info.h and u...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 13:18 UTC by Kim Lindberger
Modified: 2021-01-09 14:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-25700-0.html (620 bytes, text/html)
2021-01-07 11:05 UTC, Kim Lindberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Lindberger 2021-01-06 13:18:45 UTC
The pykrita/plugin target generates two required ui header files, ui_info.h and ui_manager.h, using the ki18n_wrap_ui macro. The source files are independently used by the pykrita/kritarunner target, which however doesn't generate the required header files. This means that when built in parallel, sometimes the pykrita/kritarunner target is built before the pykrita/plugin target and compilation fails with

> /build/krita-4.1.8/plugins/extensions/pykrita/plugin/pyqtpluginsettings.cpp:19:10: fatal error: ui_manager.h: No such file or directory
>  #include "ui_manager.h"
>           ^~~~~~~~~~~~~~

A full build output can be found here: https://gist.githubusercontent.com/worldofpeace/c8248ff92b0ced199124bdcfdb59420f/raw/b0b26769b6369146b6c7a110eaa3e230f81515be/krita.log

When building Krita for NixOS, we're currently disabling building in parallel to avoid this, but that makes the builds extremely lengthy.

This was also reported in https://bugs.kde.org/show_bug.cgi?id=407591.
Comment 1 Halla Rempt 2021-01-06 13:30:46 UTC
So, a simple patch like this should solve that?

diff --git a/plugins/extensions/pykrita/kritarunner/CMakeLists.txt b/plugins/extensions/pykrita/kritarunner/CMakeLists.txt
index da3c07b8bd..0d92562c90 100644
--- a/plugins/extensions/pykrita/kritarunner/CMakeLists.txt
+++ b/plugins/extensions/pykrita/kritarunner/CMakeLists.txt
@@ -13,6 +13,11 @@ set(kritarunner_SRCS main.cpp
     ../plugin/PythonPluginsModel.cpp
 )
 
+ki18n_wrap_ui(kritarunner_SRCS
+    ../plugin/info.ui
+    ../plugin/manager.ui
+)
+
 add_executable(kritarunner ${kritarunner_SRCS})
 
 target_include_directories(kritarunner SYSTEM PUBLIC "${PYTHON_INCLUDE_DIRS}")
lines 1-16/16 (END)
Comment 2 Kim Lindberger 2021-01-06 19:17:50 UTC
That should work, but I opened a PR with a different solution at https://invent.kde.org/graphics/krita/-/merge_requests/640. I think that should be better in the long run, it should be easier to maintain and make it less likely that a similar issue occurs again (in kritarunner, that is).
Comment 3 Halla Rempt 2021-01-06 20:20:30 UTC
Thanks! I will look at that tomorrow, and merge it if I think there are no more questions.
Comment 4 Halla Rempt 2021-01-07 10:16:49 UTC
I've merged the request :-) See https://invent.kde.org/graphics/krita/-/commit/2464c32dbaddf71359f3b710223e3ae0337a9fc5
Comment 5 Halla Rempt 2021-01-07 10:17:03 UTC
I'll also merge it to the stable and the release branches.
Comment 6 Kim Lindberger 2021-01-07 11:05:49 UTC
Created attachment 134634 [details]
attachment-25700-0.html

Okay, great! Thanks!

On Thu, 2021-01-07 at 10:17 +0000, Halla Rempt wrote:
> https://bugs.kde.org/show_bug.cgi?id=431226
> 
> --- Comment #5 from Halla Rempt <halla@valdyas.org> ---
> I'll also merge it to the stable and the release branches.
>
Comment 7 Halla Rempt 2021-01-09 09:45:42 UTC
Git commit 03f5fe9cd0f485bbedd6b211eb3b1403d1a8850e by Halla Rempt.
Committed on 09/01/2021 at 09:45.
Pushed by rempt into branch 'master'.

Enable parallel builds of pykrita/plugin and pykrita/kritarunnuer
Related: bug 407591

M  +5    -0    plugins/extensions/pykrita/kritarunner/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/03f5fe9cd0f485bbedd6b211eb3b1403d1a8850e
Comment 8 Halla Rempt 2021-01-09 09:45:59 UTC
Git commit e410004e7ac63d75fb1613e34b3b4ba0b3b3e1ce by Halla Rempt.
Committed on 09/01/2021 at 09:45.
Pushed by rempt into branch 'krita/4.3'.

Enable parallel builds of pykrita/plugin and pykrita/kritarunnuer
Related: bug 407591
(cherry picked from commit 03f5fe9cd0f485bbedd6b211eb3b1403d1a8850e)

M  +5    -0    plugins/extensions/pykrita/kritarunner/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/e410004e7ac63d75fb1613e34b3b4ba0b3b3e1ce
Comment 9 Halla Rempt 2021-01-09 09:46:33 UTC
Git commit f1aebe4ab8584b2d2f65b38ff4b837e3db17705a by Halla Rempt.
Committed on 09/01/2021 at 09:46.
Pushed by rempt into branch 'krita/4.4.2'.

Enable parallel builds of pykrita/plugin and pykrita/kritarunnuer
Related: bug 407591
(cherry picked from commit 03f5fe9cd0f485bbedd6b211eb3b1403d1a8850e)

M  +5    -0    plugins/extensions/pykrita/kritarunner/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/f1aebe4ab8584b2d2f65b38ff4b837e3db17705a
Comment 10 Kim Lindberger 2021-01-09 10:39:47 UTC
I think you applied the wrong patch to master and the stable branches, unless you wanted to go with yours instead.
Comment 11 Halla Rempt 2021-01-09 11:56:08 UTC
Outch... Let me fix that!
Comment 12 Halla Rempt 2021-01-09 14:16:10 UTC
Should be fixed now...
Comment 13 Kim Lindberger 2021-01-09 14:54:23 UTC
Yeah, looks good! Thanks!