Waybar: The build fails after updating fmt to version 10.0
Meson version: 1.2.1 Ninja version: 1.11.1
FAILED: test/waybar_test.p/.._src_config.cpp.o
ccache c++ -Itest/waybar_test.p -Itest -I../test -I../include -I/usr/include/gtkmm-3.0 -I/usr/lib/gtkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.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/dbus-1.0/include -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -I/usr/include/pangomm-1.4 -I/usr/lib/pangomm-1.4/include -I/usr/include/atkmm-1.6 -I/usr/lib/atkmm-1.6/include -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/gdkmm-3.0/include -I -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 '-DVERSION="0.9.22-5-g0a28b50 (branch '"'"'master'"'"')"' -DHAVE_LANGINFO_1STDAY '-DSYSCONFDIR="//etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SWAY -DHAVE_WLR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_UPOWER -DHAVE_MPRIS -DHAVE_LIBPULSE -DHAVE_LIBJACK -DHAVE_LIBWIREPLUMBER -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_LIBMPDCLIENT -DHAVE_GTK_LAYER_SHELL -DHAVE_LIBSNDIO -DHAVE_GIO_UNIX -DWANT_RFKILL -DHAVE_LIBDATE -DUSE_EXPERIMENTAL -DHAVE_LIBCAVA -DUSE_OS_TZDB=1 -DONLY_C_LOCALE=0 -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -pthread -MD -MQ test/waybar_test.p/.._src_config.cpp.o -MF test/waybar_test.p/.._src_config.cpp.o.d -o test/waybar_test.p/.._src_config.cpp.o -c ../src/config.cpp
bash In file included from /usr/include/spdlog/spdlog.h:14,
from ../src/config.cpp:3:
/usr/include/spdlog/logger.h: In instantiation of ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]’:
/usr/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >]’
/usr/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >]’
/usr/include/spdlog/logger.h:152:12: required from ‘void spdlog::logger::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >]’
/usr/include/spdlog/spdlog.h:155:32: required from ‘void spdlog::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >]’
../src/config.cpp:33:16: required from here
/usr/include/spdlog/logger.h:374:75: error: cannot bind non-const lvalue reference of type ‘std::__cxx11::basic_string<char>&’ to an rvalue of type ‘std::__cxx11::basic_string<char>’
374 | fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/spdlog/fmt/fmt.h:31,
from /usr/include/spdlog/common.h:45,
from /usr/include/spdlog/spdlog.h:12:
/usr/include/fmt/core.h:1826:35: note: initializing argument 1 of ‘constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<_Args>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}]’
1826 | constexpr auto make_format_args(T&... args)
| ~~^~~~~~~~
FAILED: waybar.p/src_modules_custom.cpp.o
ccache c++ -Iwaybar.p -I. -I.. -I../include -Iprotocol -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/gtkmm-3.0 -I/usr/lib/gtkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.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/dbus-1.0/include -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -I/usr/include/pangomm-1.4 -I/usr/lib/pangomm-1.4/include -I/usr/include/atkmm-1.6 -I/usr/lib/atkmm-1.6/include -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/gdkmm-3.0/include -I/usr/include/libdbusmenu-gtk3-0.4 -I/usr/include/libdbusmenu-glib-0.4 -I/usr/include/libnl3 -I/usr/include/libupower-glib -I/usr/include/playerctl -I/usr/include/wireplumber-0.4 -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/libevdev-1.0 -I/usr/include/gtk-layer-shell -I -I/usr/include/libxml2 -I/usr/include/cava -I/usr/include/cava/input -I/usr/include/cava/output -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 '-DVERSION="0.9.22-5-g0a28b50 (branch '"'"'master'"'"')"' -DHAVE_LANGINFO_1STDAY '-DSYSCONFDIR="//etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SWAY -DHAVE_WLR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_UPOWER -DHAVE_MPRIS -DHAVE_LIBPULSE -DHAVE_LIBJACK -DHAVE_LIBWIREPLUMBER -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_LIBMPDCLIENT -DHAVE_GTK_LAYER_SHELL -DHAVE_LIBSNDIO -DHAVE_GIO_UNIX -DWANT_RFKILL -DHAVE_LIBDATE -DUSE_EXPERIMENTAL -DHAVE_LIBCAVA -DUSE_OS_TZDB=1 -DONLY_C_LOCALE=0 -pthread -D_REENTRANT -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -MD -MQ waybar.p/src_modules_custom.cpp.o -MF waybar.p/src_modules_custom.cpp.o.d -o waybar.p/src_modules_custom.cpp.o -c ../src/modules/custom.cpp
In file included from /usr/include/spdlog/spdlog.h:14,
from ../include/util/command.hpp:5,
from ../include/modules/custom.hpp:9,
from ../src/modules/custom.cpp:1:
/usr/include/spdlog/logger.h: In instantiation of ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {int}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]’:
/usr/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {int}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, int>]’
/usr/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {int}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, int>]’
/usr/include/spdlog/logger.h:152:12: required from ‘void spdlog::logger::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {int}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, int>]’
/usr/include/spdlog/spdlog.h:155:32: required from ‘void spdlog::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {int}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, int>]’
../include/util/command.hpp:53:20: required from here
/usr/include/spdlog/logger.h:374:75: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
374 | fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/fmt/format.h:49,
from ../include/modules/custom.hpp:3:
/usr/include/fmt/core.h:1826:35: note: initializing argument 1 of ‘constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {int}]’
1826 | constexpr auto make_format_args(T&... args)
| ~~^~~~~~~~
/usr/include/spdlog/logger.h: In instantiation of ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {char*}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]’:
/usr/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, char*>]’
/usr/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, char*>]’
/usr/include/spdlog/logger.h:152:12: required from ‘void spdlog::logger::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, char*>]’
/usr/include/spdlog/spdlog.h:155:32: required from ‘void spdlog::debug(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, char*>]’
../include/util/command.hpp:61:20: required from here
/usr/include/spdlog/logger.h:374:75: error: cannot bind non-const lvalue reference of type ‘char*&’ to an rvalue of type ‘char*’
374 | fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/core.h:1826:35: note: initializing argument 1 of ‘constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {char*}]’
1826 | constexpr auto make_format_args(T&... args)
| ~~^~~~~~~~
/usr/include/spdlog/logger.h: In instantiation of ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {const char*, char*}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]’:
/usr/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const char*, char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const char*, char*>]’
/usr/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const char*, char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const char*, char*>]’
/usr/include/spdlog/logger.h:170:12: required from ‘void spdlog::logger::error(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const char*, char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const char*, char*>]’
/usr/include/spdlog/spdlog.h:173:32: required from ‘void spdlog::error(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const char*, char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const char*, char*>]’
../include/util/command.hpp:84:18: required from here
/usr/include/spdlog/logger.h:374:75: error: cannot bind non-const lvalue reference of type ‘const char*&’ to an rvalue of type ‘const char*’
374 | fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/core.h:1826:35: note: initializing argument 1 of ‘constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {const char*, char*}]’
1826 | constexpr auto make_format_args(T&... args)
When I launch Waybar I get this error: error while loading shared libraries: libfmt.so.9: cannot open shared object file: No such file or directory
➤ find /usr/lib/ -name 'libfmt.so*'
/usr/lib/libfmt.so
/usr/lib/libfmt.so.10
/usr/lib/libfmt.so.10.1.0
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 8
- Comments: 26 (9 by maintainers)
I installed
spdlog-git
, which also allows me to installwaybar-hyprland-git
afterwards.So how do we fix this issue? Pacman is now delivering fmt version 9.3 and it still doesn’t compile. I’ve been using waybar-hyprland-git and none of the Hyprland versions will compile. Is there some sort of temporary workaround we can do?
Thanks for the information!! The solution was uninstall
waybar-hyprland-git
, installspdlog-git
and reinstallwaybar-hyprland-git
. ❤️ 🐧I finally managed to compile it on my system (Arch):
spdlog-git
,fmt9
andfmt
ninja -C build
. The compilation will fail halfway through. Do not delete the build folder.spdlog
(the non-git version).@salimp2009 Packaging doesn’t work for me either
This method worked for me. thank @mrp4sten
thank you, this was a solution for me