guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 442444304394651c362d24cf29ad56fcbcdb75f7
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Tue Mar 31 08:05:58 2026 +0200
gnu: meson: Keep vicinity of $prefix in RUNPATH.
* gnu/packages/patches/meson-keep-rpath-vicinity.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/build-tools.scm (meson)[patches]: Use it.
Merges: guix/guix!7583
Fixes: https://issues.guix.gnu.org/70349 (RUNPATH validation fails with
Clang+Meson)
Change-Id: I79551bd3770e36009fe26f88074d5793fd18ad18
Signed-off-by: NoƩ Lopez <[email protected]>
---
gnu/local.mk | 1 +
gnu/packages/build-tools.scm | 3 ++-
.../patches/meson-keep-rpath-vicinity.patch | 25 ++++++++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 4e4172174f..c346b60807 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1946,6 +1946,7 @@ dist_patch_DATA =
\
%D%/packages/patches/mediasdk-gcc-14.patch \
%D%/packages/patches/memtest86+-build-reproducibly.patch \
%D%/packages/patches/mercurial-hg-extension-path.patch \
+ %D%/packages/patches/meson-keep-rpath-vicinity.patch \
%D%/packages/patches/meson-gir-fallback-path.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mia-fix-boost-headers.patch \
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 224ee67912..3eba74f384 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -539,7 +539,8 @@ files and generates build instructions for the Ninja build
system.")
(base32
"13a9pj7d2mxgv5gbd78di4pb4w722vjis0vmk38m1vdm95v2f9yd"))
(patches
- (search-patches "meson-gir-fallback-path.patch"))))
+ (search-patches "meson-gir-fallback-path.patch"
+ "meson-keep-rpath-vicinity.patch"))))
(build-system gnu-build-system)
(arguments
(list
diff --git a/gnu/packages/patches/meson-keep-rpath-vicinity.patch
b/gnu/packages/patches/meson-keep-rpath-vicinity.patch
new file mode 100644
index 0000000000..163b18422f
--- /dev/null
+++ b/gnu/packages/patches/meson-keep-rpath-vicinity.patch
@@ -0,0 +1,25 @@
+This patch provides a roundabout way of keeping "$prefix/..", i.e. the store
+directory, in DT_RPATH/DT_RUNPATH. See <https://issues.guix.gnu.org/70349>
+for motivation.
+
+Upstream-Status: Not submitted.
+
+--- a/mesonbuild/build.py
++++ b/mesonbuild/build.py
+@@ -1826,6 +1826,7 @@ class BuildTarget(Target):
+ def rpaths_for_non_system_absolute_shared_libraries(self, exclude_system:
bool = True) -> ImmutableListProtocol[str]:
+ paths: OrderedSet[str] = OrderedSet()
+ srcdir = self.environment.get_source_dir()
++ vicinity = os.path.dirname(self.prefix)
+
+ system_dirs = set()
+ if exclude_system:
+@@ -1840,7 +1841,7 @@ class BuildTarget(Target):
+ if dep.type_name not in {'library', 'pkgconfig', 'cmake'}:
+ continue
+ for libpath in dep.link_args:
+- if libpath.startswith('-'):
++ if libpath.startswith('-') or libpath.startswith(vicinity):
+ continue
+ # For all link args that are absolute paths to a library
file, add RPATH args
+ if not os.path.isabs(libpath):