Bug 1154817 - "cargo build" issues with rust-1.38.0
"cargo build" issues with rust-1.38.0
Status: REOPENED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Federico Mena Quintero
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-23 08:01 UTC by Ralf Haferkamp
Modified: 2021-10-31 22:29 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Haferkamp 2019-10-23 08:01:01 UTC
I am currently trying to build https://github.com/firecracker-microvm/firecracker.git (but other rust project show the same issue) on tumbleweed and always get this:

----------------------
~/firecracker> cargo build 
    Updating crates.io index
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  invalid version 3 on git_proxy_options; class=Invalid (3)
----------------------

Digging through the upstream bugs report I came accross:
https://github.com/rust-lang/rust/issues/63476

Which points at an issue with the libgit2 integration. Which itself leads to
https://github.com/rust-lang/git2-rs/issues/458. I am by no means a rust expert but I if I understand correctly the recommendation is to build rust with the bundled libgit2 instead of using the system provide one. Which means we'd need to remove the LIBGIT2_SYS_USE_PKG_CONFIG=1 from our spec files (AFAIU this is also how the package is build on Fedora)

Another possible fix is outlined here (and parently in use on FreeBSD):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239785
using this patch:
https://svnweb.freebsd.org/ports/head/lang/rust-nightly/files/patch-vendor_libgit2-sys_lib.rs?view=log&pathrev=509173
Comment 1 Ralf Haferkamp 2019-10-23 10:07:34 UTC
I have created https://build.opensuse.org/request/show/742099 as a suggested fix. Feel free to take another approach.
Comment 2 Simon Renger 2019-11-01 14:37:49 UTC
Also the case with cargo install

------------------------------------------
simon@android-b88d2c9030cc7b02:~/git/quest-api> cargo install actix-web
    Updating crates.io index
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  invalid version 3 on git_proxy_options; class=Invalid (3)
Comment 3 Ralf Haferkamp 2020-02-27 16:55:53 UTC
The suggested fix was merged a while ago. So I guess we can close this.
Comment 5 Swamp Workflow Management 2020-07-06 16:13:58 UTC
openSUSE-SU-2020:0933-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1115645,1154817,1173202
CVE References: CVE-2020-1967
Sources used:
openSUSE Leap 15.1 (src):    rust-1.43.1-lp151.5.13.1, rust-cbindgen-0.14.1-lp151.8.2
Comment 6 Swamp Workflow Management 2020-07-07 10:13:14 UTC
openSUSE-SU-2020:0945-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1115645,1154817,1173202
CVE References: CVE-2020-1967
Sources used:
openSUSE Leap 15.2 (src):    rust-1.43.1-lp152.3.5.1, rust-cbindgen-0.14.1-lp152.2.4.1
Comment 7 Swamp Workflow Management 2020-07-24 16:20:42 UTC
SUSE-SU-2020:2041-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1115645,1154817,1173202
CVE References: CVE-2020-1967
Sources used:
SUSE Linux Enterprise Module for Development Tools 15-SP2 (src):    rust-1.43.1-12.1
SUSE Linux Enterprise Module for Development Tools 15-SP1 (src):    rust-1.43.1-12.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Konstantin Voinov 2021-10-17 07:01:21 UTC
Hi,

It happened again with TW 20211012

>cargo build
warning: unused manifest key: package.git2
    Updating crates.io index
error: failed to get `clap` as a dependency of package `yabridgectl v3.6.0 (/media/src/src/audio/yabridge/tools/yabridgectl)`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  invalid version 0 on git_proxy_options; class=Invalid (3)


Name        : rust1.55
Version     : 1.55.0
Release     : 1.3

Name        : cargo1.55
Version     : 1.55.0
Release     : 1.3

Name        : libgit2-1_2
Version     : 1.2.0
Release     : 1.1
Comment 11 Andreas Schneider 2021-10-28 05:49:00 UTC
cargo vendor fails for me on Tumbleweed:

Caused by:
  invalid version 0 on git_proxy_options; class=Invalid (3)


Is it possible that cargo need to be rebuilt against libgit2 as they broke the ABI?
Comment 12 William Brown 2021-10-31 22:29:50 UTC
(In reply to Andreas Schneider from comment #11)
> cargo vendor fails for me on Tumbleweed:
> 
> Caused by:
>   invalid version 0 on git_proxy_options; class=Invalid (3)
> 
> 
> Is it possible that cargo need to be rebuilt against libgit2 as they broke
> the ABI?

Yes, there is already a fix in the pipeline.