GTK 2 to 3 issues

After update to latest sources cmake complained about missing GTK3.
I solved this using the install-dependencies shellscript from the kicad-ci project.
Release compile and install now seems without error messages but invoking kicad crashes:

(kicad:3209): Gtk-ERROR **: 21:34:39.260: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)

System is Ubuntu 19.1 LTS - what to do ?

A search on that phrase shows that this is an old issue that happens to any Gtk program when both 2 and 3 libraries are linked to the same executable. You could try

ldd kicad

(you need the path to the kicad binary) to see what dynamic libraries are required by the executable and then install the devel package for the ones that are still 2 and rebuild. If you succeed then report the bug as incomplete dependency list.

Do a clean build instead of incremental. Dump cmake cache as well.

This is probably happening because your build is still using a GTK2 version of wxWidgets instead of a GTK3 version, and we now have GTK3 as an explicit dependency in the KiCad code (so GTK2 isn’t able to be used anymore).

Verify that you have installed the GTK3 version of wxWidgets for your distribution and then do a clean configure/build with that version.

1 Like

Assume a clean build (it was clean) I had success by using Synaptic front end to remove previous wxCommon what then reported:

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS) (Required is at least version “3.0.0”)

Then install again:
Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_gl-3.0;-lwx_gtk3u_aui-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_html-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_gtk3u_propgrid-3.0;-lwx_baseu_xml-3.0;-lwx_gtk3u_stc-3.0 (found suitable version “3.0.4”, minimum required is “3.0.0”)

It reported before:
Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_stc-3.0 (found suitable version “3.0.4”, minimum required is “3.0.0”)

Shouldn’t that be resolved by automatically ?

That sounds like cmake cache issue, like I guessed earlier.
Edit to elaborate: the issue was not that you didn’t have the correct dependencies installed, it was that cmake had some build flags for gtk2 remembered in it’s cache from the previous build that were not cleared properly when you switched to gtk3.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.