Created attachment 473716 [details] build.log Attempting to build gnome-system-monitor on GCC 6, amd64 results in a link failure: /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Plug_Class::wrap_new(_GObject*)' /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Socket::get_type()' /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Plug::get_type()' /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libgtkmm-3.0.so: undefined reference to `Gtk::Socket_Class::wrap_new(_GObject*)' collect2: error: ld returned 1 exit status Build log is attached.
Created attachment 473718 [details] emerge --info
Same issue when compiling pavucontrol. So this is in fact a libgtkmm issue instead. Renaming. I'm using dev-cpp/gtkmm-3.22.0 with USE="wayland -X -aqua -doc -test".
And now I recompiled gtkmm with USE="X" and I no longer get these linking errors. So seems like a dependency issue?
Perhaps you updated gcc and did not recompile enough packages. I understand that the problem is solved and was no problem in the ebuild, please reopen, if I am wrong.
No, it is an ebuild problem, because the only thing I did to solve it is to set USE="X". Before I did not have any of the *mm packages installed at all, and I switched to GCC 6 at the very beginning of Gentoo installation. So the ebuild should require USE="X" under some conditions (gtk+ with USE="X" compiled, perhaps). Unless it's the users of gtkmm that should require it with USE="X" instead (like I said, both gnome-system-monitor and pavucontrol had this problem).
The gtkmm source code: (1) disables some code based on --{en,dis}able-x11-backend (which traces back to the X use flag on dev-cpp/gtkmm) (2) disables some code based on the GDK_WINDOWING_X11 define from /usr/include/gtk-3.0/gdk/gdkconfig.h (which traces back to the X use flag on x11-libs/gtk+) With gtk+[X] and gtkmm[-X], this result is a library with unresolved symbols because they are referred to in ./gtk/gtkmm/wrap_init.cc (2) but not provided by any other object file (1) I will try to fix this in gtkmm and push upstream.
ping, this bug seems still valid nearly 4 years later Believe should use something along the lines of aqua=,wayland=,X= rather than X? bit like cairomm already do for cairo (with aqua=,svg=,X=). Seen someone with gtk[X] and gtkmm[-X] and it caused a failure building inkscape (inkscape can be built with gtk[-X] and gtkmm[-X], but mismatch would cause this).
*** Bug 774687 has been marked as a duplicate of this bug. ***
(In reply to Kobboi from comment #6) > The gtkmm source code: > > (1) disables some code based on --{en,dis}able-x11-backend (which traces > back to the X use flag on dev-cpp/gtkmm) > (2) disables some code based on the GDK_WINDOWING_X11 define from > /usr/include/gtk-3.0/gdk/gdkconfig.h (which traces back to the X use flag on > x11-libs/gtk+) > > With gtk+[X] and gtkmm[-X], this result is a library with unresolved symbols > because they are referred to in ./gtk/gtkmm/wrap_init.cc (2) but not > provided by any other object file (1) > > I will try to fix this in gtkmm and push upstream. Thank you. This is spot on.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fba3cdca284ff7939db0e28236a9f96dd2a85ac9 commit fba3cdca284ff7939db0e28236a9f96dd2a85ac9 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-09-24 03:08:01 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-09-24 03:42:58 +0000 dev-cpp/gtkmm: Depend on x11-libs/gtk+[X=] Closes: https://bugs.gentoo.org/619296 Signed-off-by: Matt Turner <mattst88@gentoo.org> dev-cpp/gtkmm/gtkmm-3.24.6-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)