Glade won't start: symbol lookup error

Running Xubuntu 18.04 x86_64.

Installed Glade with

# apt install glade

When I try to run it:

$ glade
glade: symbol lookup error: glade: undefined symbol: gdk_broadway_display_get_type

Presumably a missing or wrong version of some shared library. Grateful for any hints on how to track it down.

Edited to add output from

$ ldd /usr/bin/glade | grep local libgtk-3.so.0 => /usr/local/lib/libgtk-3.so.0 (0x00007f27b0fb0000) libgdk-3.so.0 => /usr/local/lib/libgdk-3.so.0 (0x00007f27b0cc6000)
1

2 Answers

The ldd output gave me an idea ... a long time ago I built a GTK component from source, and it seems to have installed its own version of libgtk-3.so. Uninstalling the changed package fixed the Glade problem. I guess I'll have to rebuild the package to a later version of GTK.

@N0rbert: Many thanks for the assistance.

This is because of the mechanism of shared libraries of Linux. Once some functions is deprecated from specific dynamic library, old softwares still reference these deprecated functions, which will cause this issue.

However, it's not easy to find the relevant version of '.so' (libgtk-3.so in this case). So I decided to use stub feature to solve it. Luckily I found the declaretion of gdk_broadway_display_get_type in GTK soure code. Just like below showing code:

unsigned long gdk_broadway_display_get_type()

Fix steps:

  1. Write following code in our file. Named gdk_broadway_display_get_type.c
 unsigned long gdk_broadway_display_get_type() { // I don't care what should be return, just make glade can be open successfully return 0; }
  1. Compile and generate '.so' file
 gcc -DMYMOCK -shared -fPIC -o libgdkpatch.so gdk_broadway_display_get_type.c -ldl sudo cp libgdkpatch.so /usr/lib/
  1. Test in terminal (Execute following command in terminal)
 LD_PRELOAD=libgdkpatch.so glade
  1. Adapte execute command in desktop file

    1). locate the desktop file

    locate Glade.desktop

    2). open desktop file

    sudo vim /usr/share/applications/org.gnome.Glade.desktop

    3). modify exec command

    Exec=LD_PRELOAD=libgdkpatch.so glade %F

    4). install desktop file

    sudo desktop-file-install /usr/share/applications/org.gnome.Glade.desktop

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like