Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619296 - dev-cpp/gtkmm-3.22.0: libgtkmm-3.0.so: undefined reference to `Gtk::Plug_Class::wrap_new(_GObject*)'
Summary: dev-cpp/gtkmm-3.22.0: libgtkmm-3.0.so: undefined reference to `Gtk::Plug_Clas...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 774687 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-21 19:39 UTC by Dainius Masiliūnas
Modified: 2022-09-24 03:43 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_619296.txt,79.14 KB, text/plain)
2017-05-21 19:39 UTC, Dainius Masiliūnas
Details
emerge --info (file_619296.txt,5.17 KB, text/plain)
2017-05-21 19:42 UTC, Dainius Masiliūnas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dainius Masiliūnas 2017-05-21 19:39:28 UTC
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.
Comment 1 Dainius Masiliūnas 2017-05-21 19:42:24 UTC
Created attachment 473718 [details]
emerge --info
Comment 2 Dainius Masiliūnas 2017-05-22 20:54:46 UTC
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".
Comment 3 Dainius Masiliūnas 2017-05-22 21:11:09 UTC
And now I recompiled gtkmm with USE="X" and I no longer get these linking errors. So seems like a dependency issue?
Comment 4 Jonas Stein gentoo-dev 2017-05-23 07:31:03 UTC
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.
Comment 5 Dainius Masiliūnas 2017-05-23 07:40:25 UTC
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).
Comment 6 Kobboi 2017-09-19 22:47:00 UTC
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.
Comment 7 Ionen Wolkens gentoo-dev 2021-02-05 16:52:55 UTC
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).
Comment 8 Ionen Wolkens gentoo-dev 2021-03-08 03:25:29 UTC
*** Bug 774687 has been marked as a duplicate of this bug. ***
Comment 9 Matt Turner gentoo-dev 2022-09-24 03:07:27 UTC
(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.
Comment 10 Larry the Git Cow gentoo-dev 2022-09-24 03:43:07 UTC
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(-)