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

hyprpm: protocol header install fails #6115

Closed
zakk4223 opened this issue May 17, 2024 · 19 comments
Closed

hyprpm: protocol header install fails #6115

zakk4223 opened this issue May 17, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@zakk4223
Copy link
Contributor

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

@zakk4223 zakk4223 added the bug Something isn't working label May 17, 2024
@zakk4223
Copy link
Contributor Author

Works fine without commit a66cfe0

@vaxerski
Copy link
Member

FUFFIEEEE @fufexan CAN YOU STOP BREAKING MY PLUGINS?

@fufexan
Copy link
Member

fufexan commented May 17, 2024

My bad gang, didn't test outside CI.

@vaxerski
Copy link
Member

I will perform a prostate exam on you if you do that again

@zjeffer
Copy link
Contributor

zjeffer commented May 19, 2024

Any fix for this? Someone else fixed it by reinstalling hyprwayland-scanner, but that doesn't seem to work for me.

@vaxerski
Copy link
Member

ask @fufexan

@CarloCattano
Copy link

Same error here. Can't use any plugin, tried all possible suggestions I saw

@CarloCattano
Copy link

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

hyprpmbug.txt

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)

@ttgg1
Copy link

ttgg1 commented May 20, 2024

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.

@CarloCattano
Copy link

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++

@fufexan
Copy link
Member

fufexan commented May 20, 2024

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.

@zakk4223
Copy link
Contributor Author

zakk4223 commented May 20, 2024

I just retested with hyprwayland-scanner-git updated to latest

a66cfe0 fails
7173f0c works

@zjeffer
Copy link
Contributor

zjeffer commented May 20, 2024

@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.

@fufexan
Copy link
Member

fufexan commented May 21, 2024

Makes sense. @cnt0 do you mind if I revert the commit, or do you have a better approach for this?

@cnt0
Copy link
Contributor

cnt0 commented May 21, 2024

I don't mind. Maybe just make those generated files part of the repository and call it a day?

@fufexan
Copy link
Member

fufexan commented May 21, 2024

They're generated files, so no.

@cnt0
Copy link
Contributor

cnt0 commented May 21, 2024

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)

@zjeffer
Copy link
Contributor

zjeffer commented May 21, 2024

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.

@zjeffer
Copy link
Contributor

zjeffer commented May 21, 2024

But for now I think simply reverting is the best option until a better solution is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants