lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
963 stars 39 forks source link

[BUG] Install rofi with wayland support without xcb - meson #89

Closed tom-i closed 1 year ago

tom-i commented 1 year ago

Rofi version (rofi -v)

GIT

Configuration

no

Theme

no

Timing report

no

Launch command

no

Step to reproduce

Expected behavior

Run meson setup without xcb.

Actual behavior

┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/0)─┐
└─(18:20:57 on next)──> meson setup -Dxcb=disabled --reconfigure build                                                                                                                                                 1 ↵ ──(Čt,zář21)─┘
The Meson build system
Version: 1.0.1
Source dir: /home/tomasi/programs/rofi
Build dir: /home/tomasi/programs/rofi/build
Build type: native build

meson.build:1:0: ERROR: Unknown options: "xcb"

A full log can be found at /home/tomasi/programs/rofi/build/meson-logs/meson-log.txt

Additional information

I;m using WAYLAND and Sway WM, but I have to check that checkbox about not using wayland in bug report.

Using wayland display server protocol

I've checked if the issue exists in the latest stable release

lbonn commented 1 year ago

Ah sorry about the issue template, I'll fix it.

Are you sure you checked out the current version? You left out the version in the issue but here it would be useful to see the current commit (output of git show)

tom-i commented 1 year ago

@lbonn Hi, I've tried to git pull = already up-to-date Also tried git show and last commit:

commit a53daa68c4298fc64b17ea613705081c42c140c5 (HEAD -> next, origin/next, origin/HEAD)
Author: Nikita Zlobin <cook60020tmp@mail.ru>
Date:   Mon Aug 28 23:35:03 2023 +0500

    [View|Textbox] cleanups to drawing code

diff --git a/source/view.c b/source/view.c
index ecf095c6..f5102a75 100644
--- a/source/view.c
+++ b/source/view.c
@@ -1344,20 +1344,18 @@ void rofi_view_update(RofiViewState *state, gboolean qr) {
       cairo_set_source_surface(d, CacheState.fake_bg, 0.0, 0.0);
     } else {
       cairo_set_source_surface(d, CacheState.fake_bg,
-                               -(double)(state->x - CacheState.mon.x),
-                               -(double)(state->y - CacheState.mon.y));
+                               (double)(CacheState.mon.x - state->x),
+                               (double)(CacheState.mon.y - state->y));
     }
-    cairo_paint(d);
-    cairo_set_operator(d, CAIRO_OPERATOR_OVER);
   } else {
     // Paint the background transparent.
     cairo_set_source_rgba(d, 0, 0, 0, 0.0);
-    cairo_paint(d);
   }
-  TICK_N("Background");
...
lbonn commented 1 year ago

@tom-i This is a commit from upstream rofi at https://github.com/davatorium/rofi, it does not contain any wayland code.

Clone this repo from scratch (git clone https://github.com/lbonn/rofi) or use a separate remote for your repository:

git remote add lbonn https://github.com/lbonn/rofi
git fetch lbonn
git checkout --track lbonn/wayland
tom-i commented 1 year ago

@lbonn cool.. it works.. my output from new meson --reconfigure:

┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/0)─┐
└─(09:53:19 on wayland)──> meson setup -Dxcb=disabled --reconfigure build                                                                                                                                              1 ↵ ──(Pá,zář22)─┘
The Meson build system
Version: 1.0.1
Source dir: /home/tomasi/programs/rofi
Build dir: /home/tomasi/programs/rofi/build
Build type: native build
Project name: rofi
Project version: 1.7.5+wayland2-dev
C compiler for the host machine: cc (gcc 12.3.0 "cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wparentheses: YES (cached)
Compiler for C supports arguments -Winline: YES (cached)
Compiler for C supports arguments -Wunreachable-code: YES (cached)
Compiler for C supports arguments -Werror=missing-prototypes: YES (cached)
Compiler for C supports arguments -Wno-inline: YES (cached)
Dependency glib-2.0 found: YES 2.76.1 (cached)
Dependency gmodule-2.0 found: YES 2.76.1 (cached)
Dependency cairo found: YES 1.16.0 (cached)
Library m found: YES
Dependency gio-unix-2.0 found: YES 2.76.1 (cached)
Dependency pango found: YES 1.50.12 (cached)
Dependency pangocairo found: YES 1.50.12 (cached)
Dependency xkbcommon found: YES 1.5.0 (cached)
Dependency gdk-pixbuf-2.0 found: YES 2.42.10 (cached)

Executing subproject libgwater

libgwater| Project name: libgwater
libgwater| Project version: undefined
libgwater| C compiler for the host machine: cc (gcc 12.3.0 "cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0")
libgwater| C linker for the host machine: cc ld.bfd 2.40
libgwater| Dependency glib-2.0 found: YES 2.76.1 (cached)
libgwater| Dependency gobject-2.0 found: YES 2.76.1 (cached)
libgwater| Dependency gio-2.0 found: YES 2.76.1 (cached)
libgwater| Dependency gio-unix-2.0 found: YES 2.76.1 (cached)
libgwater| Has header "errno.h" : YES (cached)
libgwater| Has header "sys/types.h" : YES (cached)
libgwater| Has header "sys/socket.h" : YES (cached)
libgwater| Dependency wayland-client found: YES 1.21.0 (cached)
libgwater| Dependency wayland-server found: YES 1.21.0 (cached)
libgwater| Dependency xcb found: YES 1.15 (cached)
libgwater| Found pkg-config: /usr/bin/pkg-config (1.8.1)
libgwater| Found CMake: /usr/bin/cmake (3.25.1)
libgwater| Run-time dependency libmpdclient found: NO (tried pkgconfig and cmake)
libgwater| Dependency glib-2.0 found: YES 2.76.1 (cached)
libgwater| Run-time dependency libnl-3.0 found: NO (tried pkgconfig and cmake)
libgwater| Has header "sys/poll.h" : YES (cached)
libgwater| Run-time dependency alsa found: NO (tried pkgconfig and cmake)
libgwater| Build targets in project: 3
libgwater| Subproject libgwater finished.

Dependency wayland-protocols found: YES 1.31 (cached)
Dependency wayland-client found: YES 1.21.0 (cached)
Dependency wayland-cursor found: YES 1.21.0 (cached)
Run-time dependency check found: NO (tried pkgconfig and cmake)
Configuring config.h using configuration

Executing subproject libnkutils

libnkutils| Project name: libnkutils
libnkutils| Project version: undefined
libnkutils| C compiler for the host machine: cc (gcc 12.3.0 "cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0")
libnkutils| C linker for the host machine: cc ld.bfd 2.40
libnkutils| Dependency glib-2.0 found: YES 2.76.1 (cached)
libnkutils| Dependency glib-2.0 found: YES 2.76.1 (cached)
libnkutils| Dependency gio-2.0 found: YES 2.76.1 (cached)
libnkutils| Dependency gobject-2.0 found: YES 2.76.1 (cached)
libnkutils| Dependency gio-2.0 found: YES 2.76.1 (cached)
libnkutils| Dependency gobject-2.0 found: YES 2.76.1 (cached)
libnkutils| Program git found: YES (/usr/bin/git)
libnkutils| Dependency xkbcommon found: YES 1.5.0 (cached)
libnkutils| Dependency xkeyboard-config found: YES 2.38 (cached)
libnkutils| Build targets in project: 17
libnkutils| Subproject libnkutils finished.

Program flex found: YES (/usr/bin/flex)
Program bison found: YES (/usr/bin/bison)
Program wayland-scanner found: YES (/usr/bin/wayland-scanner)
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Program go-md2man found: YES (/usr/bin/go-md2man)
Configuring rofi.doxy using configuration
Program doxygen found: YES (/usr/bin/doxygen)
Program cppcheck found: YES (/usr/bin/cppcheck)
Program ohcount found: YES (/usr/bin/ohcount)
Build targets in project: 49
NOTICE: Future-deprecated features used:
 * 0.56.0: {'meson.build_root', 'meson.source_root', 'dependency.get_pkgconfig_variable'}

rofi 1.7.5+wayland2-dev

  Subprojects
    libgwater : YES
    libnkutils: YES

  User defined options
    xcb       : disabled

Found ninja-1.11.1 at /usr/bin/ninja

unfortunately ninja wants xcb :-(

┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/0)─┐
└─(09:53:18 on wayland)──> sudo ninja -C build install                                                                                                                                                                 1 ↵ ──(Pá,zář22)─┘
ninja: Entering directory `build'
[4/29] Compiling C object rofi.p/source_wayland_display.c.o
FAILED: rofi.p/source_wayland_display.c.o
cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_wayland_display.c.o -MF rofi.p/source_wayland_display.c.o.d -o rofi.p/source_wayland_display.c.o -c ../source/wayland/display.c
../source/wayland/display.c:43:10: fatal error: xcb/xkb.h: No such file or directory
   43 | #include <xcb/xkb.h>
      |          ^~~~~~~~~~~
compilation terminated.
[5/29] Compiling C object scrollbar.test.p/meson-generated_.._resources.c.o
resources.c:356:3: warning: string length ‘5544’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Woverlength-strings]
  356 |   "\004\000\000\000\000\000\000\000" };
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[7/29] Compiling C object box.test.p/meson-generated_.._resources.c.o
resources.c:356:3: warning: string length ‘5544’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Woverlength-strings]
  356 |   "\004\000\000\000\000\000\000\000" };
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[8/29] Compiling C object rofi.p/source_modes_wayland-window.c.o
FAILED: rofi.p/source_modes_wayland-window.c.o
cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_modes_wayland-window.c.o -MF rofi.p/source_modes_wayland-window.c.o.d -o rofi.p/source_modes_wayland-window.c.o -c ../source/modes/wayland-window.c
In file included from ../source/modes/wayland-window.c:44:
/home/tomasi/programs/rofi/include/wayland-internal.h:9:10: fatal error: xcb/xkb.h: No such file or directory
    9 | #include <xcb/xkb.h>
      |          ^~~~~~~~~~~
compilation terminated.
[12/29] Compiling C object textbox.test.p/meson-generated_.._resources.c.o
resources.c:356:3: warning: string length ‘5544’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Woverlength-strings]
  356 |   "\004\000\000\000\000\000\000\000" };
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[17/29] Compiling C object textbox.test.p/meson-generated_theme-lexer.c.o
ninja: build stopped: subcommand failed.
tom-i commented 1 year ago

Verbose mode here:

┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/0)─┐
└─(09:53:33 on wayland)──> sudo ninja -C build install -v                                                                                                                                                                  ──(Pá,zář22)─┘
ninja: Entering directory `build'
[1/16] /home/tomasi/programs/rofi/build/subprojects/libnkutils/nk-git-version header subprojects/libnkutils/nkutils-git-version.h /home/tomasi/programs/rofi /usr/bin/git
[2/15] cc  -o box.test box.test.p/meson-generated_theme-parser.c.o box.test.p/meson-generated_theme-lexer.c.o box.test.p/meson-generated_.._resources.c.o rofi.p/source_widgets_widget.c.o rofi.p/source_widgets_box.c.o rofi.p/source_theme.c.o rofi.p/source_css-colors.c.o rofi.p/source_rofi-types.c.o rofi.p/config_config.c.o box.test.p/test_box-test.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group subprojects/libgwater/wayland/liblibgwater-wayland.a subprojects/libnkutils/libnkutils.a subprojects/libnkutils/libnkutils-bindings.a /usr/lib/x86_64-linux-gnu/libglib-2.0.so -Wl,--export-dynamic /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so -pthread /usr/lib/x86_64-linux-gnu/libcairo.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libpango-1.0.so /usr/lib/x86_64-linux-gnu/libharfbuzz.so /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so /usr/lib/x86_64-linux-gnu/libxkbcommon.so /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so -lm /usr/lib/x86_64-linux-gnu/libwayland-client.so /usr/lib/x86_64-linux-gnu/libwayland-cursor.so -Wl,--end-group
[3/15] cc  -o scrollbar.test scrollbar.test.p/meson-generated_theme-parser.c.o scrollbar.test.p/meson-generated_theme-lexer.c.o scrollbar.test.p/meson-generated_.._resources.c.o rofi.p/source_widgets_widget.c.o rofi.p/source_widgets_scrollbar.c.o rofi.p/source_theme.c.o rofi.p/source_css-colors.c.o rofi.p/source_rofi-types.c.o rofi.p/config_config.c.o scrollbar.test.p/test_scrollbar-test.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group subprojects/libgwater/wayland/liblibgwater-wayland.a subprojects/libnkutils/libnkutils.a subprojects/libnkutils/libnkutils-bindings.a /usr/lib/x86_64-linux-gnu/libglib-2.0.so -Wl,--export-dynamic /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so -pthread /usr/lib/x86_64-linux-gnu/libcairo.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libpango-1.0.so /usr/lib/x86_64-linux-gnu/libharfbuzz.so /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so /usr/lib/x86_64-linux-gnu/libxkbcommon.so /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so -lm /usr/lib/x86_64-linux-gnu/libwayland-client.so /usr/lib/x86_64-linux-gnu/libwayland-cursor.so -Wl,--end-group
[4/15] cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_wayland_display.c.o -MF rofi.p/source_wayland_display.c.o.d -o rofi.p/source_wayland_display.c.o -c ../source/wayland/display.c
FAILED: rofi.p/source_wayland_display.c.o
cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_wayland_display.c.o -MF rofi.p/source_wayland_display.c.o.d -o rofi.p/source_wayland_display.c.o -c ../source/wayland/display.c
../source/wayland/display.c:43:10: fatal error: xcb/xkb.h: No such file or directory
   43 | #include <xcb/xkb.h>
      |          ^~~~~~~~~~~
compilation terminated.
[5/15] cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_modes_wayland-window.c.o -MF rofi.p/source_modes_wayland-window.c.o.d -o rofi.p/source_modes_wayland-window.c.o -c ../source/modes/wayland-window.c
FAILED: rofi.p/source_modes_wayland-window.c.o
cc -Irofi.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ rofi.p/source_modes_wayland-window.c.o -MF rofi.p/source_modes_wayland-window.c.o.d -o rofi.p/source_modes_wayland-window.c.o -c ../source/modes/wayland-window.c
In file included from ../source/modes/wayland-window.c:44:
/home/tomasi/programs/rofi/include/wayland-internal.h:9:10: fatal error: xcb/xkb.h: No such file or directory
    9 | #include <xcb/xkb.h>
      |          ^~~~~~~~~~~
compilation terminated.
[6/15] cc -Ihelper_expand.test.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ helper_expand.test.p/test_helper-expand.c.o -MF helper_expand.test.p/test_helper-expand.c.o.d -o helper_expand.test.p/test_helper-expand.c.o -c ../test/helper-expand.c
[7/15] cc -Ihelper_config_cmdline_parser.test.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ helper_config_cmdline_parser.test.p/test_helper-config-cmdline-parser.c.o -MF helper_config_cmdline_parser.test.p/test_helper-config-cmdline-parser.c.o.d -o helper_config_cmdline_parser.test.p/test_helper-config-cmdline-parser.c.o -c ../test/helper-config-cmdline-parser.c
[8/15] cc -Itextbox.test.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ textbox.test.p/test_textbox-test.c.o -MF textbox.test.p/test_textbox-test.c.o.d -o textbox.test.p/test_textbox-test.c.o -c ../test/textbox-test.c
[9/15] cc -Ihelper.test.p -I. -I.. -Isubprojects/libgwater/wayland -I../subprojects/libgwater/wayland -Isubprojects/libnkutils -I../subprojects/libnkutils -I../subprojects/libnkutils/src -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/home/tomasi/programs/rofi/build -I/home/tomasi/programs/rofi/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -O0 -g -D_DEFAULT_SOURCE=1 -Wparentheses -Winline -Wunreachable-code -Werror=missing-prototypes -Wno-inline -pthread -MD -MQ helper.test.p/test_helper-test.c.o -MF helper.test.p/test_helper-test.c.o.d -o helper.test.p/test_helper-test.c.o -c ../test/helper-test.c
ninja: build stopped: subcommand failed.
lbonn commented 1 year ago

So ok, maybe the no-xcb build does not entirely work right now. It does not need to link against xcb but needs headers for some dead code (in wayland mode at least).

I guess you will need to xcb headers anyway for now or try to fix it yourself.

Otherwise, I'll have a look at some point, but you may have to wait.

tom-i commented 1 year ago

@lbonn I'll try to solve it, but on the other hand, I don't want to install bullshit dev libs on my laptop, so if you make some "repair" it would be very welcome ;) <3

