Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.37k stars 695 forks source link

installation waybar fails (catch2/mathcers/catch_mathcers_range_equals.hpp) can't be found #2447

Closed krankeradler closed 8 months ago

krankeradler commented 1 year ago

Heija and thanks for your work.

If been trying to build waybar with experimental options enabled. However ninja -C build runs into a problem with catch2. Compilation of the test/waybar_test.p/main.cpp.o file fails as catch2/matchers/catch_matchers_range_equals.hpp on Line 30 can't be found.

Is this a general problem?

LukashonakV commented 10 months ago

Hi @krankeradler . Waiting for Catch release: catchorg/Catch2#2722

nsbruce commented 8 months ago

I'm getting the same error building on Ubuntu 22.04. I used the apt install <dependencies> snippet in the readme. meson build passes. ninja -C build does not.

Full log:

~ git clone https://github.com/Alexays/Waybar && cd Waybar
Cloning into 'Waybar'...
remote: Enumerating objects: 17802, done.
remote: Counting objects: 100% (17802/17802), done.
remote: Compressing objects: 100% (4617/4617), done.
remote: Total 17802 (delta 12986), reused 17757 (delta 12974), pack-reused 0
Receiving objects: 100% (17802/17802), 3.85 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (12986/12986), done.

~ meson build
The Meson build system
Version: 0.61.2
Source dir: /home/nsbruce/Waybar
Build dir: /home/nsbruce/Waybar/build
Build type: native build
Project name: waybar
Project version: 0.9.24
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports link arguments -lc++fs: NO 
Compiler for C++ supports link arguments -lc++experimental: NO 
Compiler for C++ supports link arguments -lstdc++fs: YES 
Program git found: YES (/usr/bin/git)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Has header "filesystem" : YES 
Checking if "nl_langinfo with _NL_TIME_WEEK_1STDAY, _NL_TIME_FIRST_WEEKDAY" : links: YES 
Run-time dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency fmt found: YES 9.1.0
Dependency spdlog found: NO found 1.9.2 but need: '>=1.10.0'
Found CMake: /usr/bin/cmake (3.22.1)
WARNING: CMake: Dependency -Wl,--as-needed for spdlog was not found
Dependency spdlog found: NO found 1.9.2 but need: '>=1.10.0'
Run-time dependency spdlog found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency spdlog
Downloading spdlog source from https://github.com/gabime/spdlog/archive/v1.11.0.tar.gz
Downloading file of unknown size.
Downloading spdlog patch from https://wrapdb.mesonbuild.com/v2/spdlog_1.11.0-2/get_patch
Download size: 2645
Downloading: ..........

Executing subproject spdlog 

spdlog| Project name: spdlog
spdlog| Project version: 1.11.0
spdlog| C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
spdlog| C++ linker for the host machine: c++ ld.bfd 2.38
spdlog| Dependency threads found: YES unknown (cached)
spdlog| Dependency fmt found: YES 9.1.0 (cached)
spdlog| Build targets in project: 1
spdlog| Subproject spdlog finished.

Dependency spdlog from subproject subprojects/spdlog-1.11.0 found: YES 1.11.0
Run-time dependency wayland-client found: YES 1.20.0
Run-time dependency wayland-cursor found: YES 1.20.0
Run-time dependency wayland-protocols found: YES 1.25
Run-time dependency gtkmm-3.0 found: YES 3.24.5
Run-time dependency dbusmenu-gtk3-0.4 found: YES 16.04.0
Run-time dependency gio-unix-2.0 found: YES 2.72.4
Run-time dependency jsoncpp found: YES 1.9.4
Run-time dependency sigc++-2.0 found: YES 2.10.4
Run-time dependency libinotify found: NO (tried pkgconfig and cmake)
Run-time dependency epoll-shim found: NO (tried pkgconfig and cmake)
Run-time dependency libinput found: YES 1.20.0
Run-time dependency libnl-3.0 found: YES 3.5.0
Run-time dependency libnl-genl-3.0 found: YES 3.5.0
Run-time dependency upower-glib found: NO (tried pkgconfig and cmake)
Run-time dependency libpipewire-0.3 found: NO (tried pkgconfig and cmake)
Run-time dependency playerctl found: NO (tried pkgconfig and cmake)
Run-time dependency libpulse found: YES 15.99.1
Run-time dependency libudev found: YES 249
Run-time dependency libevdev found: YES 1.12.1
Run-time dependency libmpdclient found: YES 2.20
Run-time dependency xkbregistry found: YES 1.4.0
Run-time dependency jack found: NO (tried pkgconfig and cmake)
Run-time dependency wireplumber-0.4 found: NO (tried pkgconfig and cmake)
Library sndio found: NO
Run-time dependency gtk-layer-shell-0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency gtk-layer-shell-0
Downloading gtk-layer-shell source from https://github.com/wmww/gtk-layer-shell/archive/v0.4.0/gtk-layer-shell-0.4.0.tar.gz
Downloading file of unknown size.

