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

Error while build library with cargo #10945

Closed
Purik opened this issue Aug 6, 2022 · 2 comments
Closed

Error while build library with cargo #10945

Purik opened this issue Aug 6, 2022 · 2 comments
Labels
C-bug Category: bug

Comments

@Purik
Copy link

Purik commented Aug 6, 2022

Problem

Error is reproduced for my code https://github.com/Purik/indy_postgres_plugin/tree/main

0.613 [2022-08-06T19:41:40Z DEBUG cargo::core::resolver] initial activation: storage-postgres v1.7.0 (/postgres_storage)
0.613 [2022-08-06T19:41:40Z TRACE cargo::core::resolver] activating storage-postgres v1.7.0 (/postgres_storage)
0.613 [2022-08-06T19:41:40Z DEBUG cargo::core::registry] load/missing registry https://github.com/rust-lang/crates.io-index
0.613 [2022-08-06T19:41:40Z DEBUG cargo::core::registry] loading source registry https://github.com/rust-lang/crates.io-index
0.613 [2022-08-06T19:41:40Z DEBUG cargo::sources::config] loading: registry https://github.com/rust-lang/crates.io-index
0.613 [2022-08-06T19:41:40Z TRACE cargo::core::source::source_id] loading SourceId; registry https://github.com/rust-lang/crates.io-index
0.613 [2022-08-06T19:41:40Z DEBUG cargo::sources::registry::remote] updating the index
0.613 [2022-08-06T19:41:40Z TRACE cargo::sources::registry::remote] acquiring registry index lock
0.617 Updating crates.io index
0.617 [2022-08-06T19:41:40Z DEBUG cargo::sources::git::utils] attempting GitHub fast path for https://api.github.com/repos/rust-lang/crates.io-index/commits/master
0.617 [2022-08-06T19:41:40Z DEBUG cargo::sources::git::utils] failed to check github failed to find branch master
0.617
0.617 Caused by:
0.617 cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)
0.617 [2022-08-06T19:41:40Z DEBUG cargo::sources::git::utils] skipping gc as there's only 0 pack files
0.617 [2022-08-06T19:41:40Z DEBUG cargo::sources::git::utils] doing a fetch for https://github.com/rust-lang/crates.io-index
0.617 [2022-08-06T19:41:40Z DEBUG cargo::sources::git::utils] initiating fetch of ["refs/heads/master:refs/remotes/origin/master"] from https://github.com/rust-lang/crates.io-index
2.974 [2022-08-06T19:41:43Z DEBUG cargo::sources::git::utils] fetch failed: error reading from the zlib stream; class=Zlib (5)
2.974 [2022-08-06T19:41:43Z WARN cargo::util::rustc] failed to update rustc info cache: failed to write /postgres_storage/target/.rustc_info.json
2.974 [2022-08-06T19:41:43Z DEBUG cargo] exit_with_error; err=CliError { error: Some(failed to get base64 as a dependency of package storage-postgres v1.7.0 (/postgres_storage)
2.974
2.974 Caused by:
2.974 0: failed to load source for dependency base64
2.974 1: Unable to update registry https://github.com/rust-lang/crates.io-index
2.974 2: failed to fetch https://github.com/rust-lang/crates.io-index
2.974 3: error reading from the zlib stream; class=Zlib (5)), exit_code: 101 }
2.974 [2022-08-06T19:41:43Z DEBUG cargo] display_error; err=failed to get base64 as a dependency of package storage-postgres v1.7.0 (/postgres_storage)
2.974
2.974 Caused by:
2.974 0: failed to load source for dependency base64
2.974 1: Unable to update registry https://github.com/rust-lang/crates.io-index
2.974 2: failed to fetch https://github.com/rust-lang/crates.io-index
2.974 3: error reading from the zlib stream; class=Zlib (5)
2.975 error: failed to get base64 as a dependency of package storage-postgres v1.7.0 (/postgres_storage)
2.975
2.975 Caused by:
2.975 failed to load source for dependency base64
2.975
2.975 Caused by:
2.975 Unable to update registry https://github.com/rust-lang/crates.io-index
2.975
2.975 Caused by:
2.975 failed to fetch https://github.com/rust-lang/crates.io-index
2.975
2.975 Caused by:
2.975 error reading from the zlib stream; class=Zlib (5)
...

@Purik Purik added the C-bug Category: bug label Aug 6, 2022
@Purik
Copy link
Author

Purik commented Aug 6, 2022

Steps:

  1. Clone the project to local (https://github.com/Purik/indy_postgres_plugin/tree/main)
  2. Run docker build --no-cache -t test_build

@ehuss
Copy link
Contributor

ehuss commented Aug 8, 2022

Ubuntu 16 has a very old version of cargo and rust (1.46). This issue was fixed some time ago. I recommend using a newer version of ubuntu. Alternatively, find a way to install a newer version of rust (either via an apt package, or using the official rustup installer).

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2022
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