Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building the plugin #12

Closed
Bavalionprolate opened this issue Apr 13, 2024 · 2 comments
Closed

Error when building the plugin #12

Bavalionprolate opened this issue Apr 13, 2024 · 2 comments

Comments

@Bavalionprolate
Copy link

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
Copy link
Owner

KZDKM commented Apr 13, 2024

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.

@KZDKM KZDKM closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
@Bavalionprolate
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants