naraesk / plasma-docker

Plasmoid for KDE Plasma to control docker containers
https://store.kde.org/p/1198473/
GNU General Public License v3.0
43 stars 4 forks source link

Install errors #4

Open akwala opened 4 years ago

akwala commented 4 years ago

OS: Kubuntu 18.04

This is the cmake command from README.md.:

cmake -DCMAKE_INSTALL_PREFIX=`kf5-config --install-prefix` -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../

It results in an empty string for the install prefix because --install-prefix is not a valid option for kf5-config. This is what happens as a result:

$ make install
[ 16%] Built target eu.naraesk.docker-control-plasmoids-metadata-json
[ 33%] Automatic MOC for target plasmoidplugin
[ 33%] Built target plasmoidplugin_autogen
[100%] Built target plasmoidplugin
Install the project...
-- Install configuration: "Release"
-- Installing: /share/plasma/plasmoids/eu.naraesk.docker-control
CMake Error at cmake_install.cmake:41 (file):
  file INSTALL cannot make directory
  "/share/plasma/plasmoids/eu.naraesk.docker-control": No such file or
  directory

Makefile:117: recipe for target 'install' failed
make: *** [install] Error 1

I couldn't figure out the option/argument for kf5-config to get the correct install prefix, so I hardcoded it:

$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../

This caused the plasmoid to be installed in the correct location. However, it tries to install some stuff in a location that requires root access. Is this avoidable?

$ make install
[ 20%] Automatic MOC for target plasmoidplugin
[ 20%] Built target plasmoidplugin_autogen
[100%] Built target plasmoidplugin
Install the project...
-- Install configuration: "Release"
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/metadata.desktop
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/main.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config/Config.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/StackRow.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Header.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/img
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/img/dockerlogo.png
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/config.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/main.xml
-- Installing: /home/name/.local/share/metainfo/eu.naraesk.docker-control.appdata.xml
-- Installing: /home/name/.local/share/kservices5/plasma-applet-eu.naraesk.docker-control.desktop
CMake Error at process/cmake_install.cmake:55 (file):
  file cannot create directory:
  /usr/lib/x86_64-linux-gnu/qt5/qml/eu/naraesk/docker/process.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:54 (include)

Makefile:117: recipe for target 'install' failed
make: *** [install] Error 1
naraesk commented 4 years ago

Thanks for reporting. It must be kf5-config --prefix instead of kf5-config --install-prefix. Usually, this is /usr. I'm about releasing version 2.0 of this plasmoid with new features within the next days. I will have a look if a complete local installation is possible.

naraesk commented 4 years ago

This plasmoid installs a plugin for qml to access docker from qml. As far as I know, something like user specific qml plugins do not exist, therefore it is not possible to install it home directory.