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

Build failure when installing in presence of curl #404

Open
MaxG87 opened this issue Oct 23, 2024 · 0 comments · May be fixed by #403
Open

Build failure when installing in presence of curl #404

MaxG87 opened this issue Oct 23, 2024 · 0 comments · May be fixed by #403

Comments

@MaxG87
Copy link

MaxG87 commented Oct 23, 2024

I try do define a Rust base image to be used in several CI pipelines, and when attempting to install cargo-outdated, the build fails with Rust 1.82.0. Below is a minimal Dockerfile to reproduce the issue:

FROM rust:1.82.0-slim-bullseye

# The Rust base images seem to be created only once. Thus, in order to prevent
# using outdated packages, we need to update the image.
RUN apt update \
    && apt full-upgrade -y \
    && apt install -y curl git libssl-dev pkg-config \
    && apt clean \
    && rm -rf /var/lib/apt/lists/*

RUN cargo install cargo-outdated

Notably, after adding curl to the image, the following error occurs:

100.7    Compiling git2-curl v0.19.0
101.6 error[E0425]: cannot find value `__deserializer` in this scope
101.6    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.76.0/src/cargo/core/features.rs:734:32
101.6     |
101.6 734 |     #[serde(deserialize_with = "deserialize_build_std")]
101.6     |                                ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
101.6
108.8 For more information about this error, try `rustc --explain E0425`.
108.8 error: could not compile `cargo` (lib) due to 1 previous error
108.9 error: failed to compile `cargo-outdated v0.15.0`, intermediate artifacts can be found at `/tmp/cargo-installMAtqaR`.
108.9 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
------
Dockerfile:12
--------------------
  10 |         && rm -rf /var/lib/apt/lists/*
  11 |
  12 | >>> RUN cargo install cargo-outdated
  13 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo install cargo-outdated" did not complete successfully: exit code: 101

I first reported the error on git2-rs, but according to them it is due to cargo-outdated.

Supposedly, this error will be resolved after merging one of the PRs that bumps dependencies. This one seems to be the most recent and active.

@MonterraByte MonterraByte linked a pull request Oct 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant