From: Todd Zullinger <tmz@pobox.com>
To: William Pursell <william.r.pursell@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Bug: Makefile ignores CARGO_TARGET_DIR
Date: Tue, 28 Jul 2026 14:01:38 -0400 [thread overview]
Message-ID: <20260728180138.6TN1pzgr@teonanacatl.net> (raw)
In-Reply-To: <CAJPQ5NbTLnbe_VU1awCVggw5m9kGdBZssrZBp8G0YxcMjb_rwA@mail.gmail.com>
William Pursell wrote:
> The Makefile hardcodes the path to the Rust static library at line
> 962, but the cargo invocation at line 3036 does not override
> CARGO_TARGET_DIR. (line numbers are relative to 9a0c4701)
>
> When CARGO_TARGET_DIR is set in the environment, the link step fails:
>
> clang: error: no such file or directory: 'target/release/libgitcore.a'
If the fix simply to add `--target $*` as is used a few
lines below in RUST_MEMBER_LIBS, e.g.:
diff --git i/Makefile w/Makefile
index 98e995e4be..fa6e4b2702 100644
--- i/Makefile
+++ w/Makefile
@@ -3034,7 +3034,7 @@ $(LIB_FILE): $(LIB_OBJS)
ifndef NO_RUST
ifeq ($(RUST_TARGETS),)
$(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
- $(QUIET_CARGO)cargo build $(CARGO_ARGS)
+ $(QUIET_CARGO)cargo build $(CARGO_ARGS) --target $*
else
ifneq ($(words $(RUST_TARGETS)),1)
ifneq ($(uname_S),Darwin)
Does this also affect the `cargo build` calls in the
libgit-sys and libgit-rs make targets (~lines 4090 and
4092)?
--
Todd
prev parent reply other threads:[~2026-07-28 18:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 11:46 Bug: Makefile ignores CARGO_TARGET_DIR William Pursell
2026-07-28 18:01 ` Todd Zullinger [this message]
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=20260728180138.6TN1pzgr@teonanacatl.net \
--to=tmz@pobox.com \
--cc=git@vger.kernel.org \
--cc=william.r.pursell@gmail.com \
/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