From 265b488093d9f5aee0e21bfd86719e84c7eb4b6c Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Thu, 7 Aug 2025 21:04:58 -0300 Subject: [PATCH] gobject-introspection: Fix introspection failing on Linux with subproject GLib This is caused by RPATHs missing when glib, gobject, or gio are supplied by uninstalled pkg-config modules (as opposed to directly in the command line). Fixes #4561 Part-of: --- subprojects/gobject-introspection.wrap | 2 +- ...spection-binaries-missing-rpaths-for.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 subprojects/packagefiles/gobject-introspection-1.84.0/0010-dumper-Fix-introspection-binaries-missing-rpaths-for.patch diff --git a/subprojects/gobject-introspection.wrap b/subprojects/gobject-introspection.wrap index f09c41d911..f1985ef9b6 100644 --- a/subprojects/gobject-introspection.wrap +++ b/subprojects/gobject-introspection.wrap @@ -5,7 +5,7 @@ source_fallback_url = https://ftp.acc.umu.se/pub/gnome/sources/gobject-introspec source_filename = gobject-introspection-1.84.0.tar.xz source_hash = 945b57da7ec262e5c266b89e091d14be800cc424277d82a02872b7d794a84779 wrapdb_version = 1.84.0-0 -diff_files = gobject-introspection-1.84.0/0003-girepository-Load-typelibs-from-a-relocatable-prefix.patch, gobject-introspection-1.84.0/0004-build-Fix-b_vscrt-value-use-without-converting-it-to.patch, gobject-introspection-1.84.0/0006-tests-Fix-path-parsing-for-Windows.patch, gobject-introspection-1.84.0/0007-g-ir-tools-Support-reading-rspfiles-for-arguments.patch, gobject-introspection-1.84.0/0008-meson-Fix-fs.copyfile-semantics-breaking-GIR-build-w.patch, gobject-introspection-1.84.0/0009-giscanner-Deduplicate-arguments-and-use-response-fil.patch +diff_files = gobject-introspection-1.84.0/0003-girepository-Load-typelibs-from-a-relocatable-prefix.patch, gobject-introspection-1.84.0/0004-build-Fix-b_vscrt-value-use-without-converting-it-to.patch, gobject-introspection-1.84.0/0006-tests-Fix-path-parsing-for-Windows.patch, gobject-introspection-1.84.0/0007-g-ir-tools-Support-reading-rspfiles-for-arguments.patch, gobject-introspection-1.84.0/0008-meson-Fix-fs.copyfile-semantics-breaking-GIR-build-w.patch, gobject-introspection-1.84.0/0009-giscanner-Deduplicate-arguments-and-use-response-fil.patch, gobject-introspection-1.84.0/0010-dumper-Fix-introspection-binaries-missing-rpaths-for.patch [provide] dependency_names = gobject-introspection-1.0 diff --git a/subprojects/packagefiles/gobject-introspection-1.84.0/0010-dumper-Fix-introspection-binaries-missing-rpaths-for.patch b/subprojects/packagefiles/gobject-introspection-1.84.0/0010-dumper-Fix-introspection-binaries-missing-rpaths-for.patch new file mode 100644 index 0000000000..9fd179688a --- /dev/null +++ b/subprojects/packagefiles/gobject-introspection-1.84.0/0010-dumper-Fix-introspection-binaries-missing-rpaths-for.patch @@ -0,0 +1,37 @@ +From 88629d7277139ec53e71bd54fce5e8ae8cc6fe99 Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" +Date: Thu, 7 Aug 2025 20:20:29 -0300 +Subject: [PATCH] dumper: Fix introspection binaries missing rpaths for + uninstalled ELF shlibs + +Same as 6ffb7c06a35c05661dce997af4dfd83e8b3e024d, in this case +dependencies that were resolved by pkg-config to uninstalled modules do +not entail adding RPATH entries. This will affect gio and gmodule by +default (see DumpCompiler.__init__), but also any dependency supplied with +--pkg. + +Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4561 +--- + giscanner/dumper.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/giscanner/dumper.py b/giscanner/dumper.py +index 96bcd845..e5678637 100644 +--- a/giscanner/dumper.py ++++ b/giscanner/dumper.py +@@ -253,9 +253,11 @@ class DumpCompiler(object): + args.extend(pkg_config_libs) + self._compiler.get_external_link_flags(args, self._options.libraries) + +- if sys.platform == 'darwin': ++ if sys.platform in ('darwin', 'linux'): + # If the libraries' ID are of the form (@rpath/libfoo.dylib), + # then nothing previously can have added the needed rpaths ++ # For the linux case, covers when uninstalled libraries ++ # supplied transitive requirements + rpath_entries_to_add = [lib.replace('-L/', '-Wl,-rpath,/') for lib in pkg_config_libs if lib.startswith('-L/')] + args.extend(rpath_entries_to_add) + +-- +2.39.5 (Apple Git-154) +