hyprpm: protocol header install fails
Hyprland Version
System/Version info
Hyprland, built from branch main at commit a66cfe0fbed7fb4dc69383e107c2bf3b1e7cd80a (CMake: use add_custom_command for generating protocols (6104)).
Date: Thu May 16 18:34:03 2024
Tag: v0.40.0-103-ga66cfe0f, commits: 4709
flags: (if any)
System Information:
System name: Linux
Node name: blkheart
Release: 6.8.9-zen1-2-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Tue, 07 May 2024 22:06:02 +0000
GPU information:
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c0) (prog-if 00 [VGA controller])
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
plugins:
Bug or Regression?
Bug
Description
✔ configured Hyprland
[v] installation will run: sed -i -e "s#PREFIX = /usr/local#PREFIX = /home/zakk/.local/share/hyprpm/headersRoot#" /tmp/hyprpm/hyprland-zakk/Makefile && cd /tmp/hyprpm/hyprland-zakk && make installheaders
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━ 4 / 5 Installing sources[v] installer returned: # remove previous headers from hyprpm's dir
rm -fr /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland
mkdir -p /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland
mkdir -p /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland/protocols
mkdir -p /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland/wlr
mkdir -p /home/zakk/.local/share/hyprpm/headersRoot/share/pkgconfig
find src -name '.h' -print0 | cpio --quiet -0dump /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland
cd subprojects/wlroots-hyprland/include/wlr && find . -name '.h' -print0 | cpio --quiet -0dump /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland/wlr && cd ../../../..
cd subprojects/wlroots-hyprland/build/include && find . -name '.h' -print0 | cpio --quiet -0dump /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland/wlr && cd ../../../..
cp ./protocols/.h /home/zakk/.local/share/hyprpm/headersRoot/include/hyprland/protocols
cp: cannot stat './protocols/.h': No such file or directory
make: *** [Makefile:57: installheaders] Error 1
How to reproduce
hyprpm update
Crash reports, logs, images, videos
No response
Works fine without commit a66cfe0fbed7fb4dc69383e107c2bf3b1e7cd80a
FUFFIEEEE @fufexan CAN YOU STOP BREAKING MY PLUGINS?
My bad gang, didn't test outside CI.
I will perform a prostate exam on you if you do that again
Any fix for this? Someone else fixed it by reinstalling hyprwayland-scanner, but that doesn't seem to work for me.
ask @fufexan
Same error here. Can't use any plugin, tried all possible suggestions I saw
Looks like the same error
cp ./protocols/*.h* /home/MyUser/.local/share/hyprpm/headersRoot/include/hyprland/protocols
cp: cannot stat './protocols/*.h*': No such file or directory
make: *** [Makefile:57: installheaders] Error 1
✖ failed to install headers with error code 2
Hyprland, built from branch main at commit f8857e6072bd85b95393499688872aaf7f088b5b (input: find surface pos correctly when mouse drag is active).
Date: Sat May 18 22:20:01 2024
Tag: v0.40.0-113-gf8857e60, commits: 4719
flags: (if any)
Maybe try the newest version of hyprwayland-scanner-git. On my system installing hyprwayland-scanner from arch/extra didn't work, but replacing it with hyprwayland-scanner-git from the AUR (like mentioned here) fixed it somehow.
Not really , I already had it from -git , but I tried with --devel just in case but also no
local/hyprwayland-scanner-git 0.3.8.r1.g3afed436-1
A Hyprland implementation of wayland-scanner, in and for C++
Yeah I'm not even sure if the commit is at fault. Running diff on the generated include/hyprland/protocols dirs yields an empty diff, both after and before that commit.
I just retested with hyprwayland-scanner-git updated to latest
a66cfe0 fails 7173f0c works
@fufexan In a66cfe0, you changed the hyprwayland-scanner commands from being executed at configure time (because of the use of execute_process), to being executed at build time (add_custom_command).
From what I can tell, hyprpm will configure Hyprland, but not build it. So the protocols/*.h* files will never be generated.
Why some people seem to fix it by (re)installing hyprwayland-scanner-git is a mystery to me.
Makes sense. @cnt0 do you mind if I revert the commit, or do you have a better approach for this?
I don't mind. Maybe just make those generated files part of the repository and call it a day?
They're generated files, so no.
can we actually keep both execute_process and add_custom_command? This way these files will be generated during the configuration, and if they'll be deleted then rebuild won't fail (which was my motivation to add add_custom_command)
In my opinion the makefile should be changed so that installheaders is an actual cmake target (using add_custom_target) that depends on the OUTPUTS in the add_custom_commands. This way, they will only be generated when they are needed and not yet present.
But for now I think simply reverting is the best option until a better solution is implemented.