lbonn commented 1 year ago

I agree in principle, about dependency bloat. But on the other hand libxcb is fairly basic and practical wayland systems often end up depending on it.

Even without xwayland, I see it pulled by sway on a recent archlinux system: https://archlinux.org/packages/extra/x86_64/sway/ It not on sway's official dependencies but it's pulled in by cairo at least on debian/ubuntu and archlinux. Maybe you can pull it off on Gentoo or NixOS?

Quickest way would be to install the dev lib and remove it after compilation :)

tom-i commented 1 year ago

Looks that some of these 2 helped :-D

libxcb-util-dev
libxcb-xkb-dev

so.. :-)

┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/1)─┐
└─(12:50:41 on wayland)──> sudo ninja -C build install                                                                                                                                                                     ──(Pá,zář22)─┘
ninja: Entering directory `build'
[4/5] Installing files.
Installing rofi to /usr/local/bin
Installing /home/tomasi/programs/rofi/include/mode.h to /usr/local/include/rofi/
Installing /home/tomasi/programs/rofi/include/mode-private.h to /usr/local/include/rofi/
Installing /home/tomasi/programs/rofi/include/helper.h to /usr/local/include/rofi/
Installing /home/tomasi/programs/rofi/include/rofi-types.h to /usr/local/include/rofi/
Installing /home/tomasi/programs/rofi/include/rofi-icon-fetcher.h to /usr/local/include/rofi/
Installing /home/tomasi/programs/rofi/doc/rofi.1 to /usr/local/share/man/man1
Installing /home/tomasi/programs/rofi/doc/rofi-theme-selector.1 to /usr/local/share/man/man1
Installing /home/tomasi/programs/rofi/doc/rofi-sensible-terminal.1 to /usr/local/share/man/man1
Installing /home/tomasi/programs/rofi/doc/rofi-script.5 to /usr/local/share/man/man5
Installing /home/tomasi/programs/rofi/doc/rofi-theme.5 to /usr/local/share/man/man5
Installing /home/tomasi/programs/rofi/doc/rofi-debugging.5 to /usr/local/share/man/man5
Installing /home/tomasi/programs/rofi/doc/rofi-dmenu.5 to /usr/local/share/man/man5
Installing /home/tomasi/programs/rofi/doc/rofi-keys.5 to /usr/local/share/man/man5
Installing /home/tomasi/programs/rofi/script/rofi-sensible-terminal to /usr/local/bin
Installing /home/tomasi/programs/rofi/script/rofi-theme-selector to /usr/local/bin
Installing /home/tomasi/programs/rofi/data/rofi-theme-selector.desktop to /usr/local/share/applications
Installing /home/tomasi/programs/rofi/data/rofi.desktop to /usr/local/share/applications
Installing /home/tomasi/programs/rofi/data/rofi.svg to /usr/local/share/icons/hicolor/scalable/apps
Installing /home/tomasi/programs/rofi/themes/Adapta-Nokto.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/Arc.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/Arc-Dark.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/DarkBlue.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/Indego.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/Monokai.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/Paper.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/android_notification.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/arthur.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/blue.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/c64.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/dmenu.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/docu.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/glue_pro_blue.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-common.rasinc to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-dark-hard.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-dark-soft.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-dark.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-light-hard.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-light-soft.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/gruvbox-light.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/lb.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/paper-float.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/purple.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/sidebar.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/sidebar-v2.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/solarized.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/solarized_alternate.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/fancy.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/fancy2.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/iggy.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/material.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/iggy.jpg to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/themes/fullscreen-preview.rasi to /usr/local/share/rofi/themes
Installing /home/tomasi/programs/rofi/build/meson-private/rofi.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig                                                                                                                       /0,7s
┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/1)─┐
└─(12:50:49 on wayland)──> rehash                                                                                                                                                                                          ──(Pá,zář /0,0s
┌─(~/programs/rofi)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(tomasi@HCI-L3431:pts/1)─┐
└─(12:51:03 on wayland)──> rofi -v                                                                                                                                                                                         ──(Pá,zář22)─┘
Version: 1.7.5+wayland2-146-gbb856341 (wayland)
lbonn commented 1 year ago

Ok, it's possible to have all the dependencies without xcb. Here is a quick nix shell script to reproduce this environment

{ pkgs ? import <nixpkgs> {} }:

let
  cairo_overlay = (self: super: {
    cairo = super.cairo.override { x11Support = false; xcbSupport = false; };
  });
  pkgs = import <nixpkgs> { overlays =[ cairo_overlay ]; };
in pkgs.mkShell {
  packages = with pkgs; [
    pkgs.curl
    pkgs.jq
    (pkgs.libxkbcommon.overrideAttrs (oldAttrs:
    {
      mesonFlags = oldAttrs.mesonFlags ++ [ "-Denable-x11=false" ];
      buildInputs = [ pkgs.xkeyboard_config pkgs.libxml2 pkgs.wayland pkgs.wayland-protocols];
    }))

    (pkgs.pango.override { x11Support = false; })
    pkgs.cairo
    pkgs.git
    pkgs.librsvg
    pkgs.check
    pkgs.libstartup_notification
    pkgs.which

    pkgs.meson
    pkgs.ninja
    pkgs.pkg-config
    pkgs.flex
    pkgs.bison

    pkgs.gcc
    pkgs.glib

    pkgs.wayland-scanner
    pkgs.wayland
    pkgs.wayland-protocols

  ];
}

I'll try to fix the extra include <xcb/xcb.h>...

lbonn commented 1 year ago

Fixed in #90