Created attachment 1729734 [details] Small example program to demonstrate the issue Description of problem: On Fedora 33, derived widgets do not seem to be constructed properly by Gtk::Builder::get_widget_derived() as the overridden methods are not called for these widgets. Apart from that everything seems normal. No error message or anything. How reproducible: I attached a sample code with a very simple case to replicate this problem. on_button_press_event() is never called for the derived widget. I have also noticed that if a dummy instance of the derived widget is created separately (using another constructor) before calling Gtk::Builder::add_from_string(), then the widget created by Builder also works normally.
Could you report this upstream at https://gitlab.gnome.org/GNOME/gtkmm/-/issues , please? We don't have any downstream code changes in Fedora and it's almost certainly an upstream issue.
I believe this is caused by https://fedoraproject.org/wiki/LTOByDefault If you "objdump -C -S /usr/lib64/libgtkmm-3.0.so.1.1.0" you can see the Gtk::wrap_init function does not contain all the calls to e.g. Gtk::AboutDialog::get_type() I built the srpm and noticed that the get_type() calls were present in wrap_init.o but was missing from the .so I added %define _lto_cflags %{nil} to the gtkmm .spec file and rebuilt; the get_type() were then present in the .so This probably needs to be added to the spec file for all *mm packages.
I've opened https://src.fedoraproject.org/rpms/gtkmm30/pull-request/3 to disable LTO. If that PR is doing the right thing I can go through the other -mm packages.
Hey, thanks for the PR! I think it would be better to get the upstream fix that's in glibmm24 (https://gitlab.gnome.org/GNOME/glibmm/-/commit/ceececea0f659bce5fff8835f1ed99238871a24c) into Fedora and then rebuild gtkmm30 and anything else that's affected. Let me quickly do that and then you can give it a try to see if it makes things work correctly for you.
FEDORA-2020-e2d08f99e7 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e2d08f99e7
FEDORA-2020-e2d08f99e7 has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e2d08f99e7` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e2d08f99e7 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-e2d08f99e7 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.