KZDKM / Hyprspace

Workspace overview plugin for Hyprland
GNU General Public License v2.0
530 stars 16 forks source link

Fails to build on v0.42.0 #77

Closed proudhon closed 3 months ago

proudhon commented 3 months ago

With hyprpm fails to build on v0.42.0:

hyprpm --verbose add 'https://github.com/KZDKM/Hyprspace'

[v] version returned: Hyprland, built from branch  at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259  (props: bump version to 0.42.0).
Date: Wed Aug 7 19:17:10 2024
Tag: v0.42.0, commits: 5069

flags: (if any)

[v] parsed commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259 at branch  on Wed Aug 7 19:17:10 2024, commits 5069
✔ adding a new plugin repository from https://github.com/KZDKM/Hyprspace
  MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author.
  Are you sure? [Y/n] y

 → Cloning https://github.com/KZDKM/Hyprspace                                                                   
✔ cloned                                                                                                        
✔ found hyprpm manifest                                                                                         
✔ parsed manifest, found 1 plugins:                                                                             
 → Hyprspace by KZdkm version                                                                                   
 → Manifest has 2 pins, checking                                                                                
✔ Hyprland headers OK                                                                                           
 → Building Hyprspace                                                                                           
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━  3 / 5  Building plugin(s)[v] shell returned:  -> cd /tmp/hyprpm/[REDACTED] && PKG_CONFIG_PATH="/home/[REDACTED]/.local/share/hyprpm/headersRoot/share/pkgconfig" make all
g++ -shared -fPIC --no-gnu-unique -Wall -g -DWLR_USE_UNSTABLE -std=c++2b -O2 `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` src/Input.cpp src/Layout.cpp src/main.cpp src/Overview.cpp src/Render.cpp -o Hyprspace.so
src/main.cpp: In function ‘void onTouchDown(void*, SCallbackInfo&, std::any)’:
src/main.cpp:266:34: error: ‘wlr_touch_down_event’ was not declared in this scope; did you mean ‘wl_resource_post_event’?
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                                  ^~~~~~~~~~~~~~~~~~~~
      |                                  wl_resource_post_event
src/main.cpp:266:25: error: parse error in template argument list
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:266:56: error: no matching function for call to ‘any_cast<<expression error> >(std::any&)’
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/[REDACTED]/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../SharedDefs.hpp:5,
                 from /home/[REDACTED]/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../includes.hpp:36,
                 from /home/[REDACTED]/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../defines.hpp:1,
                 from /home/[REDACTED]/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginSystem.hpp:3,
                 from src/main.cpp:1:
