Bug 261654 - x11/libinput: Fails to build with DEBUG_GUI=ON: libinput-debug-gui.c:53:11: fatal error: 'pointer-constraints-unstable-v1-client-protocol.h' file not found
Summary: x11/libinput: Fails to build with DEBUG_GUI=ON: libinput-debug-gui.c:53:11: f...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-02-01 14:56 UTC by Hiroo Ono
Modified: 2023-01-09 10:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)
koobs: merge-quarterly?


Attachments
pull wayland in. (488 bytes, patch)
2022-02-01 14:56 UTC, Hiroo Ono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroo Ono 2022-02-01 14:56:59 UTC
Created attachment 231495 [details]
pull wayland in.

Enabling DEBUG_GUI option in x11/libinput fails to build.
Requiring wayland and wayland-protocols as the attached patch makes it build, but I am not sure if it is the right solution.

1) libinput-debug-gui.c
  https://gitlab.freedesktop.org/libinput/libinput/-/blob/e9ccd4f402a8b56590acc83009f4045b145587bf/tools/libinput-debug-gui.c
  includes "pointer-constraints-unstable-v1-client-protocol.h" when GDK_WINDOWING_WAYLAND is defined.
2) GDK_WINDOWING_WAYLAND is defined in /usr/local/include/gtk-3.0/gdk/gdkconfig.h without any condition.
  I did not verify but is it because I enabled WAYLAND in x11-toolkits/gtk30?
3) libinput's meson.build
  https://gitlab.freedesktop.org/libinput/libinput/-/blob/e9ccd4f402a8b56590acc83009f4045b145587bf/meson.build
  only provides "pointer-constraints-unstable-v1-client-protocol.h" when wayland-client and wayland-protocols are found.

What I am not sure is: is GDK_WINDOWING_WAYLAND in gdkconfig.h is always defined? Isn't it defined only when option WAYLAND is enabled in x11-toolkits/gtk30? Then how do I detect it in x11/libinput's port Makefile?

The log is as follows:

cc -Ilibinput-debug-gui.p -I. -I.. -I../src -I../include -I/usr/local/include/libepoll-shim -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/at-spi-2.0 -I/usr/local/include/libevdev-1.0 -I/usr/local/include/libwacom-1.0 -I/usr/local/include/gudev-1.0 -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -O3 -Wno-unused-parameter -Wmissing-prototypes -Wstrict-prototypes -Wundef -Wpointer-arith -Wuninitialized -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough -Wredundant-decls -Wincompatible-pointer-types -Wformat=2 -Wno-missing-field-initializers -Wmissing-declarations -fvisibility=hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -pthread -D_THREAD_SAFE -MD -MQ libinput-debug-gui.p/tools_libinput-debug-gui.c.o -MF libinput-debug-gui.p/tools_libinput-debug-gui.c.o.d -o libinput-debug-gui.p/tools_libinput-debug-gui.c.o -c ../tools/libinput-debug-gui.c
../tools/libinput-debug-gui.c:53:11: fatal error: 'pointer-constraints-unstable-v1-client-protocol.h' file not found
        #include "pointer-constraints-unstable-v1-client-protocol.h"
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2023-01-09 10:04:50 UTC
Fixed a while ago in https://cgit.freebsd.org/ports/commit/?id=fd13b77ddb52bee004f3848fcca4dab687c96e3d (Missed this PR, sorry).