lirios / fluid

:book: Library for QtQuick apps with Material Design
https://docs.liri.io/sdk/fluid/develop/
Other
818 stars 112 forks source link

CMake Error on Opensuse TW #295

Closed DevDorrejo closed 5 years ago

DevDorrejo commented 5 years ago

-- The following REQUIRED packages have been found:

Error when compiling:

CMake Error at /usr/local/share/LiriCMakeShared/modules/LiriAddQmlPlugin.cmake:87 (add_library): Target "fluidcontrolsprivateplugin" links to target "Qt5::GuiPrivate" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): src/imports/controls-private/CMakeLists.txt:16 (liri_add_qml_plugin)

plfiorini commented 5 years ago

In order to change the title bar color on Wayland according to the Material Design specs, Fluid implements a custom protocol. The protocol implementation needs the underlying wl_surface for each QWindow, and have to use QPA which is a private library. You should install the qtgui private headers.

DevDorrejo commented 5 years ago

In order to change the title bar color on Wayland according to the Material Design specs, Fluid implements a custom protocol. The protocol implementation needs the underlying wl_surface for each QWindow, and have to use QPA which is a private library. You should install the qtgui private headers.

Thank you.

Now this error on make:

[ 21%] Building CXX object src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp.o In file included from .../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/5JE3FL2PJN/moc_liridecoration.cpp:10, from .../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp:2: .../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/5JE3FL2PJN/../../../../../../src/imports/controls-private/extensions/liridecoration.h:31:10: fatal error: wayland-client.h: No such file or directory 31 | #include | ^~~~~~ compilation terminated. make[2]: [src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/build.make:82: src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:1114: src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

plfiorini commented 5 years ago

Also need wayland-devel

DevDorrejo commented 5 years ago

Also need wayland-devel

rpm -qa | grep -i wayland

kwayland-devel-5.62.0-1.1.x86_64 libwayland-client0-1.17.0-1.4.x86_64 libva-wayland2-2.5.0-1.1.x86_64 kwayland-5.62.0-1.1.x86_64 libwayland-server0-1.17.0-1.4.x86_64 libwayland-egl1-1.17.0-1.4.x86_64 libqt5-qtwayland-examples-5.13.1-1.1.x86_64 libwaylandpp0-0.2.5.20190224T162511.f389962-1.4.x86_64 libqt5-qtwayland-devel-5.13.1-1.1.x86_64 libqt5-qtwayland-private-headers-devel-5.13.1-1.1.noarch xorg-x11-server-wayland-1.20.5-4.1.x86_64 plasma5-session-wayland-5.16.5-1.3.noarch libQt5WaylandClient5-5.13.1-1.1.x86_64 kwayland-integration-5.16.5-1.1.x86_64 waylandpp-devel-0.2.5.20190224T162511.f389962-1.4.x86_64 libwayland-cursor0-1.17.0-1.4.x86_64 wayland-protocols-devel-1.18-1.1.noarch wayland-devel-1.17.0-1.4.x86_64 libQt5WaylandCompositor5-5.13.1-1.1.x86_64 libqt5-qtwayland-5.13.1-1.1.x86_64

have all wayland variant installed

DevDorrejo commented 5 years ago

locate wayland-client.h /usr/include/wayland-client.hpp /usr/include/wayland/wayland-client.h

plfiorini commented 5 years ago

Ah it's #include <wayland/wayland-client.h> there, in Fedora (and probably Arch too) it's /usr/include/wayland-client.h hence the code uses #include <wayland-client.h>. Can you paste the contents of wayland-client.pc, probably located in /usr/lib64/pkgconfig/wayland-client.pc (might be slightly different in your distro).

plfiorini commented 5 years ago

Mine is:

$ cat /usr/lib64/pkgconfig/wayland-client.pc
prefix=/usr
exec_prefix=/usr
datarootdir=${prefix}/share
pkgdatadir=/usr/share/wayland
libdir=/usr/lib64
includedir=/usr/include

Name: Wayland Client
Description: Wayland client side library
Version: 1.17.0
Cflags: -I${includedir}
Libs: -L${libdir} -lwayland-client
DevDorrejo commented 5 years ago

Mine is:

$ cat /usr/lib64/pkgconfig/wayland-client.pc
prefix=/usr
exec_prefix=/usr
datarootdir=${prefix}/share
pkgdatadir=/usr/share/wayland
libdir=/usr/lib64
includedir=/usr/include

Name: Wayland Client
Description: Wayland client side library
Version: 1.17.0
Cflags: -I${includedir}
Libs: -L${libdir} -lwayland-client

Here is mine:


~> cat /usr/lib64/pkgconfig/wayland-client.pc
prefix=/usr
exec_prefix=/usr
datarootdir=${prefix}/share
pkgdatadir=/usr/share/wayland
libdir=/usr/lib64
includedir=/usr/include/wayland

Name: Wayland Client
Description: Wayland client side library
Version: 1.17.0
Cflags: -I${includedir}
Libs: -L${libdir} -lwayland-client
plfiorini commented 5 years ago

includedir looks good, so I suspect the build system doesn't add that include directory for some reason. Investigating....

DevDorrejo commented 5 years ago

thank you

includedir looks good, so I suspect the build system doesn't add that include directory for some reason. Investigating....

plfiorini commented 5 years ago

No Wayland::Client dependency here: https://github.com/lirios/fluid/blob/develop/src/imports/controls-private/CMakeLists.txt#L13 I thought it was implicitely imported by Qt5::WaylandClient but probaly it's not. Works on Fedora because /usr/include is always in the path.

DevDorrejo commented 5 years ago

No Wayland::Client dependency here: https://github.com/lirios/fluid/blob/develop/src/imports/controls-private/CMakeLists.txt#L13 I thought it was implicitely imported by Qt5::WaylandClient but probaly it's not. Works on Fedora because /usr/include is always in the path.

Ok.

plfiorini commented 5 years ago

@DevDorrejo Can you please check if #296 fixes the problem?

DevDorrejo commented 5 years ago

@DevDorrejo Can you please check if #296 fixes the problem?

No, i cloned again the git.

[ 20%] Generating wayland-liri-decoration-protocol.c
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Scanning dependencies of target fluidcontrolsprivateplugin
[ 21%] Building CXX object src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp.o
In file included from ../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/5JE3FL2PJN/moc_liridecoration.cpp:10,
from ../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp:2:
../fluid/build/src/imports/controls-private/fluidcontrolsprivateplugin_autogen/5JE3FL2PJN/../../../../../../src/imports/controls-private/extensions/liridecoration.h:31:10: fatal error: wayland-client.h: No such file or directory
31 | #include <wayland-client.h>
|          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/build.make:82: src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/fluidcontrolsprivateplugin_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1114: src/imports/controls-private/CMakeFiles/fluidcontrolsprivateplugin.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
plfiorini commented 5 years ago

Please remove CMakeCache.txt in your build directory and try again, I have force pushed a new version. I moved the headers under /usr/include/wayland to reproduce your situation and it seems to work, but removing CMakeCache.txt is fundamental.

DevDorrejo commented 5 years ago

Please remove CMakeCache.txt in your build directory and try again, I have force pushed a new version. I moved the headers under /usr/include/wayland to reproduce your situation and it seems to work, but removing CMakeCache.txt is fundamental.

Not work, video: https://youtu.be/jjkinZgNhZU

plfiorini commented 5 years ago

Thanks, I'm now merging the bug fix. Cool video :)

DevDorrejo commented 5 years ago

image Man, thank you, it's working.