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

add build-base to cargo/build pipeline #1589

Conversation

kranurag7
Copy link
Contributor

compiling a simple application with rust requires cc linker so adding build-base to cargo/build pipeline so that we can omit specifying build-base at environment blocks in package level melange config.

$ docker run --name wolfi --rm -it cgr.dev/chainguard/wolfi-base:latest sh
/ # apk add rust
/ # cargo new demo
    Creating binary (application) `demo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
/ # cd demo/
/demo # cargo build
   Compiling demo v0.1.0 (/demo)
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `demo` (bin "demo") due to 1 previous error

/demo # apk add build-base
/demo # cargo build
   Compiling demo v0.1.0 (/demo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s

Melange Pull Request Template

Functional Changes

  • This change can build all of Wolfi without errors (describe results in notes)

Notes:

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes:

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

Notes:

compiling a simple application with rust requires cc linker so adding
build-base to cargo/build pipeline so that we can omit specifying
build-base at environment blocks in package level melange config.

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
@kranurag7 kranurag7 changed the title add build base to cargo-build pipeline add build-base to cargo/build pipeline Oct 23, 2024
Copy link
Member

@EyeCantCU EyeCantCU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. We include it everywhere we use the pipeline at the moment anyway

@EyeCantCU EyeCantCU merged commit f63a1e3 into chainguard-dev:main Oct 23, 2024
40 checks passed
@kranurag7 kranurag7 deleted the kr/add-build-base-to-cargo-build-pipeline branch October 23, 2024 03:46
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 this pull request may close these issues.

2 participants