~sircmpwn/wio#23: 
Broken build: field 'keyboard_interactive' has incomplete type.

It appears that perhaps the latest changes in wlroots git are breaking wio. I'm building this on Void Linux using the xbps build system, you may notice in the log that I'm not pulling the submodule for git. That's because I have my wlroots package pulling from git master, so it's fine for wio to link against the devel package. I can confirm that the same error happens when pulling wlroots as a git submodule. Build log attached.

Version: 0.55.3
Source dir: /builddir/wio-31b742e473b15a2087be740d1de28bc2afd47a4d
Build dir: /builddir/wio-31b742e473b15a2087be740d1de28bc2afd47a4d/build
Build type: native build
Project name: wio
Project version: undefined
Using 'CC' from environment with value: 'cc'
Using 'CFLAGS' from environment with value: '-fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -march=native -mtune=native -O2 -pipe   '
Using 'LDFLAGS' from environment with value: '-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    '
Using 'CPPFLAGS' from environment with value: '   '
Using 'AR' from environment with value: 'ar'
Using 'CC' from environment with value: 'cc'
Using 'CFLAGS' from environment with value: '-fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -march=native -mtune=native -O2 -pipe   '
Using 'LDFLAGS' from environment with value: '-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    '
Using 'CPPFLAGS' from environment with value: '   '
C compiler for the host machine: cc (gcc 10.2.1 "cc (GCC) 10.2.1 20201203")
C linker for the host machine: cc ld.bfd 2.35.1
Using 'AR' from environment with value: 'ar'
Host machine cpu family: x86_64
Host machine cpu: x86_64
Subproject directory not found and wlroots.wrap file not found
Subproject  subprojects/wlroots is buildable: NO (disabling)
Using 'PKG_CONFIG' from environment with value: 'pkg-config'
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency wlroots found: YES 0.12.0
Run-time dependency cairo found: YES 1.16.0
Library m found: YES
Run-time dependency wayland-server found: YES 1.18.0
Run-time dependency wayland-protocols found: YES 1.20
Run-time dependency xkbcommon found: YES 1.0.3
Program wayland-scanner found: YES
Build targets in project: 2

wio undefined

  Subprojects
    wlroots: NO Subproject directory not found and wlroots.wrap file not found

Found ninja-1.10.2 at /usr/bin/ninja
Using 'STRIP' from environment with value: 'strip'
Using 'STRIP' from environment with value: 'strip'
=> wio-20201101_1: running pre-build hook: 02-script-wrapper ...
=> wio-20201101_1: running do_build ...
ninja: Entering directory `build'
[1/15] Generating 'protocols/libserver_protos.a.p/wlr-layer-shell-unstable-v1-protocol.h'.
[2/15] Generating 'protocols/libserver_protos.a.p/wlr-layer-shell-unstable-v1-protocol.c'.
[3/15] Generating 'protocols/libserver_protos.a.p/xdg-shell-protocol.h'.
[4/15] Generating 'protocols/libserver_protos.a.p/xdg-shell-protocol.c'.
[5/15] Generating 'wio.p/wlr-layer-shell-unstable-v1-protocol.h'.
[6/15] Generating 'wio.p/xdg-shell-protocol.h'.
[7/15] Compiling C object protocols/libserver_protos.a.p/meson-generated_xdg-shell-protocol.c.o
[8/15] Compiling C object protocols/libserver_protos.a.p/meson-generated_wlr-layer-shell-unstable-v1-protocol.c.o
[9/15] Linking static target protocols/libserver_protos.a
[10/15] Compiling C object wio.p/output.c.o
FAILED: wio.p/output.c.o
cc -Iwio.p -I. -I.. -I../include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c11 -DWL_HIDE_DEPRECATED -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wundef -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -march=native -mtune=native -O2 -MD -MQ wio.p/output.c.o -MF wio.p/output.c.o.d -o wio.p/output.c.o -c ../output.c
In file included from ../include/layers.h:3,
                 from ../output.c:11:
/usr/include/wlr/types/wlr_layer_shell_v1.h:52:52: error: field 'keyboard_interactive' has incomplete type
   52 |  enum zwlr_layer_surface_v1_keyboard_interactivity keyboard_interactive;
      |                                                    ^~~~~~~~~~~~~~~~~~~~
[11/15] Compiling C object wio.p/view.c.o
[12/15] Compiling C object wio.p/main.c.o
FAILED: wio.p/main.c.o
cc -Iwio.p -I. -I.. -I../include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c11 -DWL_HIDE_DEPRECATED -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wundef -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -march=native -mtune=native -O2 -MD -MQ wio.p/main.c.o -MF wio.p/main.c.o.d -o wio.p/main.c.o -c ../main.c
In file included from ../main.c:18:
/usr/include/wlr/types/wlr_layer_shell_v1.h:52:52: error: field 'keyboard_interactive' has incomplete type
   52 |  enum zwlr_layer_surface_v1_keyboard_interactivity keyboard_interactive;
      |                                                    ^~~~~~~~~~~~~~~~~~~~
../main.c: In function 'main':
../main.c:155:19: error: too many arguments to function 'wlr_backend_autocreate'
  155 |  server.backend = wlr_backend_autocreate(server.wl_display, NULL);
      |                   ^~~~~~~~~~~~~~~~~~~~~~
In file included from ../main.c:9:
/usr/include/wlr/backend.h:35:21: note: declared here
   35 | struct wlr_backend *wlr_backend_autocreate(struct wl_display *display);
      |                     ^~~~~~~~~~~~~~~~~~~~~~
[13/15] Compiling C object wio.p/layers.c.o
FAILED: wio.p/layers.c.o
cc -Iwio.p -I. -I.. -I../include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c11 -DWL_HIDE_DEPRECATED -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wundef -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -march=native -mtune=native -O2 -MD -MQ wio.p/layers.c.o -MF wio.p/layers.c.o.d -o wio.p/layers.c.o -c ../layers.c
In file included from ../layers.c:4:
/usr/include/wlr/types/wlr_layer_shell_v1.h:52:52: error: field 'keyboard_interactive' has incomplete type
   52 |  enum zwlr_layer_surface_v1_keyboard_interactivity keyboard_interactive;
      |                                                    ^~~~~~~~~~~~~~~~~~~~
[14/15] Compiling C object wio.p/input.c.o
ninja: build stopped: subcommand failed.```
Status
REPORTED
Submitter
~lane
Assigned to
No-one
Submitted
8 months ago
Updated
3 months ago
Labels
No labels applied.

~z3bra 3 months ago

Issue comes from commit b7dc4f2 in wlroots. keyboard_interactive was changed from boolean to enum, however no values are defined for that enum. To fix it, you should replace the file protocols/wlr-layer-shell-unstable-v1.xml with its updated version from wlroots tree: wlr-layer-shell-unstable-v1.xml. Doing that fixed this issue for me.

There is however a new issue that came later, as they removed the enum wlr_key_state from the code, which should then be replaced with wl_keyboard_key_state directly.

I don't think that Drew Devault is maintaining this project anymore, so you can checkout my fork at ~z3bra/wio, which I just updated to match the latest wlroots release (0.13.0). I'll submit a patch here as well, to try to keep it up to date.

Register here or Log in to comment, or comment via email.