shezdy/hyprsplit

Problems compiling against Hyprland 0.38.1

Closed this issue · 1 comments

I am trying to compile hyprsplit for hyprland 0.38.1. I am getting the following compiling errors. I'm at my wit's end, what am I doing wrong?

starting phase `build'
[1/2] Compiling C++ object libhyprsplit.so.p/src_main.cpp.o
FAILED: libhyprsplit.so.p/src_main.cpp.o 
c++ -Ilibhyprsplit.so.p -I. -I../source -I/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/protocols -I/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/wlroots -I/gnu/store/2zsgnarzjlx02zzazfwvb7x3alih09ci-pixman-0.42.2/include/pixman-1 -I/gnu/store/mr5dia1myqm0rqhqx2khn7walf0gh9fb-libdrm-2.4.120/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -DWLR_USE_UNSTABLE -std=gnu++2b -fPIC -MD -MQ libhyprsplit.so.p/src_main.cpp.o -MF libhyprsplit.so.p/src_main.cpp.o.d -o libhyprsplit.so.p/src_main.cpp.o -c ../source/src/main.cpp
../source/src/main.cpp: In function ‘std::string getWorkspaceOnCurrentMonitor(const std::string&)’:
../source/src/main.cpp:15:108: error: ‘class CMonitor’ has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   15 |         const auto PLUSMINUSRESULT = getPlusMinusKeywordResult(workspace, ((g_pCompositor->m_pLastMonitor->activeWorkspaceID() - 1) % **NUMWORKSPACES) + 1);
      |                                                                                                            ^~~~~~~~~~~~~~~~~
      |                                                                                                            activeWorkspace
../source/src/main.cpp:25:116: error: ‘class CMonitor’ has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   25 |         const auto PLUSMINUSRESULT = getPlusMinusKeywordResult(workspace.substr(1), g_pCompositor->m_pLastMonitor->activeWorkspaceID());
      |                                                                                                                    ^~~~~~~~~~~~~~~~~
      |                                                                                                                    activeWorkspace
../source/src/main.cpp:47:62: error: ‘class CMonitor’ has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   47 |         return std::to_string(g_pCompositor->m_pLastMonitor->activeWorkspaceID());
      |                                                              ^~~~~~~~~~~~~~~~~
      |                                                              activeWorkspace
../source/src/main.cpp: In function ‘void ensureGoodWorkspaces()’:
../source/src/main.cpp:71:16: error: ‘using std::__shared_ptr_access<CMonitor, __gnu_cxx::_S_atomic, false, false>::element_type = class CMonitor’ {aka ‘class CMonitor’} has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   71 |         if (m->activeWorkspaceID() < MIN || m->activeWorkspaceID() > MAX) {
      |                ^~~~~~~~~~~~~~~~~
      |                activeWorkspace
../source/src/main.cpp:71:48: error: ‘using std::__shared_ptr_access<CMonitor, __gnu_cxx::_S_atomic, false, false>::element_type = class CMonitor’ {aka ‘class CMonitor’} has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   71 |         if (m->activeWorkspaceID() < MIN || m->activeWorkspaceID() > MAX) {
      |                                                ^~~~~~~~~~~~~~~~~
      |                                                activeWorkspace
../source/src/main.cpp:72:131: error: ‘using std::__shared_ptr_access<CMonitor, __gnu_cxx::_S_atomic, false, false>::element_type = class CMonitor’ {aka ‘class CMonitor’} has no member named ‘activeWorkspaceID’; did you mean ‘activeWorkspace’?
   72 |             Debug::log(LOG, "[hyprsplit] {} {} active workspace {} out of bounds, changing workspace to {}", m->szName, m->ID, m->activeWorkspaceID(), MIN);
      |                                                                                                                                   ^~~~~~~~~~~~~~~~~
      |                                                                                                                                   activeWorkspace
../source/src/main.cpp:87:55: error: cannot convert ‘std::unique_ptr<CWorkspace>’ to ‘CWorkspace*’
   87 |                 g_pCompositor->moveWorkspaceToMonitor(ws, m.get());
      |                                                       ^~
      |                                                       |
      |                                                       std::unique_ptr<CWorkspace>
In file included from ../source/src/globals.hpp:4,
                 from ../source/src/main.cpp:1:
/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/src/Compositor.hpp:175:43: note:   initializing argument 1 of ‘void CCompositor::moveWorkspaceToMonitor(CWorkspace*, CMonitor*, bool)’
  175 |     void           moveWorkspaceToMonitor(CWorkspace*, CMonitor*, bool noWarpCursor = false);
      |                                           ^~~~~~~~~~~
../source/src/main.cpp: In function ‘void swapActiveWorkspaces(std::string)’:
../source/src/main.cpp:164:16: error: ‘class CWindow’ has no member named ‘workspaceID’; did you mean ‘m_iWorkspaceID’?
  164 |         if (w->workspaceID() == PWORKSPACEA->m_iID) {
      |                ^~~~~~~~~~~
      |                m_iWorkspaceID
../source/src/main.cpp:164:44: error: base operand of ‘->’ is not a pointer
  164 |         if (w->workspaceID() == PWORKSPACEA->m_iID) {
      |                                            ^~
../source/src/main.cpp:167:16: error: ‘class CWindow’ has no member named ‘workspaceID’; did you mean ‘m_iWorkspaceID’?
  167 |         if (w->workspaceID() == PWORKSPACEB->m_iID) {
      |                ^~~~~~~~~~~
      |                m_iWorkspaceID
../source/src/main.cpp:167:44: error: base operand of ‘->’ is not a pointer
  167 |         if (w->workspaceID() == PWORKSPACEB->m_iID) {
      |                                            ^~
../source/src/main.cpp:173:53: error: invalid conversion from ‘int’ to ‘CWorkspace*’ [-fpermissive]
  173 |         g_pCompositor->moveWindowToWorkspaceSafe(w, PWORKSPACEB);
      |                                                     ^~~~~~~~~~~
      |                                                     |
      |                                                     int
/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/src/Compositor.hpp:198:76: note:   initializing argument 2 of ‘void CCompositor::moveWindowToWorkspaceSafe(CWindow*, CWorkspace*)’
  198 |     void           moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorkspace);
      |                                                                ~~~~~~~~~~~~^~~~~~~~~~
../source/src/main.cpp:176:53: error: invalid conversion from ‘int’ to ‘CWorkspace*’ [-fpermissive]
  176 |         g_pCompositor->moveWindowToWorkspaceSafe(w, PWORKSPACEA);
      |                                                     ^~~~~~~~~~~
      |                                                     |
      |                                                     int
/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/src/Compositor.hpp:198:76: note:   initializing argument 2 of ‘void CCompositor::moveWindowToWorkspaceSafe(CWindow*, CWorkspace*)’
  198 |     void           moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorkspace);
      |                                                                ~~~~~~~~~~~~^~~~~~~~~~
../source/src/main.cpp:179:52: error: invalid conversion from ‘int’ to ‘CWorkspace*’ [-fpermissive]
  179 |     g_pCompositor->updateFullscreenFadeOnWorkspace(PWORKSPACEA);
      |                                                    ^~~~~~~~~~~
      |                                                    |
      |                                                    int
/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/src/Compositor.hpp:180:52: note:   initializing argument 1 of ‘void CCompositor::updateFullscreenFadeOnWorkspace(CWorkspace*)’
  180 |     void           updateFullscreenFadeOnWorkspace(CWorkspace*);
      |                                                    ^~~~~~~~~~~
../source/src/main.cpp:180:52: error: invalid conversion from ‘int’ to ‘CWorkspace*’ [-fpermissive]
  180 |     g_pCompositor->updateFullscreenFadeOnWorkspace(PWORKSPACEB);
      |                                                    ^~~~~~~~~~~
      |                                                    |
      |                                                    int
/gnu/store/2a0wiqf020hmzq7ryi7iiynlfixpviyq-hyprland-0.38.1/include/hyprland/src/Compositor.hpp:180:52: note:   initializing argument 1 of ‘void CCompositor::updateFullscreenFadeOnWorkspace(CWorkspace*)’
  180 |     void           updateFullscreenFadeOnWorkspace(CWorkspace*);
      |                                                    ^~~~~~~~~~~
../source/src/main.cpp: In function ‘void grabRogueWindows(std::string)’:
../source/src/main.cpp:194:35: error: ‘class CWindow’ has no member named ‘onSpecialWorkspace’
  194 |         if (!w->m_bIsMapped || w->onSpecialWorkspace())
      |                                   ^~~~~~~~~~~~~~~~~~
../source/src/main.cpp:203:20: error: ‘class CWindow’ has no member named ‘workspaceID’; did you mean ‘m_iWorkspaceID’?
  203 |             if (w->workspaceID() >= MIN && w->workspaceID() <= MAX) {
      |                    ^~~~~~~~~~~
      |                    m_iWorkspaceID
../source/src/main.cpp:203:47: error: ‘class CWindow’ has no member named ‘workspaceID’; did you mean ‘m_iWorkspaceID’?
  203 |             if (w->workspaceID() >= MIN && w->workspaceID() <= MAX) {
      |                                               ^~~~~~~~~~~
      |                                               m_iWorkspaceID
../source/src/main.cpp:210:101: error: base operand of ‘->’ is not a pointer
  210 |             Debug::log(LOG, "[hyprsplit] moving window {} to workspace {}", w->m_szTitle, PWORKSPACE->m_iID);
      |                                                                                                     ^~
../source/src/main.cpp:211:74: error: base operand of ‘->’ is not a pointer
  211 |             const auto args = std::format("{},address:0x{:x}", PWORKSPACE->m_iID, w.get());
      |                                                                          ^~
ninja: build stopped: subcommand failed.
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "ninja" arguments: ("-j" "20") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `build' failed after 3.0 seconds
command "ninja" "-j" "20" failed with status 1
builder for `/gnu/store/iig08yji1qzwvwvzndyk6gycx7zyfxvg-hyprland-plugin-hyprsplit-3b71eaf.drv' failed with exit code 1

You need to check out the right commit, main follows hyprland git. If you look at the commit pins in hyprpm.toml you can find the right one. For 0.38.1 you need to reset the plugin to fd31d08d2f9756ba487541a4d2f5a2cbf0eb16aa