luispabon / sway-ubuntu

Ubuntu build system for sway and related tools
75 stars 15 forks source link

meson.build:99:0: ERROR: Dependency "xkbregistry" not found, tried pkgconfig and cmake #14

Closed acouprie closed 2 years ago

acouprie commented 2 years ago

Hello,

I encountered an error about "xkbregistry" when I ran make yolo on the focal branch.

Here is the trace:

$ make yolo
[...]
Dependency spdlog from subproject subprojects/spdlog-1.8.5 found: YES 1.8.5
Run-time dependency wayland-client found: YES 1.18.0
Run-time dependency wayland-cursor found: YES 1.18.0
Run-time dependency wayland-protocols found: YES 1.20
Run-time dependency gtkmm-3.0 found: YES 3.24.2
Run-time dependency dbusmenu-gtk3-0.4 found: YES 16.04.0
Run-time dependency gio-unix-2.0 found: YES 2.64.6
Run-time dependency jsoncpp found: YES 1.7.4
Run-time dependency sigc++-2.0 found: YES 2.10.2
Run-time dependency epoll-shim found: NO (tried pkgconfig and cmake)
Run-time dependency libnl-3.0 found: YES 3.4.0
Run-time dependency libnl-genl-3.0 found: YES 3.4.0
Run-time dependency libpulse found: YES 13.99.1
Run-time dependency libudev found: YES 245
Run-time dependency libevdev found: YES 1.9.0
Run-time dependency libmpdclient found: NO (tried pkgconfig and cmake)
Run-time dependency xkbregistry found: NO (tried pkgconfig and cmake)

meson.build:99:0: ERROR: Dependency "xkbregistry" not found, tried pkgconfig and cmake

A full log can be found at /home/ether/workspace/sway-ubuntu/Waybar/build/meson-logs/meson-log.txt
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory
make[1]: *** [Makefile:166: meson-ninja-build] Error 1
make[1]: Leaving directory '/home/ether/workspace/sway-ubuntu'
make: *** [Makefile:179: waybar-build] Error 2

/home/ether/workspace/sway-ubuntu/Waybar/build/meson-logs/meson-log.txt

$ tail -n 20 /home/ether/workspace/sway-ubuntu/Waybar/build/meson-logs/meson-log.txt
-levdev
Run-time dependency libevdev found: YES 1.9.0
Pkg-config binary for 1 is cached.
Determining dependency 'libmpdclient' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: 
Called `/usr/bin/pkg-config --modversion libmpdclient` -> 1

CMake binary for 1 is cached.
Preliminary CMake check failed. Aborting.
Run-time dependency libmpdclient found: NO (tried pkgconfig and cmake)
Pkg-config binary for 1 is cached.
Determining dependency 'xkbregistry' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: 
Called `/usr/bin/pkg-config --modversion xkbregistry` -> 1

CMake binary for 1 is cached.
Preliminary CMake check failed. Aborting.
Run-time dependency xkbregistry found: NO (tried pkgconfig and cmake)

meson.build:99:0: ERROR: Dependency "xkbregistry" not found, tried pkgconfig and cmake

I found this repo while I am trying to improve my Sway's experience on Ubuntu. Indeed, since I switched from OpenSuse Tumbleweed to Ubuntu, I found sway is not working as good as before.

The most annoying part is that the screen sharing is not working very well: I can only share apps but not fullscreen. I found it is related to PipeWire, building it with your code will install PipeWire and fix my issue?

Thanks

acouprie commented 2 years ago

Update

I updated my system to impish, it didn't solve my screen streaming problem (pipewire and xdg-desktop-portal-gtk are installed). The command make yolo fails again:

wlroots 0.12.0

    systemd    : YES
    elogind    : NO
    libseat    : YES
    xwayland   : YES
    x11-backend: NO
    xcb-icccm  : YES
    xcb-errors : NO
    xdg-foreign: YES

Found ninja-1.10.2.git.kitware.jobserver-1 at /usr/local/bin/ninja
ninja: Entering directory `build'
[303/348] Compiling C object examples/dmabuf-capture.p/dmabuf-capture.c.o
FAILED: examples/dmabuf-capture.p/dmabuf-capture.c.o 
cc -Iexamples/dmabuf-capture.p -Iexamples -I../examples -Iprotocol -I/usr/include/x86_64-linux-gnu -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../= -DHAS_LIBUUID=1 '-DICONDIR="/usr/local/share/icons"' -pthread -MD -MQ examples/dmabuf-capture.p/dmabuf-capture.c.o -MF examples/dmabuf-capture.p/dmabuf-capture.c.o.d -o examples/dmabuf-capture.p/dmabuf-capture.c.o -c ../examples/dmabuf-capture.c
../examples/dmabuf-capture.c: In function ‘vid_encode_thread’:
../examples/dmabuf-capture.c:494:25: error: ‘av_init_packet’ is deprecated [-Werror=deprecated-declarations]
  494 |                         av_init_packet(&pkt);
      |                         ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/bsf.h:30,
                 from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:44,
                 from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312,
                 from ../examples/dmabuf-capture.c:2:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[308/348] Compiling C object examples/screencopy-dmabuf.p/screencopy-dmabuf.c.o
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[26/42] Compiling C object examples/dmabuf-capture.p/dmabuf-capture.c.o
FAILED: examples/dmabuf-capture.p/dmabuf-capture.c.o 
cc -Iexamples/dmabuf-capture.p -Iexamples -I../examples -Iprotocol -I/usr/include/x86_64-linux-gnu -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../= -DHAS_LIBUUID=1 '-DICONDIR="/usr/local/share/icons"' -pthread -MD -MQ examples/dmabuf-capture.p/dmabuf-capture.c.o -MF examples/dmabuf-capture.p/dmabuf-capture.c.o.d -o examples/dmabuf-capture.p/dmabuf-capture.c.o -c ../examples/dmabuf-capture.c
../examples/dmabuf-capture.c: In function ‘vid_encode_thread’:
../examples/dmabuf-capture.c:494:25: error: ‘av_init_packet’ is deprecated [-Werror=deprecated-declarations]
  494 |                         av_init_packet(&pkt);
      |                         ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/bsf.h:30,
                 from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:44,
                 from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312,
                 from ../examples/dmabuf-capture.c:2:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[31/42] Linking target examples/toplevel-decoration
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:220: meson-ninja-build] Error 1
make[1]: Leaving directory '/home/ether/workspace/sway-ubuntu'
make: *** [Makefile:227: wlroots-build] Error 2
luispabon commented 2 years ago

I'm afraid older versions of Ubuntu will have max version of wlroots and sway that can conceivably be compiled with the libraries that ubuntu itself have. The old branches are now unsupported I'm afraid as I only have time to keep up with the current version of Ubuntu, which I always run.

When this happens in master, I add the git hash of the newest version that can be compiled at that point in time to the Makefile.

I'm having a look at the issue you're seeing in impish. Latest masters aren't currently compilable either because we don't yet have the right version of libwayland-server. I'm hoping I can backport from 22.04 as I've done in the past.

We do not install pipewire here. We use ubuntu's version. The first version that worked for screen sharing in Ubuntu was in 21.04 If memory serves well. Impish works fine.

luispabon commented 2 years ago

Which version of wlroots are you compiling? You have 0.12 there on your logs, but the current is 0.16. The newest we can compile in impish is 0fcc842291d9d714e9c210839ae72429c5c3eae4 (master branch, close to 0.16).

acouprie commented 2 years ago

Hello,

Thank you for your answers.

I eventually switched to Fedora yesterday evening as it is said they have one of the best support for Wayland (and hence sway), and also because I think I did some mess by upgrade from Ubuntu 20.04 to 21.10 (which might explain the wrong wlroots version) so I wanted a fresh start. There are some improvements about windows focus and notifications on Fedora, but the screen sharing is still not working as expected :(

Anyway, I close this issue since I am no longer able to reproduce it.

acouprie commented 2 years ago

For whoever is interested, i solved my screen sharing issue by activating the option in Chromium: chrome://flags/#enable-webrtc-pipewire-capturer. Then I use Discord or Slack web inside Chromium to share my screen.

Source: https://superuser.com/questions/1221333/screensharing-under-wayland