hyprland-plugins: New plugin hyprexpo fails to build

As a follow up to #105, hyprexpo is now in the manifest, but it doesn’t build. All the other plugins in the manifest seem to have built, and no logs or useful errors are output:

$ hyprpm add https://github.com/hyprwm/hyprland-plugins.git
✔ adding a new plugin repository from https://github.com/hyprwm/hyprland-plugins.git
  MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author.
  Are you sure? [Y/n] y

! old plugin repo build files found in temp directory, removing.
 → Cloning https://github.com/hyprwm/hyprland-plugins.git
✔ 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 8 pins, checking
✔ commit pin e45066d0741a1a4b9298a4c5ec43a5e57b059a4e matched hl, resetting
✔ Hyprland headers OK
 → 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
✖ Plugin hyprexpo failed to build.

 → Building hyprtrails
✔ built hyprtrails into hyprtrails/hyprtrails.so
 → Building hyprwinwrap
✔ built hyprwinwrap into hyprwinwrap/hyprwinwrap.so
✔ all plugins built
✔ installed repository
✔ you can now enable the plugin(s) with hyprpm enable

Perhaps a user hint for what to do next when a build fails would be a good thing to add to the output. Is there a place to find build logs even?

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Reactions: 4
  • Comments: 25 (10 by maintainers)

Most upvoted comments

I’ve added some stuff so that it’s like this now: image

worth noting it won’t work retroactively, it’s available in git now. Is that enough?

Ignore the duplicate bars its me being a bit goof

makes sense. I’ll try to do something about the UX tomorrow.

Okay several issues:

  • Yes the version matters, but since @vaxerski first said it needed to be “today’s Git”, it has changed again. Now it needs to be a version ever after what was posted at the time that was said. I guess the plugin and compositor commits are ratcheting up on eachother.
  • You can’t update the package and rebuild the plugins, it doesn’t use the libraries installed on the system it uses it’s own vendored copy of what is running on the system. That means you have to restart the running compositor before trying to build plugins.
  • You can’t build plugins without the compositor running. A tmux session left open while the Wayland session logged out and back in won’t gut it. You have to be in a child process of the currently running compositor to build plugins.

Tag: v0.38.0-21-g36a8ae9b works (to build at least, haven’t tried using it) given those other points.

This brings us back to UX. The experience of trying to build plugins is quite opaque and the errors point nowhere useful for any of this. The running sessions vs. downloaded vendored copy of hyprland source code needs to be explained, as does the issue wind needing to be in a running copy, and of course plugins should clearly identify a minimum version and that should produce a different error than any of the above.

oh wait, I misread the thing.

Uhh yeah hyprexpo won’t build cuz you’re on tagged. hyprexpo is -git only. (or, well future 0.39)

❯ hyprpm add https://github.com/hyprwm/hyprland-plugins.git --verbose
[v] version returned: Hyprland, built from branch main at commit 10146f5ec50caeae2d835f5f6296137e2ac6f243 dirty (core: fix some crash conditions around workspace ptrs in CWindow).
Date: Wed Apr 3 21:42:38 2024
Tag: v0.38.0-18-g10146f5e

flags: (if any)


[v] parsed commit 10146f5ec50caeae2d835f5f6296137e2ac6f243 at branch main

[...]

 → Building hyprexpo                                                                                                                               
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━  3 / 5  Building plugin(s)[v] shell returned:  -> cd /tmp/hyprpm/new && PKG_CONFIG_PATH="/home/yusuf/.local/share/hyprpm/headersRoot/share/pkgconfig" make -C hyprexpo all
make: Entering directory '/tmp/hyprpm/new/hyprexpo'
g++ -shared -fPIC --no-gnu-unique main.cpp overview.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++2b -Wno-narrowing
overview.cpp: In constructor ‘COverview::COverview(PHLWORKSPACE, bool)’:
overview.cpp:144:37: error: ‘struct SCurrentRenderData’ has no member named ‘blockScreenShader’
  144 |         g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
      |                                     ^~~~~~~~~~~~~~~~~
overview.cpp: In member function ‘void COverview::redrawID(int, bool)’:
overview.cpp:261:33: error: ‘struct SCurrentRenderData’ has no member named ‘blockScreenShader’
  261 |     g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
      |                                 ^~~~~~~~~~~~~~~~~
make: *** [Makefile:2: all] Error 1
make: Leaving directory '/tmp/hyprpm/new/hyprexpo'


✖ Plugin hyprexpo failed to build.    

also about the “it only builds for the newest version”, shouldn’t hyprpm skip the plugin then if it isn’t for the version?

expo needs today’s git. Add -v to your hyprpm command to see what went wrong