Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo vendor fetches incomplete crate #10532

Closed
jamin-aws-ospo opened this issue Apr 1, 2022 · 1 comment
Closed

cargo vendor fetches incomplete crate #10532

jamin-aws-ospo opened this issue Apr 1, 2022 · 1 comment
Labels
C-bug Category: bug

Comments

@jamin-aws-ospo
Copy link

Problem

I tried to configure https://github.com/jpeddicord/askalono for building offline.

I clone the repo, change to the cli folder, and issue: cargo vendor. I then create the .cargo/config as instructed. However, attempting an offline build with cargo build --offline results in this error:

error: failed to run custom build command for `zstd-sys v1.6.0+zstd.1.5.0`

Caused by:
  process didn't exit successfully: `/home/jamin/tmp/askalono/cli/../target/debug/build/zstd-sys-f29cef9d59229dd4/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Folder 'zstd/lib' does not exists. Maybe you forgot to clone the 'zstd' submodule?', /home/jamin/tmp/askalono/cli/vendor/zstd-sys/build.rs:180:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

The cli/vendor/zstd-sys folder is indeed missing the zstd/lib folder.

However, checking the same crate version shows that the folder is present in the crate.

Steps

  1. git clone https://github.com/jpeddicord/askalono
  2. cd askalono/cli
  3. cargo vendor
  4. create the suggested ../.cargo/config
  5. cargo build --offline

Possible Solution(s)

No response

Notes

No response

Version

$ cargo version --verbose
cargo 1.59.0 (49d8809dc 2022-02-10)
release: 1.59.0
commit-hash: 49d8809dc2d3e6e0d5ec634fcf26d8e2aab67130
commit-date: 2022-02-10
host: x86_64-unknown-linux-gnu
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1l)
os: Ubuntu 20.04 (focal) [64-bit]
@jamin-aws-ospo jamin-aws-ospo added the C-bug Category: bug label Apr 1, 2022
@ehuss
Copy link
Contributor

ehuss commented Apr 4, 2022

This is an issue with zstd-sys v1.6.0. It had an exclude pattern which prevented the zstd directory from being included. You'll need to update to a newer version of zstd (which appears like you already have).

Closing as a duplicate of #9555.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants