public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mold] rawhide: Fix `MOLD_LIBDIR` getting ignored (#2576129)
@ 2026-11-19  8:24 Christoph Erhardt
  0 siblings, 0 replies; only message in thread
From: Christoph Erhardt @ 2026-11-19  8:24 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/mold
            Branch : rawhide
            Commit : 913f93cec77b0fd758da276e737b9de739e6e8b7
            Author : Christoph Erhardt <fedora@sicherha.de>
            Date   : 2026-11-19T09:24:39+01:00
            Stats  : +4/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/mold/c/913f93cec77b0fd758da276e737b9de739e6e8b7?branch=rawhide

            Log:
            Fix `MOLD_LIBDIR` getting ignored (#2576129)

The `%cargo_build` and `%cargo_test` macros are expanded to text that
begins with a newline. This breaks the single-line environment-variable
syntax. Use `export` instead.

This caused `mold -run` to look in the wrong directory
(`/usr/local/lib`) and fail with the following error message:
```
mold: fatal: mold-wrapper.so is missing
```

---
diff --git a/mold.spec b/mold.spec
index 9574178..0a68dab 100644
--- a/mold.spec
+++ b/mold.spec
@@ -77,7 +77,8 @@ build time, especially in rapid debug-edit-rebuild cycles.
 # Set `MOLD_LIBDIR` in the build, check and install steps so `mold-wrapper.so`
 # is installed to (and searched in) the correct directory. This can be dropped
 # when packaging the next release.
-MOLD_LIBDIR="%{_libdir}" %cargo_build
+export MOLD_LIBDIR="%{_libdir}"
+%cargo_build
 %{cargo_license_summary}
 %{cargo_license} > LICENSE.dependencies
 
@@ -90,7 +91,8 @@ touch %{buildroot}%{_bindir}/ld
 
 %if %{with check}
 %check
-MOLD_LIBDIR="%{_libdir}" %cargo_test
+export MOLD_LIBDIR="%{_libdir}"
+%cargo_test
 # Print skipped tests
 (cd target/rpm/mold-test/out/test/results &&
   grep --files-with-matches --line-regexp skip */*.status) || :

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-19  8:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19  8:24 [rpms/mold] rawhide: Fix `MOLD_LIBDIR` getting ignored (#2576129) Christoph Erhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox