public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Christoph Erhardt <fedora@sicherha.de>
To: git-commits@fedoraproject.org
Subject: [rpms/mold] rawhide: Fix `MOLD_LIBDIR` getting ignored (#2576129)
Date: Thu, 19 Nov 2026 08:24:50 GMT	[thread overview]
Message-ID: <179507669076.1.126829660911470575.rpms-mold-913f93cec77b@fedoraproject.org> (raw)

            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) || :

                 reply	other threads:[~2026-11-19  8:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179507669076.1.126829660911470575.rpms-mold-913f93cec77b@fedoraproject.org \
    --to=fedora@sicherha.de \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox