Makrennel / hyprland-void

void linux hyprland templates for building with xbps-src
Other
114 stars 11 forks source link

Musl build failing #27

Closed 22h49 closed 5 months ago

22h49 commented 5 months ago

Hi again,

GCC update in void packages, yay!

Sadly the newest version fails to build on musl (at least as far as I can tell) with this build error:

[...]
FAILED: CMakeFiles/Hyprland.dir/src/plugins/HookSystem.cpp.o 
/usr/bin/g++ -DHAS_EXECINFO -DHyprland_EXPORTS -DWLR_USE_UNSTABLE -I/builddir/hyprland-0.34.0/. -I/builddir/hyprland-0.34.0/src -I/builddir/hyprland-0.34.0/subprojects/wlroots/include -I/builddir/hyprland-0.34.0/subprojects/wlroots/build/include -I/builddir/hyprland-0.34.0/subprojects/udis86 -I/builddir/hyprland-0.34.0/protocols -I/builddir/hyprland-0.34.0/subprojects/udis86/libudis86 -isystem /usr/include/libdrm -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/cairo -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/pixman-1 -lexecinfo -O3 -DNDEBUG -std=gnu++23 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -Winvalid-pch -include /builddir/hyprland-0.34.0/build/CMakeFiles/Hyprland.dir/cmake_pch.hxx -MD -MT CMakeFiles/Hyprland.dir/src/plugins/HookSystem.cpp.o -MF CMakeFiles/Hyprland.dir/src/plugins/HookSystem.cpp.o.d -o CMakeFiles/Hyprland.dir/src/plugins/HookSystem.cpp.o -c /builddir/hyprland-0.34.0/src/plugins/HookSystem.cpp
In file included from /usr/include/limits.h:8,
                 from /usr/include/c++/13.2/climits:42,
                 from /usr/include/c++/13.2/bits/atomic_wait.h:43,
                 from /usr/include/c++/13.2/bits/atomic_base.h:42,
                 from /usr/include/c++/13.2/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/13.2/memory:81,
                 from /builddir/hyprland-0.34.0/src/Compositor.hpp:3,
                 from /builddir/hyprland-0.34.0/./src/pch/pch.hpp:1,
                 from /builddir/hyprland-0.34.0/build/CMakeFiles/Hyprland.dir/cmake_pch.hxx:5,
                 from <command-line>:
/builddir/hyprland-0.34.0/src/plugins/HookSystem.cpp: In member function 'bool CFunctionHook::hook()':
/builddir/hyprland-0.34.0/src/plugins/HookSystem.cpp:193:20: error: expected unqualified-id before numeric constant
  193 |     const auto     PAGESIZE  = sysconf(_SC_PAGE_SIZE);
      |                    ^~~~~~~~
[...]

All caps PAGESIZE seems to be defined as a macro somewhere in the includes (I didn't really delve into where exactly).

I made a patch and it fixes this, the build continues, and the executable seems fine (everything works).

I created a PR with this, not sure if you're interested in adding this but it would make it work on musl (it only changes the name of the var).

22h49 commented 5 months ago

As a sidenote this was already noticed in hyprland, and will be included in the next release (https://github.com/hyprwm/Hyprland/pull/4321).

For now this patch should suffice.

Makrennel commented 5 months ago

As a sidenote this was already noticed in hyprland, and will be included in the next release

Hyprland has just been updated to 0.35.0, so I guess #26 is no longer needed?

22h49 commented 5 months ago

Yes now redundant, closing