GNU bug report logs - #61284
[rust] Segfault when trying to download dependencies using Cargo

Previous Next

Package: guix;

Reported by: Albin Otterhäll <albin <at> a12l.xyz>

Date: Sun, 5 Feb 2023 00:29:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Johannes Nix <jnxx <at> posteo.net>
To: 61284 <at> debbugs.gnu.org
Subject: bug#61284: [rust] Segfault when trying to download dependencies using Cargo
Date: Fri, 01 Aug 2025 20:53:18 +0000
> 
> mve $ cargo build
>     Updating crates.io index
> Segmentation fault (core dumped)

I am very new to Guix System - just installed it this
morning.

However, I seem to have had the same issue today,
and apparently found a workaroung.

I tried to run it under strace and it indicated that
apparently it segfaults when it tries to find and
parse several git config files, especially
$HOME/.gitconfig .

Found on the web multiple suggestions that these config
files might be faulty - but I could not find any fault
in my file.

Instead, I found a workaround that might help you:

I set the environment variable

export CARGO_NET_GIT_FETCH_WITH_CLI=true


which changes the way in which cargo uses git.
With this, it works for me.

On top of that, I had further errors with cargo 
which might or might not be unrelated, when doing a
"cargo build". There it looks like rust-cargo and
rustc-1.82.0 are somehow out of sync, leading cargo to
query rustc for a profile option which is not supported by
rustc (print-split-debuginfo). Roughly, it is failing
with this error message, which relates to a much older
version:

https://github.com/kbknapp/cargo-outdated/issues/355

But, *both* errors only happen on my new Guix System
installation, not in Guix package manager on top
of Debian 12 with the same rust-cargo version.


I'll make a separate bug tracking entry for that one
(I need to capture the output and check the version
numbers again).

I suspicion I have is that actually one of rustc or
cargo might actually refer to an out-dated version,
causing a mismatch. Perhaps because of an ci glitch.

Perhaps it is informative to check the installed
version with "cargo -vV" ? One important point
is surely to not mix up manually installed binaries
and the Guix-installed ones... but I am still new
and confused by all this.

--

Johannes Nix





This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.