rvaiya / warpd

A modal keyboard-driven virtual pointer
MIT License
2.85k stars 126 forks source link

Wayland only does not build #201

Closed yellowhat closed 1 year ago

yellowhat commented 1 year ago

Hi, I am trying to build warpd on a wayland only system:

$ git clone https://github.com/rvaiya/warpd
$ cd warpd
$ make PLATFORM=wayland
cc -c src/platform/linux/X/X.c -o src/platform/linux/X/X.o -g -Wall -Wextra -pedantic -Wno-deprecated-declarations -Wno-unused-parameter -std=c99 -DVERSION='"v1.3.4 (built from: 567205b)"' -DCOMMIT=\"\" -D_DEFAULT_SOURCE -D_FORTIFY_SOURCE=2   -lwayland-client -lxkbcommon -lcairo -lrt -DWARPD_WAYLAND=1 -I/usr/include/freetype2/ -lXfixes -lXext -lXinerama -lXi -lXtst -lX11 -lXft -DWARPD_X=1
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/stdint.h:9,
                 from src/platform/linux/X/../../../platform.h:10,
                 from src/platform/linux/X/X.h:10,
                 from src/platform/linux/X/X.c:7:
/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
  412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
src/platform/linux/X/X.h:14:10: fatal error: X11/Xft/Xft.h: No such file or directory
   14 | #include <X11/Xft/Xft.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:14: src/platform/linux/X/X.o] Error 1

It used to work, in the past, I am not sure why Xft is a requirement now.

Is this the intended behaviour?

Thanks

rvaiya commented 1 year ago

If you just run make a single binary will now be produced for both X and wayland (recommended unless you really want to avoid X headers). If you want to build exclusively for wayland you can do DISABLE_X=1 make.