labwc / labwc

A Wayland window-stacking compositor
https://labwc.github.io
GNU General Public License v2.0
1.73k stars 158 forks source link

Error build from master or release in voidlinux #1113

Closed moilong closed 1 year ago

moilong commented 1 year ago

Installed version 0.6.4 through xbps and is running excellent. When I try to build from master or releases 0.6.5 and 0.6.4 I got error. Attaching error messages from terminal.

build log ``` void@mnbvcxz ~/labwc (master)> meson setup build The Meson build system Version: 1.2.0 Source dir: /home/void/labwc Build dir: /home/void/labwc/build Build type: native build Project name: labwc Project version: 0.6.5 C compiler for the host machine: cc (gcc 12.2.0 "cc (GCC) 12.2.0") C linker for the host machine: cc ld.bfd 2.39 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C supports arguments -Wundef: YES Compiler for C supports arguments -Wlogical-op: YES Compiler for C supports arguments -Wmissing-include-dirs: YES Compiler for C supports arguments -Wold-style-definition: YES Compiler for C supports arguments -Wpointer-arith: YES Compiler for C supports arguments -Winit-self: YES Compiler for C supports arguments -Wstrict-prototypes: YES Compiler for C supports arguments -Wimplicit-fallthrough=2: YES Compiler for C supports arguments -Wendif-labels: YES Compiler for C supports arguments -Wstrict-aliasing=2: YES Compiler for C supports arguments -Woverflow: YES Compiler for C supports arguments -Wmissing-prototypes: YES Compiler for C supports arguments -Walloca: YES Compiler for C supports arguments -Wunused-macros: YES Compiler for C supports arguments -Wno-unused-parameter: YES Program git found: YES (/usr/bin/git) Found pkg-config: /usr/bin/pkg-config (0.29.2) Run-time dependency wlroots found: YES 0.16.2 Run-time dependency wayland-server found: YES 1.22.0 Run-time dependency wayland-protocols found: YES 1.32 Run-time dependency xkbcommon found: YES 1.5.0 Run-time dependency xcb found: YES 1.16 Run-time dependency xcb-icccm found: YES 0.4.2 Run-time dependency libdrm found: YES 2.4.115 Run-time dependency libxml-2.0 found: YES 2.11.4 Run-time dependency glib-2.0 found: YES 2.78.0 Run-time dependency cairo found: YES 1.16.0 Run-time dependency pangocairo found: YES 1.50.14 Run-time dependency libinput found: YES 1.23.0 Library m found: YES Run-time dependency libpng found: YES 1.6.40 Run-time dependency librsvg-2.0 found: YES 2.56.3 Program msgfmt found: YES (/usr/bin/msgfmt) Program msgfmt found: YES (/usr/bin/msgfmt) Program msginit found: YES (/usr/bin/msginit) Program msgmerge found: YES (/usr/bin/msgmerge) Program xgettext found: YES (/usr/bin/xgettext) Program wayland-scanner found: YES (/usr/local/bin/wayland-scanner) Configuring config.h using configuration Program scdoc found: YES (/usr/bin/scdoc) Build targets in project: 19 Found ninja-1.11.1 at /usr/bin/ninja void@mnbvcxz ~/labwc (master)> ninja -C build ninja: Entering directory `build' [43/105] Compiling C object labwc.p/src_dnd.c.o FAILED: labwc.p/src_dnd.c.o cc -Ilabwc.p -I. -I.. -Iinclude -I../include -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wunused-macros -Wno-unused-parameter '-DLABWC_VERSION="0.6.5-7-ge5aef03"' '-DGETTEXT_PACKAGE="labwc"' '-DLOCALEDIR="/usr/local/share/locale"' -pthread -MD -MQ labwc.p/src_dnd.c.o -MF labwc.p/src_dnd.c.o.d -o labwc.p/src_dnd.c.o -c ../src/dnd.c ../src/dnd.c: In function 'handle_surface_commit': ../src/dnd.c:35:32: error: 'struct wlr_surface' has no member named 'sx' 35 | surface->sx, surface->sy); | ^~ ../src/dnd.c:35:45: error: 'struct wlr_surface' has no member named 'sy' 35 | surface->sx, surface->sy); | ^~ ../src/dnd.c: In function 'drag_icon_create': ../src/dnd.c:91:40: error: 'struct ' has no member named 'map' 91 | wl_signal_add(&wlr_icon->events.map, &self->events.map); | ^ ../src/dnd.c:93:40: error: 'struct ' has no member named 'unmap' 93 | wl_signal_add(&wlr_icon->events.unmap, &self->events.unmap); | ^ [44/105] Compiling C object labwc.p/src_desktop.c.o ../src/desktop.c: In function 'get_cursor_context': ../src/desktop.c:411:37: warning: implicit declaration of function 'wlr_surface_is_layer_surface'; did you mean 'wlr_surface_for_each_surface'? [-Wimplicit-function-declaration] 411 | if (wlr_surface_is_layer_surface(surface)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_surface_for_each_surface [45/105] Compiling C object labwc.p/src_cursor.c.o ../src/cursor.c: In function 'get_toplevel': ../src/cursor.c:101:27: warning: implicit declaration of function 'wlr_surface_is_xdg_surface'; did you mean 'wlr_surface_for_each_surface'? [-Wimplicit-function-declaration] 101 | while (surface && wlr_surface_is_xdg_surface(surface)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_surface_for_each_surface ../src/cursor.c:103:25: warning: implicit declaration of function 'wlr_xdg_surface_from_wlr_surface'; did you mean 'wlr_xdg_surface_try_from_wlr_surface'? [-Wimplicit-function-declaration] 103 | wlr_xdg_surface_from_wlr_surface(surface); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_xdg_surface_try_from_wlr_surface ../src/cursor.c:103:25: warning: initialization of 'struct wlr_xdg_surface *' from 'int' makes pointer from integer without a cast [-Wint-conversion] ../src/cursor.c:118:24: warning: implicit declaration of function 'wlr_surface_is_layer_surface'; did you mean 'wlr_surface_for_each_surface'? [-Wimplicit-function-declaration] 118 | if (surface && wlr_surface_is_layer_surface(surface)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_surface_for_each_surface ../src/cursor.c: In function 'cursor_set': ../src/cursor.c:253:9: warning: implicit declaration of function 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? [-Wimplicit-function-declaration] 253 | wlr_xcursor_manager_set_cursor_image( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_xcursor_manager_get_xcursor ../src/cursor.c: In function 'cursor_button_press': ../src/cursor.c:912:25: warning: implicit declaration of function 'wlr_layer_surface_v1_from_wlr_surface'; did you mean 'wlr_layer_surface_v1_try_from_wlr_surface'? [-Wimplicit-function-declaration] 912 | wlr_layer_surface_v1_from_wlr_surface(ctx.surface); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wlr_layer_surface_v1_try_from_wlr_surface ../src/cursor.c:912:25: warning: initialization of 'struct wlr_layer_surface_v1 *' from 'int' makes pointer from integer without a cast [-Wint-conversion] ninja: build stopped: subcommand failed. void@mnbvcxz ~/labwc (master) [1]> ```
Consolatis commented 1 year ago

This looks like it tries to build using wlroots master rather than wlroots 0.16.x for some reason. The setup correctly identified wlroots 0.16.2 though so not sure what is going on here.

To just get labwc to build you can try something like this:

# delete old build dir
rm -rf build
# create new one and use the supplied wlroots.wrap file
meson setup build --force-fallback-for=wlroots
# and build
meson compile -C build

But the proper solution would be to figure out why the wlroots master headers are used during build rather than the wlroots 0.16.2 ones.

moilong commented 1 year ago

Oh! Im also using hyprland on this labtop which needs a tagged wlroots version. That should be the problem. Built successfully as you suggested. Thankyou so much.