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

Hyprload not installing on Hyprland 0.31.0 (built from source) #25

Open
yewhan opened this issue Oct 25, 2023 · 12 comments
Open

Hyprload not installing on Hyprland 0.31.0 (built from source) #25

yewhan opened this issue Oct 25, 2023 · 12 comments

Comments

@yewhan
Copy link

yewhan commented Oct 25, 2023

As mentioned in #24, hyprload fails to install. I was on Hyprland 0.31.0 when I posted that issue, and I've since updated to the latest commit and still face the same issue.

Proof of Hyprland version:

hyprctl version
Hyprland, built from branch main at commit a1b138a6258b00787cea43bddc48b7caa8cca3a0 dirty ([gha] Nix: update wlroots).
Tag: v0.31.0-35-ga1b138a6

flags: (if any)
debug

Do you have any suggestions to debug the issue?


Edit:
Posting error again for visibility:

Hyprland headers found.
Building with XWayland support.
src/main.cpp: In function ‘PLUGIN_DESCRIPTION_INFO pluginInit(void*)’:
src/main.cpp:85:69: error: ‘SCallbackInfo’ has not been declared
   85 |     HyprlandAPI::registerCallbackDynamic(PHANDLE, "tick", [](void*, SCallbackInfo&, std::any) {
      |                                                                     ^~~~~~~~~~~~~
src/main.cpp:85:59: error: could not convert ‘<lambda closure object>pluginInit(void*)::<lambda(void*, int&, std::any)>()’ from ‘pluginInit(void*)::<lambda(void*, int&, std::any)>’ to ‘HOOK_CALLBACK_FN’ {aka ‘std::function<void(void*, std::any)>’}
   85 |     HyprlandAPI::registerCallbackDynamic(PHANDLE, "tick", [](void*, SCallbackInfo&, std::any) {
      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                           |
      |                                                           pluginInit(void*)::<lambda(void*, int&, std::any)>
   86 |         hyprload::g_pHyprload->handleTick();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               
   87 |     });
      |     ~                                                      
make: *** [Makefile:61: obj/main.o] Error 1
@Magnitudexx
Copy link

I can second this, i get the same error

@Magnitudexx
Copy link

I have another error where it fails to include wlr_idle. Maybe that just makes it not include anymore header files. The header file needed for SCallbackInfo is not in the hyprload directory

@Magnitudexx
Copy link

Made a clean download and install of hyprland and that removed the SCallbackInfo error

@yewhan
Copy link
Author

yewhan commented Oct 25, 2023

Made a clean download and install of hyprland and that removed the SCallbackInfo error

Any chance you can remember your exact steps? I've tried to clean install a bunch of times now, but I'm still getting the SCallbackInfo error.

@rvDOOM
Copy link

rvDOOM commented Oct 25, 2023

Made a clean download and install of hyprland and that removed the SCallbackInfo error

Any chance you can remember your exact steps? I've tried to clean install a bunch of times now, but I'm still getting the SCallbackInfo error.

Same here. It's worth noting that I am running hyprland-nvidia-git. This is what my Hyprland version outputs:

Hyprland, built from branch main at commit a0b675ec9e57af8bc631fc8cc54d062b58669a9f dirty (binds: add ignoreMods flag).
Tag: v0.31.0-7-ga0b675ec

flags: (if any)

@Fumler
Copy link

Fumler commented Oct 27, 2023

Saw this notice on another plugin repo: https://github.com/outfoxxed/hy3#arch-aur

Pacman is not very reliable when it comes to building packages in the correct order. If hy3 fails to load or build, crashes randomly or behaves oddly (commonly dispatchers stop working) then your packages likely updated in the wrong order, or you have hyprland headers in /usr/local.

To fix this, remove /usr/include/hyprland, /usr/local/include/hyprland, /usr/share/pkgconfig/hyprland.pc and /usr/local/share/pkgconfig/hyprland.pc, then reinstall hyprland and hy3.

After following this I'm now able to install hyprload

@Rdeisenroth
Copy link

Saw this notice on another plugin repo: https://github.com/outfoxxed/hy3#arch-aur

Pacman is not very reliable when it comes to building packages in the correct order. If hy3 fails to load or build, crashes randomly or behaves oddly (commonly dispatchers stop working) then your packages likely updated in the wrong order, or you have hyprland headers in /usr/local.

To fix this, remove /usr/include/hyprland, /usr/local/include/hyprland, /usr/share/pkgconfig/hyprland.pc and /usr/local/share/pkgconfig/hyprland.pc, then reinstall hyprland and hy3.

After following this I'm now able to install hyprload

I tried this, after that i get a different error, had the same one before that (sorry for german system language):

Building with XWayland support.
In Datei, eingebunden von include/globals.hpp:3,
                 von src/main.cpp:1:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
In Datei, eingebunden von include/globals.hpp:3,
                 von include/HyprloadPlugin.hpp:2,
                 von src/Hyprload.cpp:1:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
Kompilierung beendet.
Kompilierung beendet.
In Datei, eingebunden von include/globals.hpp:3,
                 von src/util.cpp:2:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
Kompilierung beendet.
make: *** [Makefile:62: obj/Hyprload.o] Fehler 1
make: *** Es wird auf noch nicht beendete Prozesse gewartet …
make: *** [Makefile:62: obj/main.o] Fehler 1
make: *** [Makefile:62: obj/util.o] Fehler 1
In Datei, eingebunden von include/globals.hpp:3,
                 von include/HyprloadPlugin.hpp:2,
                 von src/HyprloadPlugin.cpp:4:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
Kompilierung beendet.
In Datei, eingebunden von include/globals.hpp:3,
                 von include/HyprloadConfig.hpp:2,
                 von src/HyprloadConfig.cpp:3:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
Kompilierung beendet.
make: *** [Makefile:62: obj/HyprloadConfig.o] Fehler 1
make: *** [Makefile:62: obj/HyprloadPlugin.o] Fehler 1
In Datei, eingebunden von include/globals.hpp:3,
                 von include/HyprloadPlugin.hpp:2,
                 von include/BuildProcessDescriptor.hpp:6,
                 von src/BuildProcessDescriptor.cpp:1:
/usr/include/hyprland/src/plugins/PluginAPI.hpp:26:10: schwerwiegender Fehler: ../version.h: Datei oder Verzeichnis nicht gefunden
   26 | #include "../version.h"
      |          ^~~~~~~~~~~~~~
Kompilierung beendet.
make: *** [Makefile:62: obj/BuildProcessDescriptor.o] Fehler 1
make: Verzeichnis „/home/ruben/.local/share/hyprload/src“ wird verlassen
[7/7] Installed hyprload!

@zjeffer
Copy link

zjeffer commented Oct 28, 2023

@Rdeisenroth The version error is probably because you're using the hyprland-nvidia-git package from the AUR? There's a problem with it currently. Download the PKGBUILD, in this line, change '*.hpp' to '*.h*', and then run makepkg -si. It will install Hyprland again and include the version file.

@Rdeisenroth
Copy link

@Rdeisenroth The version error is probably because you're using the hyprland-nvidia-git package from the AUR? There's a problem with it currently. Download the PKGBUILD, in this line, change '*.hpp' to '*.h*', and then run makepkg -si. It will install Hyprland again and include the version file.

Oh thx, yes that fixed it. I left a comment at the aur package requesting a change in the PKGBUILD.

@niksingh710
Copy link

I am getting this same error.
Installed Hyprland from arch repos. (tried removing hyprland and installing back again) No luck.

hyprctl version:

Hyprland, built from branch  at commit 1b48642fd15c433c53876f1b933dcd46265caf8f dirty ().
Tag: v0.30.0

flags: (if any)

Error:

make: Entering directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
make clear
make[1]: Entering directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
rm -rf build
rm -f ./protocols/*-protocol.h ./protocols/*-protocol.c
rm -f ./hyprctl/hyprctl
rm -rf ./subprojects/wlroots/build
make[1]: Leaving directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
make fixwlr
make[1]: Entering directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
sed -E -i -e 's/(soversion = 12)([^032]|$)/soversion = 12032/g' subprojects/wlroots/meson.build
rm -rf ./subprojects/wlroots/build
make[1]: Leaving directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
cd ./subprojects/wlroots && meson setup build/ --buildtype=release && ninja -C build/ && mkdir -p /usr/local/lib/ && cp ./build/libwlroots.so.12032 /usr/local/lib/ || echo "Could not install libwlroots to /usr/local/lib/libwlroots.so.12032"
/bin/sh: line 1: meson: command not found
Could not install libwlroots to /usr/local/lib/libwlroots.so.12032
cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B./build -G Ninja && cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
/bin/sh: line 1: cmake: command not found
make: *** [Makefile:29: all] Error 127
make: Leaving directory '/home/niksingh710/.local/share/hyprload/include/hyprland'
[6/7] Installing hyprload
make: Entering directory '/home/niksingh710/.local/share/hyprload/src'
g++ -c -o obj/main.o src/main.cpp -g -fPIC --no-gnu-unique -std=c++23 `pkg-config --cflags pixman-1 libdrm hyprland` -Iinclude -DWLR_USE_UNSTABLE
Hyprland headers found.
Building with XWayland support.
src/main.cpp: In function ‘PLUGIN_DESCRIPTION_INFO pluginInit(void*)’:
src/main.cpp:85:69: error: ‘SCallbackInfo’ has not been declared
   85 |     HyprlandAPI::registerCallbackDynamic(PHANDLE, "tick", [](void*, SCallbackInfo&, std::any) {
      |                                                                     ^~~~~~~~~~~~~
src/main.cpp:85:59: error: could not convert ‘<lambda closure object>pluginInit(void*)::<lambda(void*, int&, std::any)>()’ from ‘pluginInit(void*)::<lambda(void*, int&, std::any)>’ to ‘HOOK_CALLBACK_FN’ {aka ‘std::function<void(void*, std::any)>’}
   85 |     HyprlandAPI::registerCallbackDynamic(PHANDLE, "tick", [](void*, SCallbackInfo&, std::any) {
      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                           |
      |                                                           pluginInit(void*)::<lambda(void*, int&, std::any)>
   86 |         hyprload::g_pHyprload->handleTick();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 |     });
      |     ~
make: *** [Makefile:62: obj/main.o] Error 1
make: Leaving directory '/home/niksingh710/.local/share/hyprload/src'

@zjeffer
Copy link

zjeffer commented Nov 1, 2023

@niksingh710 You're using Hyprland 0.30.0, that's probably the issue. Looks like https://archlinux.org/packages/extra/x86_64/hyprland/ is outdated. Try the -git version instead.

@niksingh710
Copy link

@niksingh710 You're using Hyprland 0.30.0, that's probably the issue. Looks like archlinux.org/packages/extra/x86_64/hyprland is outdated. Try the -git version instead.

yep it worked.

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

7 participants