Sample Header Ad - 728x90

How to detect undefined symbols in shared libraries or objects?

0 votes
0 answers
336 views
My Linux distribution (openSUSE Slowroll) accidentally shipped some incompatible libraries recently due to its experimental nature, lacking adequate automated testing using openQA, that caused the desktop environment and other programs like flatpak to crash on startup. The relevant errors:
Oct 10 09:05:09 suse-pc gnome-shell: JS ERROR: GLib.Error g-invoke-error-quark: Could not locate g_settings_bind_with_mapping_closures: 'g_settings_bind_with_mapping_closures': /lib64/libgio-2.0.so.0: undefined symbol: g_settings_bind_with_mapping_closures
Oct 14 03:07:36 suse-pc atomic-update: flatpak: symbol lookup error: /lib64/libgobject-2.0.so.0: undefined symbol: g_sort_array
I have a simple program I use to perform atomic updates, so I was wondering if there was a way to detect these undefined symbols in shared libraries/objects, so the faulty update can be discarded instead of being applied. Thanks! --- EDIT 1: I found an easy way to detect incompatible libraries was to print the version string for the program being tested:
pavin@suse-laptop:~/Downloads> gnome-control-center --version
gnome-control-center: symbol lookup error: /lib64/libgoa-backend-1.0.so.2: undefined symbol: adw_button_row_get_type, version LIBADWAITA_1_0
As @MarcusMüller said in the comments, this may not work always. So it is necessary to perform the check for a list of all essential programs you need.
Asked by Pavin Joseph (276 rep)
Oct 28, 2024, 08:57 AM
Last activity: Oct 28, 2024, 04:01 PM