buffet / kiwmi

A fully programmable Wayland Compositor
Mozilla Public License 2.0
585 stars 22 forks source link

wlroots compatibility #69

Open stolk opened 1 year ago

stolk commented 1 year ago

I suspect this needs a specific version of wlroots? Because building against latest (v0.17), gives me:

$ meson setup --prefix=/opt/kiwmi build
The Meson build system
Version: 0.63.2
Source dir: /usr/src/kiwmi
Build dir: /usr/src/kiwmi/build
Build type: native build
Project name: kiwmi
Project version: undefined
C compiler for the host machine: cc (gcc 12.2.0 "cc (Ubuntu 12.2.0-3ubuntu1) 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
Program git found: YES (/usr/bin/git)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency lua found: YES 5.4.4
Run-time dependency pixman-1 found: YES 0.42.2
Run-time dependency wayland-client found: YES 1.21.0
Run-time dependency wayland-protocols found: YES 1.31
Run-time dependency wayland-scanner found: YES 1.21.0
Run-time dependency wayland-server found: YES 1.21.0
Run-time dependency wlroots found: YES 0.17.0-dev
Run-time dependency xkbcommon found: YES 1.4.1
Build targets in project: 12

kiwmi undefined

  User defined options
    prefix: /opt/kiwmi

Found ninja-1.11.0 at /usr/bin/ninja
stolk@workpc:/usr/src/kiwmi$ cd build/                                                              
stolk@workpc:/usr/src/kiwmi/build$ meson compile
[12/42] Compiling C object kiwmi/kiwmi.p/desktop_layer_shell.c.o
FAILED: kiwmi/kiwmi.p/desktop_layer_shell.c.o 
cc -Ikiwmi/kiwmi.p -Ikiwmi -I../kiwmi -I../include -Iprotocols -I/usr/include/lua5.4 -I/usr/local/include/pixman-1 -I/usr/local/include -I/usr/local/include/libdrm -I/usr/include/valgrind -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O0 -g -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L '-DKIWMI_VERSION="1781497 (" __DATE__ ", branch '"'"'master'"'"')"' '-DUNUSED(x)=UNUSED_ ## x __attribute__((__unused__))' -MD -MQ kiwmi/kiwmi.p/desktop_layer_shell.c.o -MF kiwmi/kiwmi.p/desktop_layer_shell.c.o.d -o kiwmi/kiwmi.p/desktop_layer_shell.c.o -c ../kiwmi/desktop/layer_shell.c
In file included from ../kiwmi/desktop/layer_shell.c:8:
../include/desktop/layer_shell.h:14:10: fatal error: wlr/types/wlr_surface.h: No such file or directory
   14 | #include <wlr/types/wlr_surface.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
buffet commented 1 year ago

I don't think 0.17 is out yet. I don't know if it'll work fine with 0.16 tbh; 0.15 should be fine.

Please let me know if 0.16 works, or not, I will update it accordingly.

stolk commented 1 year ago

Thank you.

v0.16 does not work, see below.

I will try 0.15 next, the one that comes with Ubuntu-Kinetic.

$ meson setup --prefix=/opt/kiwmi build
The Meson build system
Version: 0.63.2
Source dir: /usr/src/kiwmi
Build dir: /usr/src/kiwmi/build
Build type: native build
Project name: kiwmi
Project version: undefined
C compiler for the host machine: cc (gcc 12.2.0 "cc (Ubuntu 12.2.0-3ubuntu1) 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
Program git found: YES (/usr/bin/git)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency lua found: YES 5.4.4
Run-time dependency pixman-1 found: YES 0.42.2
Run-time dependency wayland-client found: YES 1.21.0
Run-time dependency wayland-protocols found: YES 1.31
Run-time dependency wayland-scanner found: YES 1.21.0
Run-time dependency wayland-server found: YES 1.21.0
Run-time dependency wlroots found: YES 0.16.0
Run-time dependency xkbcommon found: YES 1.4.1
Build targets in project: 12

kiwmi undefined

  User defined options
    prefix: /opt/kiwmi

Found ninja-1.11.0 at /usr/bin/ninja
stolk@workpc:/usr/src/kiwmi$ cd build/                                                              
stolk@workpc:/usr/src/kiwmi/build$ meson compile
[19/42] Compiling C object kiwmi/kiwmi.p/desktop_output.c.o
FAILED: kiwmi/kiwmi.p/desktop_output.c.o 
cc -Ikiwmi/kiwmi.p -Ikiwmi -I../kiwmi -I../include -Iprotocols -I/usr/include/lua5.4 -I/usr/local/include/pixman-1 -I/usr/local/include -I/usr/local/include/libdrm -I/usr/include/valgrind -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O0 -g -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L '-DKIWMI_VERSION="1781497 (" __DATE__ ", branch '"'"'master'"'"')"' '-DUNUSED(x)=UNUSED_ ## x __attribute__((__unused__))' -MD -MQ kiwmi/kiwmi.p/desktop_output.c.o -MF kiwmi/kiwmi.p/desktop_output.c.o.d -o kiwmi/kiwmi.p/desktop_output.c.o -c ../kiwmi/desktop/output.c
In file included from ../kiwmi/desktop/output.c:22:
/usr/local/include/wlr/types/wlr_surface.h:1:2: warning: #warning "wlr/types/wlr_surface.h has been deprecated and will be removed in the future. Use wlr/types/wlr_compositor.h and wlr/types/wlr_subcompositor.h." [-Wcpp]
    1 | #warning "wlr/types/wlr_surface.h has been deprecated and will be removed in the future. Use wlr/types/wlr_compositor.h and wlr/types/wlr_subcompositor.h."
      |  ^~~~~~~
In file included from ../include/desktop/layer_shell.h:14,
                 from ../kiwmi/desktop/output.c:27:
/usr/local/include/wlr/types/wlr_surface.h:1:2: warning: #warning "wlr/types/wlr_surface.h has been deprecated and will be removed in the future. Use wlr/types/wlr_compositor.h and wlr/types/wlr_subcompositor.h." [-Wcpp]
    1 | #warning "wlr/types/wlr_surface.h has been deprecated and will be removed in the future. Use wlr/types/wlr_compositor.h and wlr/types/wlr_subcompositor.h."
      |  ^~~~~~~
../kiwmi/desktop/output.c: In function ‘new_output_notify’:
../kiwmi/desktop/output.c:183:28: error: ‘struct wlr_input_device’ has no member named ‘output_name’
  183 |         if (pointer->device->output_name
      |        
stolk commented 1 year ago

NOTE: In the mean time, it probably makes sense to test the wlroots version, and bail if it is too new.

stolk commented 1 year ago

version 0.15.1 of wlroots works for building kivmi.

It fails to launch, though. Will make a new issue for that.

kuruczgy commented 1 year ago

Relevant: https://github.com/buffet/kiwmi/pull/71

As the description of that PR also suggests, we should pin the version of wlroots, like sway does: https://github.com/swaywm/sway/blob/dee032d0a0ecd958c902b88302dc59703d703c7f/meson.build#L38-L45