Skip to content

Instantly share code, notes, and snippets.

@filter-eq
Created September 1, 2021 00:26
Show Gist options
  • Save filter-eq/e1e6a4b4a26ca1c6725196001200b77d to your computer and use it in GitHub Desktop.
Save filter-eq/e1e6a4b4a26ca1c6725196001200b77d to your computer and use it in GitHub Desktop.
gtk4 and gtk3, pango library error.
$ ./exampleapp
./exampleapp: symbol lookup error: /opt/gtk/lib/x86_64-linux-gnu/libgtk-4.so.1: undefined symbol: pango_fc_font_get_languages
$ ldd exampleapp | grep pango
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f6f38dc3000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f6f38d74000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f6f38d3c000)
using old pango library.
new one is under
/opt/gtk/lib/x86_64-linux-gnu
so, add shared library path file to /etc/ld.so.conf.d/
$ sudo vi /etc/ld.so.conf.d/opt_gtk_lib.conf
add a line:
/opt/gtk/lib/x86_64-linux-gnu
$ sudo ldconfig -v
$ ldd exampleapp
libpangocairo-1.0.so.0 => /opt/gtk/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f171d5c0000)
libpango-1.0.so.0 => /opt/gtk/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f171d56f000)
libpangoft2-1.0.so.0 => /opt/gtk/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f171d537000)
correct library ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment