Wireplumber module does not build with Wireplumber 0.5 API
Fedora rawhide has updated wireplumber to 0.4.81 (0.5 API release preview) which seems to have altered use of the GLib logging API and some initialisation callbacks.
Bulding with Clang:
[65/93] Compiling C++ object waybar.p/src_modules_wireplumber.cpp.o
FAILED: waybar.p/src_modules_wireplumber.cpp.o
/usr/bin/clang++ -Iwaybar.p -I. -I.. -I../include -I../subprojects/spdlog-1.11.0/include -I../subprojects/cava-0.9.1/include -Iresources/icons -Iprotocol -I/usr/local/include -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/cairo -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/atk-1.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/at-spi2-atk/2.0 -I/usr/include/cloudproviders -I/usr/include/webp -I/usr/include/at-spi-2.0 -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/pixman-1 -I/usr/include/libxml2 -I/usr/include/fribidi -I/usr/include/sysprof-6 -I/usr/include/libpng16 -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/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/playerctl -I/usr/include/wireplumber-0.5 -I/usr/include/libevdev-1.0 -I/usr/local/include/gtk-layer-shell -I/usr/include/SDL2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++20 -O3 '-DVERSION="0.9.24-139-g1dce607c (branch '"'"'master'"'"')"' -DHAVE_LANGINFO_1STDAY '-DSYSCONFDIR="//usr/local/etc"' -DHAVE_CPU_LINUX -DHAVE_MEMORY_LINUX -DHAVE_SYSTEMD_MONITOR -DHAVE_SWAY -DHAVE_WLR -DHAVE_RIVER -DHAVE_DWL -DHAVE_HYPRLAND -DHAVE_LIBNL -DHAVE_GAMEMODE -DHAVE_UPOWER -DHAVE_PIPEWIRE -DHAVE_MPRIS -DHAVE_LIBPULSE -DHAVE_LIBJACK -DHAVE_LIBWIREPLUMBER -DHAVE_DBUSMENU -DHAVE_LIBUDEV -DHAVE_LIBEVDEV -DHAVE_LIBINPUT -DHAVE_GTK_LAYER_SHELL -DHAVE_GIO_UNIX -DHAVE_CHRONO_TIMEZONES -DHAVE_LIBCAVA -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -pthread -D_REENTRANT -DWITH_GZFILEOP -DSPDLOG_FMT_EXTERNAL -MD -MQ waybar.p/src_modules_wireplumber.cpp.o -MF waybar.p/src_modules_wireplumber.cpp.o.d -o waybar.p/src_modules_wireplumber.cpp.o -c ../src/modules/wireplumber.cpp
In file included from ../src/modules/wireplumber.cpp:1:
In file included from ../include/modules/wireplumber.hpp:9:
In file included from ../include/ALabel.hpp:4:
In file included from /usr/include/gtkmm-3.0/gtkmm/label.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/misc.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/widget.h:31:
In file included from /usr/include/pangomm-1.4/pangomm/context.h:29:
In file included from /usr/include/glibmm-2.4/glibmm/object.h:30:
/usr/include/glibmm-2.4/glibmm/wrap.h:92:7: error: use of undeclared identifier 'WP_LOCAL_LOG_TOPIC'
92 | g_warning("Glib::wrap_auto_interface(): The C++ instance (%s) does not dynamic_cast to the "
| ^
/usr/include/glib-2.0/glib/gmessages.h:362:32: note: expanded from macro 'g_warning'
362 | #define g_warning(...) g_log (G_LOG_DOMAIN, \
| ^
/usr/include/wireplumber-0.5/wp/log.h:63:23: note: expanded from macro 'G_LOG_DOMAIN'
63 | #define G_LOG_DOMAIN (WP_LOCAL_LOG_TOPIC->topic_name)
| ^
In file included from ../src/modules/wireplumber.cpp:1:
In file included from ../include/modules/wireplumber.hpp:9:
In file included from ../include/ALabel.hpp:4:
In file included from /usr/include/gtkmm-3.0/gtkmm/label.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/misc.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/widget.h:54:
/usr/include/giomm-2.4/giomm/actiongroup.h:702:3: error: use of undeclared identifier 'WP_LOCAL_LOG_TOPIC'
702 | g_return_if_fail(
| ^
/usr/include/glib-2.0/glib/gmessages.h:652:35: note: expanded from macro 'g_return_if_fail'
652 | g_return_if_fail_warning (G_LOG_DOMAIN, \
| ^
/usr/include/wireplumber-0.5/wp/log.h:63:23: note: expanded from macro 'G_LOG_DOMAIN'
63 | #define G_LOG_DOMAIN (WP_LOCAL_LOG_TOPIC->topic_name)
| ^
In file included from ../src/modules/wireplumber.cpp:1:
In file included from ../include/modules/wireplumber.hpp:9:
In file included from ../include/ALabel.hpp:4:
In file included from /usr/include/gtkmm-3.0/gtkmm/label.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/misc.h:27:
In file included from /usr/include/gtkmm-3.0/gtkmm/widget.h:54:
/usr/include/giomm-2.4/giomm/actiongroup.h:722:3: error: use of undeclared identifier 'WP_LOCAL_LOG_TOPIC'
722 | g_return_if_fail(
| ^
/usr/include/glib-2.0/glib/gmessages.h:652:35: note: expanded from macro 'g_return_if_fail'
652 | g_return_if_fail_warning (G_LOG_DOMAIN, \
| ^
/usr/include/wireplumber-0.5/wp/log.h:63:23: note: expanded from macro 'G_LOG_DOMAIN'
63 | #define G_LOG_DOMAIN (WP_LOCAL_LOG_TOPIC->topic_name)
| ^
../src/modules/wireplumber.cpp:258:8: error: no matching function for call to 'wp_core_load_component'
258 | if (!wp_core_load_component(wp_core_, "libwireplumber-module-default-nodes-api", "module", NULL,
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/wireplumber-0.5/wp/component-loader.h:44:6: note: candidate function not viable: requires 8 arguments, but 5 were provided
44 | void wp_core_load_component (WpCore * self, const gchar * component,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 | const gchar * type, WpSpaJson * args, const gchar * provides,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/modules/wireplumber.cpp:258:7: error: invalid argument type 'void' to unary expression
258 | if (!wp_core_load_component(wp_core_, "libwireplumber-module-default-nodes-api", "module", NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
259 | &error)) {
| ~~~~~~~
../src/modules/wireplumber.cpp:263:8: error: no matching function for call to 'wp_core_load_component'
263 | if (!wp_core_load_component(wp_core_, "libwireplumber-module-mixer-api", "module", NULL,
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/wireplumber-0.5/wp/component-loader.h:44:6: note: candidate function not viable: requires 8 arguments, but 5 were provided
44 | void wp_core_load_component (WpCore * self, const gchar * component,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 | const gchar * type, WpSpaJson * args, const gchar * provides,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/modules/wireplumber.cpp:263:7: error: invalid argument type 'void' to unary expression
263 | if (!wp_core_load_component(wp_core_, "libwireplumber-module-mixer-api", "module", NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264 | &error)) {
| ~~~~~~~
7 errors generated.
The wp_core_load_component can be hacked around by ignoring errors and passing NULL for the ready callbacks, but these could probably be handled robustly, and the logging errors seem to be all in included GLib headers so probably need a correct WP_LOCAL_LOG_TOPIC defined.
This is blocking rebuilds on Fedora.
This is blocking rebuilds on openSUSE as well. By the way, wireplumber upstream has stated that there are "no planned API/ABI changes during RCs" (with 0.4.90 being RC1), so it should be safe to start upgrading the code to the 0.5 API now.
also blocking rebuilds on nixos ustable atm :) https://hydra.nixos.org/build/253471779/nixlog/1