/usr/include/c++/14.2.1/any:462:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(const any&)’
  462 |     inline _ValueType any_cast(const any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:462:23: note:   template argument deduction/substitution failed:
src/main.cpp:266:56: error: template argument 1 is invalid
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:488:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&)’
  488 |     inline _ValueType any_cast(any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:488:23: note:   template argument deduction/substitution failed:
src/main.cpp:266:56: error: template argument 1 is invalid
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:502:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&&)’
  502 |     inline _ValueType any_cast(any&& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:502:23: note:   template argument deduction/substitution failed:
src/main.cpp:266:56: error: template argument 1 is invalid
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:555:30: note: candidate: ‘template<class _ValueType> const _ValueType* std::any_cast(const any*)’
  555 |     inline const _ValueType* any_cast(const any* __any) noexcept
      |                              ^~~~~~~~
/usr/include/c++/14.2.1/any:555:30: note:   template argument deduction/substitution failed:
src/main.cpp:266:56: error: template argument 1 is invalid
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:570:24: note: candidate: ‘template<class _ValueType> _ValueType* std::any_cast(any*)’
  570 |     inline _ValueType* any_cast(any* __any) noexcept
      |                        ^~~~~~~~
/usr/include/c++/14.2.1/any:570:24: note:   template argument deduction/substitution failed:
src/main.cpp:266:56: error: template argument 1 is invalid
  266 |     const auto e = std::any_cast<wlr_touch_down_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
src/main.cpp: In function ‘void onTouchUp(void*, SCallbackInfo&, std::any)’:
src/main.cpp:275:34: error: ‘wlr_touch_up_event’ was not declared in this scope
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                                  ^~~~~~~~~~~~~~~~~~
src/main.cpp:275:25: error: parse error in template argument list
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:275:54: error: no matching function for call to ‘any_cast<<expression error> >(std::any&)’
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:462:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(const any&)’
  462 |     inline _ValueType any_cast(const any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:462:23: note:   template argument deduction/substitution failed:
src/main.cpp:275:54: error: template argument 1 is invalid
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:488:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&)’
  488 |     inline _ValueType any_cast(any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:488:23: note:   template argument deduction/substitution failed:
src/main.cpp:275:54: error: template argument 1 is invalid
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:502:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&&)’
  502 |     inline _ValueType any_cast(any&& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.2.1/any:502:23: note:   template argument deduction/substitution failed:
src/main.cpp:275:54: error: template argument 1 is invalid
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:555:30: note: candidate: ‘template<class _ValueType> const _ValueType* std::any_cast(const any*)’
  555 |     inline const _ValueType* any_cast(const any* __any) noexcept
      |                              ^~~~~~~~
/usr/include/c++/14.2.1/any:555:30: note:   template argument deduction/substitution failed:
src/main.cpp:275:54: error: template argument 1 is invalid
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14.2.1/any:570:24: note: candidate: ‘template<class _ValueType> _ValueType* std::any_cast(any*)’
  570 |     inline _ValueType* any_cast(any* __any) noexcept
      |                        ^~~~~~~~
/usr/include/c++/14.2.1/any:570:24: note:   template argument deduction/substitution failed:
src/main.cpp:275:54: error: template argument 1 is invalid
  275 |     const auto e = std::any_cast<wlr_touch_up_event*>(args);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
src/Overview.cpp: In member function ‘void CHyprspaceWidget::show()’:
src/Overview.cpp:38:63: error: ‘FULLSCREEN_INVALID’ was not declared in this scope
   38 |                 if (w != nullptr && ws->m_efFullscreenMode != FULLSCREEN_INVALID) {
      |                                                               ^~~~~~~~~~~~~~~~~~
src/Overview.cpp:41:51: error: ‘FULLSCREEN_FULL’ was not declared in this scope
   41 |                     if (ws->m_efFullscreenMode == FULLSCREEN_FULL) w->m_bFakeFullscreenState = true;
      |                                                   ^~~~~~~~~~~~~~~
src/Overview.cpp:41:71: error: ‘class CWindow’ has no member named ‘m_bFakeFullscreenState’; did you mean ‘m_sFullscreenState’?
   41 |                     if (ws->m_efFullscreenMode == FULLSCREEN_FULL) w->m_bFakeFullscreenState = true;
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                       m_sFullscreenState
src/Overview.cpp:44:36: error: ‘class CCompositor’ has no member named ‘setWindowFullscreen’; did you mean ‘setWindowFullscreenState’?
   44 |                     g_pCompositor->setWindowFullscreen(w, false);
      |                                    ^~~~~~~~~~~~~~~~~~~
      |                                    setWindowFullscreenState
src/Overview.cpp: In member function ‘void CHyprspaceWidget::hide()’:
src/Overview.cpp:111:24: error: ‘class CCompositor’ has no member named ‘setWindowFullscreen’; did you mean ‘setWindowFullscreenState’?
  111 |         g_pCompositor->setWindowFullscreen(w, true, oFullscreenMode);
      |                        ^~~~~~~~~~~~~~~~~~~
      |                        setWindowFullscreenState
src/Overview.cpp:112:32: error: ‘FULLSCREEN_FULL’ was not declared in this scope
  112 |         if (oFullscreenMode == FULLSCREEN_FULL) w->m_bFakeFullscreenState = false;
      |                                ^~~~~~~~~~~~~~~
src/Overview.cpp:112:52: error: ‘class CWindow’ has no member named ‘m_bFakeFullscreenState’; did you mean ‘m_sFullscreenState’?
  112 |         if (oFullscreenMode == FULLSCREEN_FULL) w->m_bFakeFullscreenState = false;
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
      |                                                    m_sFullscreenState
src/Render.cpp: In function ‘void renderWindowStub(PHLWINDOW, CMonitor*, PHLWORKSPACE, Hyprutils::Math::CBox, timespec*)’:
src/Render.cpp:8:39: error: ‘class CWindow’ has no member named ‘m_bIsFullscreen’; did you mean ‘isFullscreen’?
    8 |     const auto oFullscreen = pWindow->m_bIsFullscreen;
      |                                       ^~~~~~~~~~~~~~~
      |                                       isFullscreen
src/Render.cpp:11:47: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   11 |     const auto oUseNearestNeighbor = pWindow->m_sAdditionalConfigData.nearestNeighbor.toUnderlying();
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp:17:44: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   17 |     const auto oSpecialRounding = pWindow->m_sAdditionalConfigData.rounding;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp:27:14: error: ‘class CWindow’ has no member named ‘m_bIsFullscreen’; did you mean ‘isFullscreen’?
   27 |     pWindow->m_bIsFullscreen = false; // FIXME: no windows should be in fullscreen when overview is open, reject all fullscreen requests when active
      |              ^~~~~~~~~~~~~~~
      |              isFullscreen
src/Render.cpp:28:14: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   28 |     pWindow->m_sAdditionalConfigData.nearestNeighbor = false; // FIX: this wont do, need to scale surface texture down properly so that windows arent shown as pixelated mess
      |              ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp:31:14: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   31 |     pWindow->m_sAdditionalConfigData.rounding = pWindow->rounding() * pMonitor->scale * curScaling;
      |              ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp:41:14: error: ‘class CWindow’ has no member named ‘m_bIsFullscreen’; did you mean ‘isFullscreen’?
   41 |     pWindow->m_bIsFullscreen = oFullscreen;
      |              ^~~~~~~~~~~~~~~
      |              isFullscreen
src/Render.cpp:42:14: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   42 |     pWindow->m_sAdditionalConfigData.nearestNeighbor = oUseNearestNeighbor;
      |              ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp:45:14: error: ‘class CWindow’ has no member named ‘m_sAdditionalConfigData’
   45 |     pWindow->m_sAdditionalConfigData.rounding = oSpecialRounding;
      |              ^~~~~~~~~~~~~~~~~~~~~~~
src/Render.cpp: In member function ‘void CHyprspaceWidget::draw()’:
src/Render.cpp:117:247: warning: narrowing conversion of ‘Config::panelBorderWidth’ from ‘int’ to ‘double’ [-Wnarrowing]
  117 |         CBox borderBox = {widgetBox.x, owner->vecPosition.y + (Config::onBottom * owner->vecTransformedSize.y) + (Config::panelHeight + Config::reservedArea - curYOffset.value()* owner->scale) * bottomInvert, owner->vecTransformedSize.x, Config::panelBorderWidth};
      |                                                                                                                                                                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~
make: *** [Makefile:7: all] Error 1

✖ Plugin Hyprspace 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!       
Supernovatux commented 3 months ago

75 fixes this.