Skip to content
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

Failed to build with g++ 14.2.0 #3880

Open
manuel-arguelles opened this issue Jan 12, 2025 · 4 comments
Open

Failed to build with g++ 14.2.0 #3880

manuel-arguelles opened this issue Jan 12, 2025 · 4 comments
Labels
battery bug Something isn't working cava memory

Comments

@manuel-arguelles
Copy link

I'm getting lots of errors trying to build waybar:

Project version: 0.11.0
C compiler for the host machine: ccache cc (gcc 14.2.0 "cc (GCC) 14.2.0")
C++ compiler for the host machine: ccache c++ (gcc 14.2.0 "c++ (GCC) 14.2.0")
ccache c++ -Iwaybar.p -I. -I.. -I../include -I../subprojects/cava-0.10.2/include -Iresources/icons -Iprotocol -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/jsoncpp -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/giomm-2.4 -I/usr/lib64/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/lib64/dbus-1.0/include -I/usr/include/elogind -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -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/cairomm-1.0
 -I/usr/lib64/cairomm-1.0/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/webp -I/usr/include/libmount -I/usr/include/blkid 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.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/polkit-1 -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/wirepl
umber-0.5 -I/usr/include/libevdev-1.0/ -I/usr/include/gtk-layer-shell -I/usr/include/libxml2 -I/usr/include/SDL2 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 -O3 '-DVERSION="0.11.0"' -DHAVE_LANGINFO_1STDAY '-DSYSCO
NFDIR="/usr/local/etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SYSTEMD_MONITOR -DHAVE_SWAY -DHAVE_WLR_TASKBAR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_NIRI -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_LOGIND_INHIBITOR -DHAVE_UPOWER -DHAVE_PIPEWIRE -DHAVE_LIBPULSE -DHAVE_L
IBJACK -DHAVE_LIBW
IREPLUMBER -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_CHRONO_TIMEZONES -DHAVE_LIBCAVA -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -pthread -D_REENTRANT -DSPDLOG_SHARED_LIB -DFMT_SHARED -DSPDLOG_COMPILED_LIB -MD -MQ waybar.p/src_config.cpp.o -MF waybar.p/src_config.cpp.o.d -o waybar.p/src_config.cpp.o -c ../src/config.cpp
In file included from /usr/include/fmt/ostream.h:23,
                 from ../include/util/json.hpp:3,
                 from ../src/config.cpp:11:
/usr/include/fmt/chrono.h: In function ‘void fmt::v10::detail::write_codecvt(codecvt_result<CodeUnit>&, fmt::v10::string_view, const std::locale&)’:
/usr/include/fmt/chrono.h:352:20: error: ‘diagnostic’ was not declared in this scope
  352 |   FMT_PRAGMA_CLANG(diagnostic push)
      |                    ^~~~~~~~~~
/usr/include/fmt/chrono.h:352:3: error: there are no arguments to ‘FMT_PRAGMA_CLANG’ that depend on a template parameter, so a declaration of ‘FMT_PRAGMA_CLANG’ must be available [-fpermissive]
  352 |   FMT_PRAGMA_CLANG(diagnostic push)
      |   ^~~~~~~~~~~~~~~~
/usr/include/fmt/chrono.h:352:3: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/fmt/chrono.h:352:36: error: expected ‘;’ before ‘FMT_PRAGMA_CLANG’
  352 |   FMT_PRAGMA_CLANG(diagnostic push)
      |                                    ^
      |                                    ;

Versions:
fmt 11.1.1
gcc 14.2.0
llvm 19.1.6

I tried setting -fpermissive but didn't work.

@github-actions github-actions bot added battery bug Something isn't working cava memory labels Jan 12, 2025
@jayjwa
Copy link

jayjwa commented Jan 13, 2025

I'm seeing similar.

[75/217] Compiling C++ object test/waybar_test.p/.._src_config.cpp.o
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/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/giomm-2.4 -I/usr/lib64/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/lib64/dbus-1.0/include -I/usr/include/elogind -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -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/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
-I/usr/include/webp -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 -O3 '-DVERSION="0.11.0"' -DHAVE_LANGINFO_1STDAY '-DSYSCONFDIR="/usr/local/etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SYSTEMD_MONITOR -DHAVE_SWAY -DHAVE_WLR_TASKBAR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_NIRI -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_LOGIND_INHIBITOR -DHAVE_UPOWER -DHAVE_PIPEWIRE -DHAVE_LIBPULSE -DHAVE_LIBJACK -DHAVE_LIBWIREPLUMBER -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_CHRONO_TIMEZONES -DHAVE_LIBCAVA -DSPDLOG_SHARED_LIB -DFMT_SHARED -DSPDLOG_COMPILED_LIB -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
In file included from /usr/include/fmt/ostream.h:23,
                 from ../include/util/json.hpp:3,
                 from ../src/config.cpp:11:
/usr/include/fmt/chrono.h: In function ‘void fmt::v10::detail::write_codecvt(codecvt_result<CodeUnit>&, fmt::v10::string_view, const std::locale&)':
/usr/include/fmt/chrono.h:352:20: error: ‘diagnostic' was not declared in this scope

  352 |   FMT_PRAGMA_CLANG(diagnostic push)
      |                    ^~~~~~~~~~
/usr/include/fmt/chrono.h:352:3: error: there are no arguments to ‘FMT_PRAGMA_CLANG' that depend on a template parameter, so a declaration of ‘FMT_PRAGMA_CLANG' must be available [-fpermissive]
  352 |   FMT_PRAGMA_CLANG(diagnostic push)
      |   ^~~~~~~~~~~~~~~~
/usr/include/fmt/chrono.h:352:3: note: (if you use ‘-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/fmt/chrono.h:352:36: error: expected ‘;' before ‘FMT_PRAGMA_CLANG'
  352 |   FMT_PRAGMA_CLANG(diagnostic push)

gcc-14.2.0 (also tested clang 19.1.6), fmt-11.1.1, Waybar-0.11.0. Slackware current. I tried building with default options and with Slackware-specific and both failed.

@earies
Copy link

earies commented Jan 14, 2025

This appears related to fmt 10 -> 11 transition. fmt 11.1.2 was just released yesterday and slackware-current has not caught up yet but this also does not appear to resolve.

A step down to fmt 10 (10.2.1) should get you back to prior behavior

@earies
Copy link

earies commented Jan 14, 2025

With a recompiled spdlog (1.15.0) against fmt 11.1.2, quick look appears to point to formatter::format changes in fmt 11+

gabime/spdlog#3115 (comment)
fmtlib/fmt#3447
https://cplusplus.github.io/LWG/issue3636

@jayjwa
Copy link

jayjwa commented Jan 14, 2025

I see. We just got fmt-11.1.1 Jan 10th. I'm sure the next version will come around soon. Until then I've robbed the old solib from the fmt 10 package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
battery bug Something isn't working cava memory
Projects
None yet
Development

No branches or pull requests

3 participants