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

Rust image missing rustdoc despite documentation claiming that it is included #1508

Closed
emilal opened this issue Apr 9, 2024 · 2 comments
Closed

Comments

@emilal
Copy link

emilal commented Apr 9, 2024

Describe the bug
When attempting to build something that uses rustdoc in its build process, the image build process fails.

E.g. if building an image that uses the crate rav1e, which depends on built, the build process will fail with

Error: failed to run custom build command for rav1e v0.7.1

Caused by:
process didn't exit successfully: /work/target/debug/build/rav1e-630d2ba1731d92a3/build-script->build (exit status: 101)
--- stderr
thread 'main' panicked at /home/nonroot/.cargo/registry/src/> index.crates.io-6f17d22bba15001f/rav1e-0.7.1/build.rs:250:29:
Failed to acquire build-time information: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: building at STEP "RUN cargo build": while running runtime: exit status 101

(The built crate may be updated to handle missing rustdoc better: lukaslueg/built#64)

The rust image documentation (cgr.dev/chainguard/rust, https://edu.chainguard.dev/chainguard/chainguard-images/reference/rust) claims that rustdoc is installed; while the image itself appears to only include the manpages for rustdoc.

To Reproduce

Steps to reproduce the behavior:

  1. cargo new broken
  2. Add the following to Cargo.toml. (The default-features=false is to not get hit by another unrelated build error about missing nasm; which is irrelevant for this case.)
[dependencies.rav1e]
version = "0.7.1"
default-features = false
  1. Create a Dockerfile like
FROM cgr.dev/chainguard/rust:latest
WORKDIR /work
COPY Cargo.toml .
COPY src/ src/
RUN cargo build
  1. Build with e.g. podman build -t broken . or docker buildx build -t broken .
  2. See error as quoted above.

The same error appears with latest-dev.

Expected behavior
I expect the image to be built successfully, or that the documentation states plainly that rustdoc is not included. Though as far as I can tell, not having rustdoc available is unexpected for the rust community.

edu-rust-rustdoc-highlighted

The edu repository also doesn't immediately come off as the best place to submit bug reports about image contents, but it is the most obvious "send feedback" system.

Desktop (please complete the following information):

  • OS: Any linux
  • Browser: irrelevant
@emilal
Copy link
Author

emilal commented Apr 9, 2024

For completion's sake, though I don't seem to be impacted by it, rustlldb is also not present in the image, and not even with manpages.

@ltagliaferri
Copy link
Collaborator

Thanks for raising this @emilal, I copied this over to the Chainguard Images repo: chainguard-images/images#2528

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

No branches or pull requests

2 participants