Bug 385136 - Missing dependencies for autotests
Summary: Missing dependencies for autotests
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.10.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-27 12:24 UTC by h.goebel
Modified: 2017-10-21 19:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.0


Attachments
proposed patch - tested (1.05 KB, patch)
2017-09-27 14:41 UTC, h.goebel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description h.goebel 2017-09-27 12:24:53 UTC
When building kwin autotests for guix[1], building the following autotests fail:

- testScriptedEffectLoader
- testTabBoxClientModel
- testTabBoxHandler

The reasons are missing dependencies in autotests/CMakeLists.txt resp. autotests/tabbox/CMakeLists.txt.

[1] https://www.gnu.org/software/guix/

Proposed solution
~~~~~~~~~~~~~~~~~~~~

1) In autotests/CMakeLists.txt:
   - add "Qt5::Qml" to target_link_libraries(testScriptedEffectLoader
2) In autotests/tabbox/CMakeLists.txt:
   - add "Qt5::Script" to target_link_libraries(testTabBoxClientModel
   - add "Qt5::Script" to target_link_libraries(testTabBoxHandler

Detailed description and Analysis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

guix (like nix) used a separate prefix for each package. Thus the header files for 
qtdeclarative are in /gnu/store/…-qtdeclarative-5.9.1/include/qt5/ while the ones for
qtbase are in /gnu/store/…-base-5.9.1/include/qt5/. This means that *each* dependency's include directory must be specified. This is in contrast to a "normal" Unix-system, where all includes end up in /usr/include/qt5 and missing to defined some include-dependencies does often not raise an error.

When building `testScriptedEffectLoader` this fails with:

/tmp/guix-build-kwin-5.10.4.drv-0/kwin-5.10.4/scripting/workspace_wrapper.h:29:34:
  fatal error: QtQml/QQmlListProperty: No such file or directory

This line and the one in front read:

#include <QRect>
#include <QtQml/QQmlListProperty>

The included files exists in /gnu/store/…-qtdeclarative-5.9.1/include/qt5/, but the command line is missing `-isystem /gnu/store/…-qtdeclarative-5.9.1/include/qt5/". The reason for this is: Qt5::Qml is not defined as a dependency for `testScriptedEffectLoader` in autotests/CMakeLists.txt.

Analogous for testTabBoxClientModel and testTabBoxHandler.

How to reproduce
~~~~~~~~~~~~~~~~~~~~~

The easiest way would be to test this in guix, but I'm just working on packaging Plasma for guix and am not finished. I'll update this ticket when finished.
Comment 1 h.goebel 2017-09-27 14:41:00 UTC
Created attachment 108058 [details]
proposed patch - tested
Comment 2 Martin Flöser 2017-09-27 14:57:04 UTC
Could you please upload the patch to phabricator.kde.org
Comment 3 h.goebel 2017-10-02 13:42:58 UTC
I can't logging there with my bugzilla account and also can not find how to create an account there.
Comment 4 h.goebel 2017-10-02 14:02:04 UTC
Found how to create an account. Uploaded to <https://phabricator.kde.org/D8112>
Comment 5 Christoph Feck 2017-10-04 22:59:02 UTC
Patch was committed, merci.