KZDKM / Hyprspace

Workspace overview plugin for Hyprland
GNU General Public License v2.0
285 stars 9 forks source link

Error when building the plugin #12

Closed Bavalionprolate closed 1 month ago

Bavalionprolate commented 1 month ago

When adding a plugin via hyprpm to the list of plugins, a compilation error occurs, or if you try to compile the plugin from the source code, you also get a compilation error.

I will attach the output from the terminal below.

Output when compiling from source:

[bavalion@horyzen Hyprspace]$ make all
g++ -shared -fPIC --no-gnu-unique -Wall -g -DWLR_USE_UNSTABLE -std=c++23 -O2 `pkg-config --cflags pixman-1 libdrm hyprland` src/Input.cpp src/Layout.cpp src/main.cpp src/Overview.cpp src/Render.cpp -o Hyprspace.so
In file included from src/Input.cpp:1:
src/Overview.hpp:2:10: fatal error: hyprland/src/Compositor.hpp: There is no such file or directory
 2 | #include <hyprland/src/Compositor.hpp>
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation aborted.
In file included from src/Layout.cpp:1:
src/Overview.hpp:2:10: fatal error: hyprland/src/Compositor.hpp: There is no such file or directory
 2 | #include <hyprland/src/Compositor.hpp>
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation aborted.
src/main.cpp:1:10: fatal error: hyprland/src/plugins/PluginSystem.hpp: No such file or directory
 1 | #include <hyprland/src/plugins/PluginSystem.hpp>
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation aborted.
In file included from src/Overview.cpp:1:
src/Overview.hpp:2:10: fatal error: hyprland/src/Compositor.hpp: There is no such file or directory
 2 | #include <hyprland/src/Compositor.hpp>
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation aborted.
In file included from src/Render.cpp:1:
src/Overview.hpp:2:10: fatal error: hyprland/src/Compositor.hpp: There is no such file or directory
 2 | #include <hyprland/src/Compositor.hpp>
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation aborted.
make: *** [Makefile:7: all] Error 1

Translated with DeepL.com (free version)

That said, I downloaded the hyprland source and put it in the plugin folder, but when compiling, I still get an error that it can't find a directory or file

Output when using hyprpm:

[bavalion@horyzen ~]$ hyprpm add https://github.com/KZDKM/Hyprspace

✖ Could not clone the plugin repository. Repository already installed.
[bavalion@horyzen ~]$ hyprpm update

✔ Headers up to date.

 → checking for updates for hyprland-plugins                                            
 → Cloning https://github.com/hyprwm/hyprland-plugins                                   
✔ repository hyprland-plugins has updates.                                              
 → Building hyprland-plugins                                                            
✔ found hyprpm manifest                                                                 
 → Manifest has 9 pins, checking                                                        
✔ commit pin e45066d0741a1a4b9298a4c5ec43a5e57b059a4e matched hl, resetting             
 → Building borders-plus-plus                                                           
✔ built borders-plus-plus into borders-plus-plus/borders-plus-plus.so                   
 → Building csgo-vulkan-fix                                                             
✔ built csgo-vulkan-fix into csgo-vulkan-fix/csgo-vulkan-fix.so                         
 → Building hyprbars                                                                    
✔ built hyprbars into hyprbars/hyprbars.so                                              
 → Building hyprexpo                                                                    
 ━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  2 / 8  Updating hyprland-plugins   
✖ Plugin hyprexpo failed to build.
 ━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  3 / 8  Updating split-monitor-works → checking for updates for split-monitor-workspaces                                    
 ━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  3 / 8  Updating split-monitor-works! old update build files found in temp directory, removing.                             
 ━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  3 / 8  Updating split-monitor-works → Cloning https://github.com/Duckonaut/split-monitor-workspaces                        
 ━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  3 / 8  Updating split-monitor-works✔ repository split-monitor-workspaces is up-to-date.                                    
 ━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  3 / 8  Updating split-monitor-works ━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━  4 / 8  Updating split-monitor-works → checking for updates for Hyprspace                                                   
 → Cloning https://github.com/KZDKM/Hyprspace                                           
✔ repository Hyprspace is up-to-date.                                                   
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  8 / 8  Done!                       
✔ Ensuring plugin load state
✔ Plugin load state ensured

Distribution: arch linux Version hyprland: v0.38.1 (not the git version as it is outdated)

KZDKM commented 1 month ago

Hyprspace would only build on the current git version due to recent API change upstream. As shown in the output hyprexpo also didnt build as the official hyprland-plugins repo also follow hyprland-git. The AUR PKGBUILD for hyprland-git was broken due to wlroots directory change but as of now it has been fixed and is no longer marked as outdated. Please install hyprland-git and do hyprpm update then try building the plugin.

Bavalionprolate commented 1 month ago

Thank you for your reply. Using the git version of hyprland I was able to build the plugin.