I also get the same error when I try compiling waybar without using portage (following the instructions under 'building from source' in this repository's readme)
❯ ninja -C build
ninja: Entering directory `build'
[0/1] Regenerating build files.
The Meson build system
Version: 0.55.3
Source dir: /home/minion/Waybar
Build dir: /home/minion/Waybar/build
Build type: native build
Project name: waybar
Project version: 0.9.5
C compiler for the host machine: cc (gcc 9.3.0 "cc (Gentoo 9.3.0-r2 p4) 9.3.0")
C linker for the host machine: cc ld.bfd 2.35.1
C++ compiler for the host machine: c++ (gcc 9.3.0 "c++ (Gentoo 9.3.0-r2 p4) 9.3.0")
C++ linker for the host machine: c++ ld.bfd 2.35.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports link arguments -lc++fs: NO (cached)
Compiler for C++ supports link arguments -lc++experimental: NO (cached)
Compiler for C++ supports link arguments -lstdc++fs: YES (cached)
Program git found: YES
Has header "filesystem" : YES (cached)
Checking if "nl_langinfo with _NL_TIME_WEEK_1STDAY, _NL_TIME_FIRST_WEEKDAY" links: YES (cached)
Dependency threads found: YES unknown (cached)
Dependency fmt found: YES 7.0.3 (cached)
Dependency spdlog found: YES 1.8.2 (cached)
Dependency wayland-client found: YES 1.18.0 (cached)
Dependency wayland-cursor found: YES 1.18.0 (cached)
Dependency wayland-protocols found: YES 1.20 (cached)
Dependency gtkmm-3.0 found: YES 3.24.2 (cached)
Dependency dbusmenu-gtk3-0.4 found: YES 16.04.0 (cached)
Dependency gio-unix-2.0 found: YES 2.64.5 (cached)
Dependency jsoncpp found: YES 1.9.4 (cached)
Dependency sigc++-2.0 found: YES 2.10.3 (cached)
Found pkg-config: /usr/bin/pkg-config (1.6.3)
Found CMake: /usr/bin/cmake (3.18.5)
Run-time dependency epoll-shim found: NO (tried pkgconfig and cmake)
Dependency libnl-3.0 found: YES 3.5.0 (cached)
Dependency libnl-genl-3.0 found: YES 3.5.0 (cached)
Dependency libpulse found: YES 13.0 (cached)
Dependency libudev found: YES 246 (cached)
Dependency libmpdclient found: YES 2.19 (cached)
Library sndio found: YES
Checking for function "sioctl_open" with dependency -lsndio: YES (cached)
Dependency gtk-layer-shell-0 found: YES 0.1.0 (cached)
Dependency systemd found: YES 246 (cached)
Dependency date (modules: date::date, date::date-tz) found: YES 3.0.0 (cached)
Configuring waybar.service using configuration
Program wayland-scanner found: YES
Program gdbus-codegen found: YES
Dependency scdoc found: YES 1.11.0 (cached)
Program /usr/bin/scdoc found: YES
Program sh found: YES
Configuring waybar.5.scd using configuration
Program clang-tidy found: YES
Build targets in project: 28
Found ninja-1.10.1 at /usr/bin/ninja
[79/88] Compiling C++ object waybar.p/src_modules_custom.cpp.o
In file included from ../include/modules/custom.hpp:7,
from ../src/modules/custom.cpp:1:
../include/util/command.hpp: In function ‘FILE* waybar::util::command::open(const string&, int&)’:
../include/util/command.hpp:64:7: warning: ignoring return value of ‘int pipe(int*)’, declared with attribute warn_unused_result [-Wunused-result]
64 | pipe(fd);
| ~~~~^~~~
[83/88] Compiling C++ object waybar.p/src_modules_sway_ipc_client.cpp.o
../src/modules/sway/ipc/client.cpp: In destructor ‘waybar::modules::sway::Ipc::~Ipc()’:
../src/modules/sway/ipc/client.cpp:17:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
17 | write(fd_, "close-sway-ipc", 14);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/modules/sway/ipc/client.cpp:22:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
22 | write(fd_event_, "close-sway-ipc", 14);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[88/88] Linking target waybar
FAILED: waybar
c++ -o waybar waybar.p/src_factory.cpp.o waybar.p/src_AModule.cpp.o waybar.p/src_ALabel.cpp.o waybar.p/src_modules_custom.cpp.o waybar.p/src_modules_disk.cpp.o waybar.p/src_modules_idle_inhibitor.cpp.o waybar.p/src_modules_temperature.cpp.o waybar.p/src_main.cpp.o waybar.p/src_bar.cpp.o waybar.p/src_client.cpp.o waybar.p/src_util_ustring_clen.cpp.o waybar.p/src_modules_battery.cpp.o waybar.p/src_modules_cpu_common.cpp.o waybar.p/src_modules_cpu_linux.cpp.o waybar.p/src_modules_memory_common.cpp.o waybar.p/src_modules_memory_linux.cpp.o waybar.p/src_modules_sway_ipc_client.cpp.o waybar.p/src_modules_sway_mode.cpp.o waybar.p/src_modules_sway_language.cpp.o waybar.p/src_modules_sway_window.cpp.o waybar.p/src_modules_sway_workspaces.cpp.o waybar.p/src_modules_wlr_taskbar.cpp.o waybar.p/src_modules_river_tags.cpp.o waybar.p/src_modules_network.cpp.o waybar.p/src_modules_pulseaudio.cpp.o waybar.p/src_modules_sni_tray.cpp.o waybar.p/src_modules_sni_watcher.cpp.o waybar.p/src_modules_sni_host.cpp.o waybar.p/src_modules_sni_item.cpp.o waybar.p/src_modules_backlight.cpp.o waybar.p/src_modules_mpd_mpd.cpp.o waybar.p/src_modules_mpd_state.cpp.o waybar.p/src_modules_sndio.cpp.o waybar.p/src_modules_clock.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group -lstdc++fs protocol/libclient_protos.a -pthread /usr/lib64/libwayland-client.so /usr/lib64/libfmt.so /usr/lib64/libspdlog.so /usr/lib64/libsigc-2.0.so /usr/lib64/libjsoncpp.so /usr/lib64/libwayland-cursor.so /usr/lib64/libgtkmm-3.0.so /usr/lib64/libatkmm-1.6.so /usr/lib64/libgdkmm-3.0.so /usr/lib64/libgiomm-2.4.so /usr/lib64/libpangomm-1.4.so /usr/lib64/libglibmm-2.4.so /usr/lib64/libgtk-3.so /usr/lib64/libgdk-3.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libcairo-gobject.so /usr/lib64/libgio-2.0.so /usr/lib64/libcairomm-1.0.so /usr/lib64/libcairo.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libdbusmenu-gtk3.so /usr/lib64/libdbusmenu-glib.so /usr/lib64/libnl-3.so /usr/lib64/libnl-genl-3.so /usr/lib64/libpulse.so /usr/lib64/libudev.so /usr/lib64/libmpdclient.so /usr/lib64/libgtk-layer-shell.so -lsndio /usr/lib64/libdate-tz.so.3.0.0 -Wl,--end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Plug_Class::wrap_new(_GObject*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Socket::get_type()'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Plug::get_type()'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Socket_Class::wrap_new(_GObject*)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I've tried recompiling dependancies several times (emerge gtkmm jsoncpp libsigc++ fmt wayland date spdlog gtk-layer-shell cmake meson scdoc wayland-protocols -e) and am unsure where to go from here.
Am I doing anything wrong? Can anyone help me to compile waybar on my machine? Thanks in advance.
I've fixed my issue, I needed to recompile dependencies with the "X" use flag; once I added it to /etc/portage/make.conf and re-emerged everything compiled just fine.
I'm unable to compile waybar on gentoo (kernel 5.4.97)
The output of the
emerge --info
command listed in that log is as followsI also get the same error when I try compiling waybar without using portage (following the instructions under 'building from source' in this repository's readme)
I've tried recompiling dependancies several times (
emerge gtkmm jsoncpp libsigc++ fmt wayland date spdlog gtk-layer-shell cmake meson scdoc wayland-protocols -e
) and am unsure where to go from here.Am I doing anything wrong? Can anyone help me to compile waybar on my machine? Thanks in advance.