Executing subproject gtk-layer-shell 

gtk-layer-shell| Project name: gtk-layer-shell
gtk-layer-shell| Project version: 0.4.0
gtk-layer-shell| C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
gtk-layer-shell| C linker for the host machine: cc ld.bfd 2.38
gtk-layer-shell| Run-time dependency gtk+-wayland-3.0 found: YES 3.24.33
gtk-layer-shell| Dependency wayland-client found: YES 1.20.0 (cached)
gtk-layer-shell| Run-time dependency wayland-server found: YES 1.20.0
gtk-layer-shell| Run-time dependency wayland-scanner found: YES 1.20.0
gtk-layer-shell| Dependency wayland-protocols found: YES 1.25 (cached)
gtk-layer-shell| Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
gtk-layer-shell| Run-time dependency gobject-introspection-1.0 found: YES 1.72.0
gtk-layer-shell| Dependency gobject-introspection-1.0 found: YES 1.72.0 (cached)
gtk-layer-shell| Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner)
gtk-layer-shell| Dependency gobject-introspection-1.0 found: YES 1.72.0 (cached)
gtk-layer-shell| Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler)
gtk-layer-shell| Program python3 found: YES (/usr/bin/python3)
gtk-layer-shell| Build targets in project: 6
gtk-layer-shell| NOTICE: Future-deprecated features used:
gtk-layer-shell| * 0.56.0: {'Dependency.get_pkgconfig_variable'}
gtk-layer-shell| Subproject gtk-layer-shell finished.

Dependency gtk-layer-shell-0 from subproject subprojects/gtk-layer-shell-0.4.0 found: YES 0.4.0
Run-time dependency systemd found: YES 249
Computing int of "__cpp_lib_chrono" : 201611
Run-time dependency date found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency date (modules: date::date, date::date-tz)
Downloading date source from https://github.com/HowardHinnant/date/archive/v3.0.1.tar.gz
Download size: 825542
Downloading: ..........
Downloading date patch from https://wrapdb.mesonbuild.com/v2/hinnant-date_3.0.1-2/get_patch
Download size: 2093
Downloading: ..........

Executing subproject date 

date| Project name: hinnant-date
date| Project version: undefined
date| C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
date| C++ linker for the host machine: c++ ld.bfd 2.38
date| Dependency threads found: YES unknown (cached)
date| Build targets in project: 7
date| Subproject date finished.

Dependency date (modules: date::date, date::date-tz) from subproject subprojects/date-3.0.1 found: YES undefined
Configuring waybar.service using configuration
Run-time dependency cava found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency cava
Downloading cava source from https://github.com/LukashonakV/cava/archive/0.9.1.tar.gz
Downloading file of unknown size.

Executing subproject cava 

cava| Project name: cava
cava| Project version: 0.9.1
cava| C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
cava| C linker for the host machine: cc ld.bfd 2.38
cava| Has header "iniparser.h" : NO
cava| Has header "iniparser4/iniparser.h" : NO

cava| subprojects/cava-0.9.1/meson.build:65:3: Exception: Problem encountered: iniparser library is required

Subproject subprojects/cava-0.9.1 is buildable: NO (disabling)
Dependency cava from subproject cava found: NO (subproject failed to configure)
Message: cava is not found. Building waybar without cava
Message: cava is not found. Building waybar without cava
Program wayland-scanner found: YES (/usr/bin/wayland-scanner)
Program gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Build-time dependency scdoc found: YES 1.11.2
Program /usr/bin/scdoc found: YES (/usr/bin/scdoc)
Program sh found: YES (/usr/bin/sh)
Configuring waybar.5.scd using configuration
meson.build:531: WARNING: Source item '/home/nsbruce/Waybar/build/waybar.5.scd' cannot be converted to File object, because it is a generated file. This will become a hard error in the future.
Run-time dependency catch2 found: YES 3.4.0
Program clang-tidy found: YES (/usr/bin/clang-tidy)
Build targets in project: 57
NOTICE: Future-deprecated features used:
 * 0.55.0: {'ExternalProgram.path'}
 * 0.56.0: {'Dependency.get_pkgconfig_variable', 'meson.source_root', 'meson.build_root'}

waybar 0.9.24

  Subprojects
    cava           : NO Problem encountered: iniparser library is required
    date           : YES
    gtk-layer-shell: YES 1 warnings
    spdlog         : YES

Found ninja-1.10.1 at /usr/bin/ninja

~ ninja -C build     
ninja: Entering directory `build'
[13/207] Generating 'subprojects/gtk-layer-she...ayer-shell.a.p/wlr-layer-shell-unstable-v1.c'.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
[16/207] Generating 'subprojects/gtk-layer-shell-0.4.0/src/libgtk-layer-shell.a.p/xdg-shell.c'.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
[49/207] Generating resources/icons/icon-resources_c with a custom command
xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH
[60/207] Generating resources/icons/icon-resources_h with a custom command
xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH
[81/207] Generating subprojects/gtk-layer-shel...rc/GtkLayerShell-0.1.gir with a custom command
g-ir-scanner: link: x86_64-linux-gnu-gcc -o /home/nsbruce/Waybar/build/tmp-introspectvz_t197c/GtkLayerShell-0.1 /home/nsbruce/Waybar/build/tmp-introspectvz_t197c/GtkLayerShell-0.1.o -L. -Wl,-rpath,. -Wl,--no-as-needed /home/nsbruce/Waybar/build/subprojects/gtk-layer-shell-0.4.0/src/libgtk-layer-shell.a -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lwayland-client -lgirepository-1.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
[91/207] Compiling C++ object waybar.p/src_factory.cpp.o
In file included from ../include/modules/clock.hpp:4,
                 from ../include/factory.hpp:5,
                 from ../src/factory.cpp:1:
../include/util/date.hpp:34:26: warning: literal operator suffixes not preceded by ‘_’ are reserved for future standardization [-Wliteral-suffix]
   34 | constexpr decltype(auto) operator""d(unsigned long long d) noexcept {
      |                          ^~~~~~~~
[118/207] Compiling C++ object waybar.p/src_bar.cpp.o
In file included from ../include/modules/clock.hpp:4,
                 from ../include/factory.hpp:5,
                 from ../src/bar.cpp:11:
../include/util/date.hpp:34:26: warning: literal operator suffixes not preceded by ‘_’ are reserved for future standardization [-Wliteral-suffix]
   34 | constexpr decltype(auto) operator""d(unsigned long long d) noexcept {
      |                          ^~~~~~~~
[151/207] Compiling C++ object test/waybar_test.p/main.cpp.o
FAILED: test/waybar_test.p/main.cpp.o 
c++ -Itest/waybar_test.p -Itest -I../test -I../include -I../subprojects/spdlog-1.11.0/include -I../subprojects/date-3.0.1/include -I/usr/local/include -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/lib/x86_64-linux-gnu/atkmm-1.6/include -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/atk-1.0 -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++20 -O3 '-DVERSION="0.9.24-81-g3e55d0d7 (branch '"'"'master'"'"')"' -DHAVE_LANGINFO_1STDAY '-DSYSCONFDIR="//usr/local/etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SWAY -DHAVE_WLR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_LIBPULSE -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_LIBMPDCLIENT -DHAVE_GTK_LAYER_SHELL -DHAVE_GIO_UNIX -DHAVE_LIBDATE -DUSE_OS_TZDB=1 -pthread -DSPDLOG_FMT_EXTERNAL -MD -MQ test/waybar_test.p/main.cpp.o -MF test/waybar_test.p/main.cpp.o.d -o test/waybar_test.p/main.cpp.o -c ../test/main.cpp
In file included from /usr/local/include/catch2/catch_all.hpp:126,
                 from ../test/main.cpp:7:
/usr/local/include/catch2/matchers/catch_matchers_all.hpp:30:10: fatal error: catch2/matchers/catch_matchers_range_equals.hpp: No such file or directory
   30 | #include <catch2/matchers/catch_matchers_range_equals.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[160/207] Compiling C++ object waybar.p/src_modules_clock.cpp.o
In file included from ../include/modules/clock.hpp:4,
                 from ../src/modules/clock.cpp:1:
../include/util/date.hpp:34:26: warning: literal operator suffixes not preceded by ‘_’ are reserved for future standardization [-Wliteral-suffix]
   34 | constexpr decltype(auto) operator""d(unsigned long long d) noexcept {
      |                          ^~~~~~~~
ninja: build stopped: subcommand failed.
nsbruce commented 8 months ago

FWIW: I just commented out the relevant test lines in meson.build and waybar build and installed just fine.

~ git diff
diff --git a/meson.build b/meson.build
index df245a28..8205f305 100644
--- a/meson.build
+++ b/meson.build
@@ -537,11 +537,11 @@ catch2 = dependency(
     'catch2',
     version: '>=2.0.0',
     fallback: ['catch2', 'catch2_dep'],
-    required: get_option('tests'),
+    # required: get_option('tests'),
 )
-if catch2.found()
-    subdir('test')
-endif
+# if catch2.found()
+#     subdir('test')
+# endif

 clangtidy = find_program('clang-tidy', required: false)