MrGlockenspiel / activate-linux

The "Activate Windows" watermark ported to Linux
GNU General Public License v3.0
4.25k stars 91 forks source link

Failed to compile on Debian #127

Closed jaezudev closed 1 year ago

jaezudev commented 2 years ago

I tried compiling from source on Debian 11 (Bullseye). I have all required packages installed, but every time I try to make, it just throws these errors.

rage@kirbybox:~/Documents/og/activate-linux$ make
cc src/activate_linux.c src/color.c src/draw.c src/i18n.c src/wayland.c src/wlr-layer-shell-unstable-v1.c src/x11.c src/xdg_shell.c -o activate-linux -Og -Wall -Wpedantic -Wextra -lX11 -lXfixes -lXinerama -lXrandr -lwayland-client -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lcairo
In file included from src/wayland.c:15:
src/wlr-layer-shell-unstable-v1.h: In function ‘zwlr_layer_shell_v1_get_layer_surface’:
src/wlr-layer-shell-unstable-v1.h:229:7: warning: implicit declaration of function ‘wl_proxy_marshal_flags’; did you mean ‘wl_proxy_marshal_array’? [-Wimplicit-function-declaration]
  229 |  id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_shell_v1,
      |       ^~~~~~~~~~~~~~~~~~~~~~
      |       wl_proxy_marshal_array
src/wlr-layer-shell-unstable-v1.h:229:5: warning: assignment to ‘struct wl_proxy *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  229 |  id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_shell_v1,
      |     ^
src/wlr-layer-shell-unstable-v1.h: In function ‘zwlr_layer_shell_v1_destroy’:
src/wlr-layer-shell-unstable-v1.h:246:103: error: ‘WL_MARSHAL_FLAG_DESTROY’ undeclared (first use in this function)
  246 |     ZWLR_LAYER_SHELL_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1), WL_MARSHAL_FLAG_DESTROY);
      |                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~
src/wlr-layer-shell-unstable-v1.h:246:103: note: each undeclared identifier is reported only once for each function it appears in
src/wlr-layer-shell-unstable-v1.h: In function ‘zwlr_layer_surface_v1_destroy’:
src/wlr-layer-shell-unstable-v1.h:685:107: error: ‘WL_MARSHAL_FLAG_DESTROY’ undeclared (first use in this function)
  685 |     ZWLR_LAYER_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), WL_MARSHAL_FLAG_DESTROY);
      |                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~
src/wayland.c: At top level:
src/wayland.c:249:6: error: ‘const struct wl_output_listener’ has no member named ‘name’
  249 |     .name = output_name,
      |      ^~~~
src/wayland.c:249:13: warning: excess elements in struct initializer
  249 |     .name = output_name,
      |             ^~~~~~~~~~~
src/wayland.c:249:13: note: (near initialization for ‘output_listener’)
src/wayland.c:250:6: error: ‘const struct wl_output_listener’ has no member named ‘description’
  250 |     .description = output_description,
      |      ^~~~~~~~~~~
src/wayland.c:250:20: warning: excess elements in struct initializer
  250 |     .description = output_description,
      |                    ^~~~~~~~~~~~~~~~~~
src/wayland.c:250:20: note: (near initialization for ‘output_listener’)
make: *** [Makefile:29: activate-linux] Error 1
MrGlockenspiel commented 2 years ago

Im on vacation currently and wont be back until around the end of the month so if someone else wants to take a look it’d be appreciated

Nefsen402 commented 2 years ago

These wayland headers are created by wayland scanner version 1.20.0 and needs to include which is provided by the system. Your version of wayland-client is too old to be built with the files generated by the newer wayland-scanner. We need to change the make file to call the system's wayland-scanner to create compatible header files instead of baking in the headers.

Nefsen402 commented 2 years ago

Try and see if #128 will fix the build for you.