hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.11k stars 884 forks source link

"fatal error: SharedDefs.hpp: No such file or directory" when building any plugin #7243

Closed lifer0se closed 2 months ago

lifer0se commented 2 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 4b4971c06fb02df00a2bd20b6b47b5d0e7d799a7 (internal: introduce new types to avoid unsigned int rollover and signed int overflow (7216)). Date: Thu Aug 8 22:01:50 2024 Tag: v0.42.0-2-g4b4971c0, commits: 5071 flags: (if any) System Information: System name: Linux Node name: amnesia Release: 6.10.3-arch1-2 Version: #1 SMP PREEMPT_DYNAMIC Tue, 06 Aug 2024 07:21:19 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 555.58.02 Tue Jun 25 01:39:15 UTC 2024 os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo ```

Description

After the 0.42 update, I cannot compile any plugins, getting the following error:

../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~ compilation terminated.

The same error appears for plugins I'm building manually from source, and plugins installed using hyprpm.

I've tried rebuilding Hyprland; does not fix the issue. I've tried building a plugin in a debug session of Hyprland; same error.

How to reproduce

Running hyprpm add <url> -v with any plugin causes the error for me.

Crash reports, logs, images, videos

No response

TurtleMeds commented 2 months ago

I have the exact same issue.

here is a full output from hyprpm add https://github.com/hyprwm/hyprland-plugins -v:

click me ```log [v] version returned: Hyprland, built from branch main at commit 4b4971c06fb02df00a2bd20b6b47b5d0e7d799a7 (internal: introduce new types to avoid unsigned int rollover and signed int overflow (7216)). Date: Thu Aug 8 21:01:50 2024 Tag: v0.42.0-2-g4b4971c0, commits: 5071 flags: (if any) [v] parsed commit 4b4971c06fb02df00a2bd20b6b47b5d0e7d799a7 at branch main on Thu Aug 8 21:01:50 2024, commits 5071 ✔ adding a new plugin repository from https://github.com/hyprwm/hyprland-plugins MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author. Are you sure? [Y/n] → Cloning https://github.com/hyprwm/hyprland-plugins ✔ cloned ✔ found hyprpm manifest ✔ parsed manifest, found 6 plugins: → borders-plus-plus by Vaxry version → csgo-vulkan-fix by Vaxry version → hyprbars by Vaxry version → hyprexpo by Vaxry version → hyprtrails by Vaxry version → hyprwinwrap by Vaxry version → Manifest has 16 pins, checking ✔ Hyprland headers OK → Building borders-plus-plus ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C borders-plus-plus all make: Entering directory '/tmp/hyprpm/turtle/borders-plus-plus' g++ -shared -fPIC --no-gnu-unique main.cpp borderDeco.cpp -o borders-plus-plus.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:6: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/IHyprWindowDecoration.hpp:4, from borderDeco.hpp:5, from borderDeco.cpp:1: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:2: all] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/borders-plus-plus' ✖ Plugin borders-plus-plus failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. → Building csgo-vulkan-fix ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C csgo-vulkan-fix all make: Entering directory '/tmp/hyprpm/turtle/csgo-vulkan-fix' g++ -shared -fPIC --no-gnu-unique main.cpp -o csgo-vulkan-fix.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:5: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:2: all] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/csgo-vulkan-fix' ✖ Plugin csgo-vulkan-fix failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. → Building hyprbars ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C hyprbars all make: Entering directory '/tmp/hyprpm/turtle/hyprbars' g++ -shared -fPIC --no-gnu-unique -g -std=c++2b -Wno-c++11-narrowing `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` main.cpp barDeco.cpp -o hyprbars.so `pkg-config --libs pangocairo` -O2 In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:6: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/IHyprWindowDecoration.hpp:4, from barDeco.hpp:5, from barDeco.cpp:1: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/render/decorations/../../debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:11: hyprbars.so] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/hyprbars' ✖ Plugin hyprbars failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. → Building hyprexpo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C hyprexpo all make: Entering directory '/tmp/hyprpm/turtle/hyprexpo' g++ -shared -fPIC --no-gnu-unique main.cpp overview.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -Wno-narrowing In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:5: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:26, from globals.hpp:3, from overview.hpp:5, from overview.cpp:1: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:2: all] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/hyprexpo' ✖ Plugin hyprexpo failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. → Building hyprtrails ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C hyprtrails all make: Entering directory '/tmp/hyprpm/turtle/hyprtrails' g++ -shared -fPIC --no-gnu-unique main.cpp trail.cpp -o hyprtrails.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:6: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:26, from trail.hpp:6, from trail.cpp:1: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:2: all] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/hyprtrails' ✖ Plugin hyprtrails failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. → Building hyprwinwrap ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━ 3 / 5 Building plugin(s)[v] shell returned: -> cd /tmp/hyprpm/turtle && PKG_CONFIG_PATH="/home/turtle/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C hyprwinwrap all make: Entering directory '/tmp/hyprpm/turtle/hyprwinwrap' g++ -shared -fPIC --no-gnu-unique main.cpp -o hyprwinwrap.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 In file included from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:9, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/defines.hpp:2, from /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/Compositor.hpp:8, from main.cpp:11: /home/turtle/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/../helpers/MiscFunctions.hpp:9:10: fatal error: SharedDefs.hpp: No such file or directory 9 | #include "SharedDefs.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:2: all] Error 1 make: Leaving directory '/tmp/hyprpm/turtle/hyprwinwrap' ✖ Plugin hyprwinwrap failed to build. This likely means that the plugin is either outdated, not yet available for your version, or broken. If you are on -git, update first. Try re-running with -v to see more verbose output. ✔ all plugins built ✔ installed repository ✔ you can now enable the plugin(s) with hyprpm enable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 / 5 Done! ```
lifer0se commented 2 months ago

Furthermore - I went ahead to downgrade to v0.41.2 to get plugins back up and running. It was a pain.

hyprpm does not seem to take the current branch into account when cloning the hyprland repo, so it'll clone v0.42.0 and crash trying to find missing library files (wlroots stuff that was removed).

Quick and dirty fix: edit ./hyprpm/src/core/PluginManager.cpp at line 440: std::string ret = execAndGet("cd /tmp/hyprpm && git clone --recursive --branch v0.41.2 https://github.com/hyprwm/hyprland hyprland-" + USERNAME + (bShallow ? " --shallow-since='" + SHALLOW_DATE + "'" : ""));

It'll pull the correct branch for v0.41.2 and hyprpm will run with no issues.

p.s. I could fix hyprpm to read the branch and clone that from git and do a PR, unless you're working on a different fix.

vaxerski commented 2 months ago

7245