catsout / wallpaper-engine-kde-plugin

A kde wallpaper plugin integrating wallpaper engine
https://store.kde.org/p/1475528/
GNU General Public License v2.0
1.68k stars 71 forks source link

cmake command fails on kde6 (fedora 40) #395

Open MNS26 opened 3 months ago

MNS26 commented 3 months ago

Describe the bug

CMAKE_MODULE_PATH cant find "Plasma" config

System Information

Additional context
i recloned the repo in case something broke when i tried updating it before i already had the packages installed needed before image

Okazakee commented 3 months ago

up

ShaneMain commented 3 months ago

This is the result of the fedora dependencies being out of date. I was able to get the package to build and install by using the respective kf6 and qt6 pacakges.

sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel gstreamer1-libav \
lz4-devel mpv-libs-devel python3-websockets qt6-qtbase-private-devel \ qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake
Okazakee commented 3 months ago

This is the result of the fedora dependencies being out of date. I was able to get the package to build and install by using the respective kf6 and qt6 pacakges.

sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel gstreamer1-libav \
lz4-devel mpv-libs-devel python3-websockets qt6-qtbase-private-devel \ qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake

I have all but "qt6-qtwebchannel-devel" which could not be found and it still does the same thing, I will now search that more in internet and see what comes out

MNS26 commented 3 months ago

i already found references the the qt6 and kf6 packages before opening the issues before and no luck

both the main and kde6 branches fail to build with it

MNS26 commented 3 months ago

This is the result of the fedora dependencies being out of date. I was able to get the package to build and install by using the respective kf6 and qt6 pacakges.

sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel gstreamer1-libav \
lz4-devel mpv-libs-devel python3-websockets qt6-qtbase-private-devel \ qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake

I have all but "qt6-qtwebchannel-devel" which could not be found and it still does the same thing, I will now search that more in internet and see what comes out

image i dont know how you searched for it but its there in the package list

MNS26 commented 3 months ago

after reinstalling all those packages i had some progress

❯ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_QML=ON
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib64/libxkbcommon.so (found suitable version "1.6.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found KF6Package: /usr/lib64/cmake/KF6Package/KF6PackageConfig.cmake (found version "6.2.0") 
-- Found KF6: success (found suitable version "6.2.0", minimum required is "5.68.0") found components: Package 
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.1") 
-- Checking for module 'mpv'
--   Found mpv, version 2.2.0
CMake Error at src/backend_scene/third_party/CMakeLists.txt:9 (add_subdirectory):
  The source directory

    /mnt/data/Projects/wallpaper-engine-kde-plugin/src/backend_scene/third_party/nlohmann

  does not contain a CMakeLists.txt file.

CMake Error at src/backend_scene/third_party/CMakeLists.txt:15 (add_subdirectory):
  The source directory

    /mnt/data/Projects/wallpaper-engine-kde-plugin/src/backend_scene/third_party/SPIRV-Reflect

  does not contain a CMakeLists.txt file.

CMake Error at src/backend_scene/third_party/CMakeLists.txt:23 (add_subdirectory):
  The source directory

    /mnt/data/Projects/wallpaper-engine-kde-plugin/src/backend_scene/third_party/glslang

  does not contain a CMakeLists.txt file.

-- Checking for module 'liblz4'
--   Found liblz4, version 1.9.4
-- Found Vulkan: /lib64/libvulkan.so (found version "1.3.280") found components: glslc missing components: glslangValidator
-- Configuring incomplete, errors occurred!
/mnt/data/Projects/wallpaper-engine-kde-plugin/build qt6 ❯    

there also i a typo on the dnf list you sent

sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel\
gstreamer1-libav lz4-devel mpv-libs-devel python3-websockets \
qt6-qtbase-private-devel qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake

this one worked for me (you may need to remove the backslashes)

Thadah commented 3 months ago

Hi! I had to grab the code of the third parties manually:

Eigen: https://gitlab.com/libeigen/eigen/-/tree/master/Eigen SPIRV-Reflect: https://github.com/KhronosGroup/SPIRV-Reflect/tree/main glslang: https://github.com/KhronosGroup/glslang/tree/main miniaudio: https://github.com/mackron/miniaudio/tree/dev-0.12 nlohmann: https://github.com/nlohmann/json/tree/develop

After that I had a compilation error because I'm probably not using the correct versions. Most of them are available here (except Eigen, which points to a dead link because they migrated their code to GitLab): https://github.com/catsout/wallpaper-scene-renderer/tree/master/third_party

You can grab the specific commit, see if it compiles.

MNS26 commented 2 months ago

ah i see i didnt notice the submodules were mostly empty... i tried building with the latest ones and only got a single error too image

i ran cmake -B . -S .. within the build folder followed by cmake --build . -j 10

i havent quite figured out how to solve the issue

Priority-6 commented 2 months ago

Hm im having similar but different issues with the cmake Tried to make this work on Nobara 39 (Fed 39) and while it made it through the cmake, it didn't work. Now that I am on Fed 40, it completely fails the cmake.

image

Z0pyrus commented 2 months ago
sudo dnf install libplasma-devel 
sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel gstreamer1-libav lz4-devel mpv-libs-devel python3-websockets qt6-qtbase-private-devel qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake

Fixed my issue with PlasmaConfig.cmake And the second fixed my build process.

Priority-6 commented 2 months ago
sudo dnf install libplasma-devel 
sudo dnf install vulkan-headers plasma-workspace-devel kf6-plasma-devel gstreamer1-libav lz4-devel mpv-libs-devel python3-websockets qt6-qtbase-private-devel qt6-qtwebchannel-devel qt6-qtwebsockets-devel cmake

Fixed my issue with PlasmaConfig.cmake And the second fixed my build process.

This worked for me! Though now the issue I have is that the plugin is literally not showing up when I go to try to customize my wallpapers. Clueless as to why. Should be noted I am running Nobara 40, but I feel like that shouldn't really effect this too much, especially if (now) everything installed correctly.

Priority-6 commented 2 months ago

Nevermind i got it to work! Turns out the addon wasn't installing itself in Plasma/desktops, but instead in just the /share/ folder. I just moved it to there and it worked lmfao

MNS26 commented 2 months ago

Nevermind i got it to work! Turns out the addon wasn't installing itself in Plasma/desktops, but instead in just the /share/ folder. I just moved it to there and it worked lmfao

where exactly? i cant seem to find where it tried installing it to and where it should go

Priority-6 commented 2 months ago

Nevermind i got it to work! Turns out the addon wasn't installing itself in Plasma/desktops, but instead in just the /share/ folder. I just moved it to there and it worked lmfao

where exactly? i cant seem to find where it tried installing it to and where it should go

The com.github.catsout.wallpaperEngineKde file should go inside /home/name/.local/share/plasma/wallpapers/

The wallpaper-engine-kde-plugin folder should be just inside /home/

MNS26 commented 2 months ago

i dont see either of them weirdly enough...

❯ cmake .. -GNinja -D USE_PLASMAPKG=ON
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib64/libxkbcommon.so (found suitable version "1.6.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found KF6Package: /usr/lib64/cmake/KF6Package/KF6PackageConfig.cmake (found version "6.3.0") 
-- Found KF6: success (found suitable version "6.3.0", minimum required is "5.68.0") found components: Package 
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.1") 
-- Checking for module 'mpv'
--   Found mpv, version 2.2.0
-- Using the multi-header code from /mnt/data/Projects/wallpaper-engine-kde-plugin/src/backend_scene/third_party/nlohmann/include/
-- Checking for module 'liblz4'
--   Found liblz4, version 1.9.4
-- Found Vulkan: /lib64/libvulkan.so (found version "1.3.283") found components: glslc missing components: glslangValidator
-- Configuring done (1.4s)
-- Generating done (0.0s)
-- Build files have been written to: /mnt/data/Projects/wallpaper-engine-kde-plugin/build
/mnt/data/Projects/wallpaper-engine-kde-plugin/build qt6 ❯                            

thats the output of the command in /home/<name>/.local/share/plasma/ is only a folder called desktoptheme but that one isnt from wallpaper-engine-kde-plugin

MNS26 commented 2 months ago

would you mind posting the exact commands and you ran? i feel like im missing a very simple step but i dont see it.

scgm0 commented 2 months ago
cmake -B build -S . -GNinja -DUSE_PLASMAPKG=ON
sudo cmake --build build
sudo cmake --install build

# Install package (ignore if USE_PLASMAPKG=OFF for system-wide installation)
cmake --build build --target install_pkg

This is the command line I use, which requires sudo to complete the installation.

MNS26 commented 2 months ago

odd... for me ninja fails with the errror ninja: build stopped: subcommand failed. when i ran cmake --build build (tried with and without sudo)

MNS26 commented 2 months ago
cmake -B build -S . -GNinja -DUSE_PLASMAPKG=ON
sudo cmake --build build
sudo cmake --install build

# Install package (ignore if USE_PLASMAPKG=OFF for system-wide installation)
cmake --build build --target install_pkg

This is the command line I use, which requires sudo to complete the installation.

cmake --build build doesnt need to be run as root for me but regardless of permission it results in the following fail pastebin log

sent it on pastebin since its a looong one for here

MNS26 commented 2 months ago

oh interesting.... i just got it to complete cmake --build build by adding 2 #include <assert.h>


diff --git a/src/Scene/SceneImageEffectLayer.cpp b/src/Scene/SceneImageEffectLayer.cpp
index 31fbe49..e3c2366 100644
--- a/src/Scene/SceneImageEffectLayer.cpp
+++ b/src/Scene/SceneImageEffectLayer.cpp
@@ -1,6 +1,6 @@
 #include "SceneImageEffectLayer.h"
 #include "SceneNode.h"
-
+#include <assert.h> 
 #include "SpecTexs.hpp"
 #include "Core/StringHelper.hpp"

diff --git a/src/WPPuppet.hpp b/src/WPPuppet.hpp
index df80e4d..91eb4d9 100644
--- a/src/WPPuppet.hpp
+++ b/src/WPPuppet.hpp
@@ -4,6 +4,7 @@
 #include <string>
 #include <memory>
 #include <span>
+#include <assert.h> 
 #include <Eigen/Geometry>

 #include "Core/Literals.hpp"

only the --install needs sudo so my commands were cmake -B build -S . -D USE_PLASMAPKG=ON cmake --build build sudo cmake --install build

now it works

image

scgm0 commented 2 months ago
mkdir build && cd build
cmake .. -DUSE_PLASMAPKG=ON
make -j$nproc
sudo make install

This also works for me.

YouCanTouCan commented 1 month ago

I've been following along with the various suggestions here, but also cannot get it working on my Fedora 40 KDE computer.

I have all dependencies installed. I tried these commands initially from the ReadMe but got errors like others in this issue:

# Configure, build and install
# 'USE_PLASMAPKG=ON': using kpackagetool tool to install plugin
cmake -B build -S . -GNinja -DUSE_PLASMAPKG=ON
cmake --build build
cmake --install build
# Install package (ignore if USE_PLASMAPKG=OFF for system-wide installation)
cmake --build build --target install_pkg

After that, I deleted everything that had been created and tried again, instead using this code as suggested here:

cmake -B build -S . -D USE_PLASMAPKG=ON
cmake --build build
sudo cmake --install build

At this point, there were no errors, but the Wallpaper Engine for KDE still wouldn't appear in the Desktop Folder Settings. I checked Home/.local/share/plasma/wallpapers and there was no "com.github.casout.wallpaperEngineKde" folder (or any folder for that matter), nor was there one in Home/.local/share. I've tried this multiple times, including recloning the repository, as well as restarting plasmashell after the process, but have had no luck.

I also restarted the whole process and tried this code:

mkdir build && cd build
cmake .. -DUSE_PLASMAPKG=ON
make -j$nproc
sudo make install

Once again this worked with no errors, but the Wallpaper Engine for KDE still wouldn't appear in the Desktop Folder Settings and I still had no "com.github.casout.wallpaperEngineKde" folder. Does anyone have any tips for what I could try?

brianbert commented 1 month ago

I've been following along with the various suggestions here, but also cannot get it working on my Fedora 40 KDE computer.

I have all dependencies installed. I tried these commands initially from the ReadMe but got errors like others in this issue:

# Configure, build and install
# 'USE_PLASMAPKG=ON': using kpackagetool tool to install plugin
cmake -B build -S . -GNinja -DUSE_PLASMAPKG=ON
cmake --build build
cmake --install build
# Install package (ignore if USE_PLASMAPKG=OFF for system-wide installation)
cmake --build build --target install_pkg

After that, I deleted everything that had been created and tried again, instead using this code as suggested here:

cmake -B build -S . -D USE_PLASMAPKG=ON
cmake --build build
sudo cmake --install build

At this point, there were no errors, but the Wallpaper Engine for KDE still wouldn't appear in the Desktop Folder Settings. I checked Home/.local/share/plasma/wallpapers and there was no "com.github.casout.wallpaperEngineKde" folder (or any folder for that matter), nor was there one in Home/.local/share. I've tried this multiple times, including recloning the repository, as well as restarting plasmashell after the process, but have had no luck.

I also restarted the whole process and tried this code:

mkdir build && cd build
cmake .. -DUSE_PLASMAPKG=ON
make -j$nproc
sudo make install

Once again this worked with no errors, but the Wallpaper Engine for KDE still wouldn't appear in the Desktop Folder Settings and I still had no "com.github.casout.wallpaperEngineKde" folder. Does anyone have any tips for what I could try?

Same problem, I have 0 errors, and is not appearing.