main: Add private libdirs to GIR's list of search paths for scanned libraries
This is not strictly necessary when linking the shell with DT_RPATH as the runtime paths will be extracted from the introspected libraries and used from gobject introspection to find them when loading them based on the typelib files, but when linking with DT_RUNPATH, as it's the case for some linkers (e.g. ld.gold, or ld.bfd in some distros like Debian). By explicitly prepending this directory as a library path for GIR, we're making sure that the wrapped shared objects installed in Mutter's and GNOME Shell's private directories can be found in all cases. https://bugzilla.gnome.org/show_bug.cgi?id=777519
This commit is contained in:
parent
41c57695a8
commit
1518a778ed
@ -200,6 +200,14 @@ shell_introspection_init (void)
|
||||
|
||||
g_irepository_prepend_search_path (MUTTER_TYPELIB_DIR);
|
||||
g_irepository_prepend_search_path (GNOME_SHELL_PKGLIBDIR);
|
||||
|
||||
/* We need to explicitly add the directories where the private libraries are
|
||||
* installed to the GIR's library path, so that they can be found at runtime
|
||||
* when linking using DT_RUNPATH (instead of DT_RPATH), which is the default
|
||||
* for some linkers (e.g. gold) and in some distros (e.g. Debian).
|
||||
*/
|
||||
g_irepository_prepend_library_path (MUTTER_TYPELIB_DIR);
|
||||
g_irepository_prepend_library_path (GNOME_SHELL_PKGLIBDIR);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user