Maldela / fancontrol-gui

GUI for Fancontrol. It uses the KAuth module of the KDE Frameworks 5 to write the generated config file. Furthermore it communicates with systemd via dbus to control the fancontrol service. If you want to compile without systemd support set the -DNO_SYSTEMD option.
GNU General Public License v2.0
309 stars 31 forks source link

Compilation error #15

Closed maresb closed 5 years ago

maresb commented 6 years ago

I am running Linux Mint 18.3 Cinnamon. After following the instructions in README.md, cmake fails with:

-- Found KF5: success (found version "5.18.0") found components:  I18n 
CMake Error at CMakeLists.txt:52 (include):
  include could not find load file:

    ECMGenerateQmlTypes

-- Compiling for Systemd
-- Build the standalone application
-- Found KF5: success (found version "5.18.0") found components:  CoreAddons Package Declarative Config 
-- Build the KCM
-- Found KF5: success (found version "5.18.0") found components:  CoreAddons Package Declarative KCMUtils 
CMake Error at kcm/CMakeLists.txt:15 (if):
  if given arguments:

    "5.18.0" "VERSION_GREATER_EQUAL" "5.42"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

I'm guessing that my KF version is too old? Any idea about how to fix this most easily? Attached is my cmake log:

CMakeOutput.log

Thanks!

Maldela commented 6 years ago

Sry for answering so late. It seems indeed that your KF5 and extra-cmake-modules versions are too old. But I just made the missing functionality conditional on the KF5 version. Try it again. Hopefully it works for you now.

win8linux commented 5 years ago

Since this issue is about compilation errors, here's some that I've been encountering lately:

Public/fancontrol-gui/build on master [?]  03:21:07 PM +08 ⇡98% 
▶ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_KCM=on -DKDE_INSTALL_USE_QT_SYS_PATHS=true
CMake Warning at /usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package):
  Could not find a package configuration file provided by "KF5Kirigami2" with
  any of the following names:

    KF5Kirigami2Config.cmake
    kf5kirigami2-config.cmake

  Add the installation prefix of "KF5Kirigami2" to CMAKE_PREFIX_PATH or set
  "KF5Kirigami2_DIR" to a directory containing one of the above files.  If
  "KF5Kirigami2" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:52 (find_package)

-- Could NOT find KF5Kirigami2: found neither KF5Kirigami2Config.cmake nor kf5kirigami2-config.cmake 
-- Could NOT find KF5 (missing:  Kirigami2) 
CMake Error at CMakeLists.txt:55 (if):
  if given arguments:

    "VERSION_GREATER_EQUAL" "5.33.0"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!
See also "/home/julius/Public/fancontrol-gui/build/CMakeFiles/CMakeOutput.log".

Public/fancontrol-gui/build on master [?]  03:27:33 PM +08 ⇡98% 
▶ 

Here's CMakeOutput.log

From what I can glean from the errors, it seems that it can't find some Kirigami-related files. I checked to see if I needed to install some libraries, but then it seems that they're already on the system:

Public/fancontrol-gui/build on master [?]  03:15:40 PM +08 ⇡98% 
▶ sudo apt install qml-module-org-kde-kirigami -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
qml-module-org-kde-kirigami is already the newest version (1.1.0-1~ubuntu16.04~ppa2).
qml-module-org-kde-kirigami set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Public/fancontrol-gui/build on master [?]  03:16:05 PM +08 ⇡98% 
▶ 
Maldela commented 5 years ago

Try installing libkf5kirigami2 and qml-module-org-kde-kirigami2.

win8linux commented 5 years ago

Unfortunately, those packages are not available for my system (Linux Mint 18.3 KDE). I do plan on switching to KDE Neon once its Bionic base has been officially released, so I will hold off on this issue for now until then.

Maldela commented 5 years ago

You could try reverting to this commit: a1c2c9383d90aaf192c94d1a72af64abd78aff6a It's the last commit that has hard coded spacings and sizes and therefore doesn't need kirigami.

win8linux commented 5 years ago

I have compiled fancontrol with Kirigami before without issues. It's just that it now requires Kirigami 2, which isn't available in my distro's repos.

win8linux commented 5 years ago

I've now attempted to compile this under KDE Neon and the cmake step fails with this:

-- Could NOT find KF5Kirigami2 (missing: KF5Kirigami2_DIR)
-- Could NOT find KF5Kirigami2: found neither KF5Kirigami2Config.cmake nor kf5kirigami2-config.cmake 
-- Could NOT find KF5 (missing: Kirigami2) 
CMake Error at CMakeLists.txt:55 (if):
  if given arguments:

    "VERSION_GREATER_EQUAL" "5.33.0"

  Unknown arguments specified

I've already installed libkf5kirigami2-5 and qml-module-org-kde-kirigami2 on my system.

Maldela commented 5 years ago

Try installing the dev package. I think it's kirigami2-dev. If it works, I will add it to the requirements in the readme.

win8linux commented 5 years ago

It works now after installing kirigami2-dev. Thanks! I will create a PR for the readme soon.

Update: Here is the relevant PR.

Maldela commented 5 years ago

Great!

mpvaitheeswaran commented 4 years ago

sudo apt install kirigami2-dev