Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] osxkeychain: fix build with Rust
Date: Thu, 18 Jun 2026 08:30:37 +0200	[thread overview]
Message-ID: <ajOQjfLXQwdEB6Hl@pks.im> (raw)
In-Reply-To: <xmqq8q8d1ixq.fsf@gitster.g>

On Wed, Jun 17, 2026 at 04:54:09AM -0700, Junio C Hamano wrote:
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
> 
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Without NO_RUST defined, the varint encoder/decoder lives in the
> > RUST_LIB, which needs to be linked. Symptom:
> >
> > cc [... -o contrib/credential/osxkeychain/git-credential-osxkeychain [...]
> > Undefined symbols for architecture x86_64:
> >   "_decode_varint", referenced from:
> >       _read_untracked_extension in libgit.a[x86_64][63](dir.o)
> >       _read_untracked_extension in libgit.a[x86_64][63](dir.o)
> >       _read_one_dir in libgit.a[x86_64][63](dir.o)
> >       _read_one_dir in libgit.a[x86_64][63](dir.o)
> >       _load_cache_entry_block in libgit.a[x86_64][174](read-cache.o)
> >   "_encode_varint", referenced from:
> >       _write_untracked_extension in libgit.a[x86_64][63](dir.o)
> >       _write_untracked_extension in libgit.a[x86_64][63](dir.o)
> >       _write_untracked_extension in libgit.a[x86_64][63](dir.o)
> >       _write_one_dir in libgit.a[x86_64][63](dir.o)
> >       _write_one_dir in libgit.a[x86_64][63](dir.o)
> >       _do_write_index in libgit.a[x86_64][174](read-cache.o)
> > ld: symbol(s) not found for architecture x86_64
> >
> > While it is curious why these functions are needed at all (osxkeychain
> > does not read or write the index), the compile error is a real problem.
> >
> > Instead of trying to play games to add `GITLIBS` while filtering out
> > `common-main.o`, replace the `$(LIB_FILE) $(EXTLIBS)` construct with the
> > much shorter `$(LIBS)` construct that _already_ filters out
> > `common-main.o` and adds the Rust library when needed.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> 
> Hmph, we do not build this at GitHub Actions based CI?  Just being
> curious.

We build it with Meson, but not with our Makefile. And in Meson things
are working alright.

> Let me take this directly to 'master' before tagging -rc1.  Thanks.

Makes sense.

Patrick

      reply	other threads:[~2026-06-18  6:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 10:11 [PATCH] osxkeychain: fix build with Rust Johannes Schindelin via GitGitGadget
2026-06-17 11:54 ` Junio C Hamano
2026-06-18  6:30   ` Patrick Steinhardt [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=ajOQjfLXQwdEB6Hl@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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