-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.9.21: build fails #2403
Comments
Might be related to the installed |
It fails with latest
@vitaut any idea if this is @fakeowl1 your problem has nothing to do with this issue. |
The problem is likely due to an implicit conversion. Although it wasn't documented, previously one could define a formatter that inherited from a standard formatter and not provide a |
don't rely on implicit conversion which is no longer present in fmt 10.1.0 Fixes Alexays#2403
In my case above fail was with fmt 10.1.0. |
Just tested with two patches added after 0.9.21 (57544fe and c823743) and build still fails with [tkloczko@pers-jacek x86_64-redhat-linux-gnu]$ ninja -k 0
[1/2] Compiling C++ object waybar.p/src_modules_simpleclock.cpp.o
FAILED: waybar.p/src_modules_simpleclock.cpp.o
/usr/bin/g++ -Iwaybar.p -I. -I.. -I../include -Iprotocol -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/lib64/atkmm-1.6/include -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/fribidi -I/usr/include/gio-unix-2.0 -I/usr/include/libnl3 -I/usr/include/libupower-glib -I/usr/include/playerctl -I/usr/include/wireplumber-0.4 -I/usr/include/libevdev-1.0 -I/usr/include/gtk-layer-shell -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 '-DVERSION="0.9.21"' -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_LIBWIREPLUMBER -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_LIBMPDCLIENT -DHAVE_GTK_LAYER_SHELL -DHAVE_GIO_UNIX -DWANT_RFKILL -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -pthread -D_REENTRANT -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -MD -MQ waybar.p/src_modules_simpleclock.cpp.o -MF waybar.p/src_modules_simpleclock.cpp.o.d -o waybar.p/src_modules_simpleclock.cpp.o -c ../src/modules/simpleclock.cpp
../src/modules/simpleclock.cpp: In member function ‘virtual void waybar::modules::Clock::update()’:
../src/modules/simpleclock.cpp:21:26: error: ‘this’ is not a constant expression
21 | auto text = fmt::format(format_, localtime);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
../src/modules/simpleclock.cpp:27:38: in ‘constexpr’ expansion of ‘fmt::v10::basic_format_string<char, tm&>(tooltip_format)’
/usr/include/fmt/core.h:2731:62: in ‘constexpr’ expansion of ‘((fmt::v10::basic_format_string<char, tm&>*)this)->fmt::v10::basic_format_string<char, tm&>::str_.fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>, std::allocator<char> >((* & s))’
/usr/include/fmt/core.h:432:21: in ‘constexpr’ expansion of ‘(& s)->std::__cxx11::basic_string<char>::data()’
/usr/include/c++/13/bits/basic_string.h:2597:23: in ‘constexpr’ expansion of ‘((const std::__cxx11::basic_string<char>*)this)->std::__cxx11::basic_string<char>::_M_data()’
../src/modules/simpleclock.cpp:27:38: error: the value of ‘tooltip_format’ is not usable in a constant expression
27 | auto tooltip_text = fmt::format(tooltip_format, localtime);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/modules/simpleclock.cpp:26:12: note: ‘tooltip_format’ was not declared ‘constexpr’
26 | auto tooltip_format = config_["tooltip-format"].asString();
| ^~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors. |
Builds fine for me but I have Lines 334 to 342 in 5b33a59
|
Hmm .. so what I can try to do to diagnose this? 🤔 |
Just tested and with that commit it builds. |
gcc 13.2 and build fails with
The text was updated successfully, but these errors were encountered: