hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
666 stars 737 forks source link

Postgres plugin don't compile for Ubintu:16.04 on x64 #2551

Closed Purik closed 7 months ago

Purik commented 2 years ago

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 commented 2 years ago

Steps to reproduce:

  1. cd experimental/plugins/postgres_storage
  2. export CARGO_LOG=trace && cargo build

Sample Dockerfile

FROM ubuntu:16.04

# Install environment
RUN apt-get update -y && apt-get install -y \
    coreutils \
    wget \
    curl \
    apt-transport-https \
    cargo \
    && apt-get clean

ADD experimental/plugins/postgres_storage /postgres_storage
RUN cd /postgres_storage && export CARGO_LOG=trace && cargo build && cp target/debug/*.so /usr/lib && cd / && rm -r /postgres_storage