[gnome-shell] main: Add private libdirs to GIR's list of search paths for scanned libraries
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] main: Add private libdirs to GIR's list of search paths for scanned libraries
- Date: Thu, 10 Aug 2017 18:49:20 +0000 (UTC)
commit 1518a778ed84ceca81f0ec5bccf690816b958c3b
Author: Mario Sanchez Prada <mario endlessm com>
Date: Thu Aug 10 20:47:59 2017 +0200
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
src/main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 660b60e..9a89aa4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]