Skip to content

Conversation

@kayabaNerve
Copy link
Contributor

gcc is already a package installed, but it does not install a libc candidate with it. musl-dev contains the necessary development files (crti.o, crtn.o, Scrt1.o, libc.so, etc.).

This was prior requested in #68 and is necessary for proc-macros/build scripts to compile, without additional configuration/setup. It also is apparently just a 2% size increase which many consumers are already incurring due to how only effectively-bare-metal compilation is possible without it.

`gcc` is already a package installed, but it does not install a `libc` candidate with it. `musl-dev` contains the necessary development files (`crti.o`, `crtn.o`, `Scrt1.o`, `libc.so`, etc.).

This was prior requested in rust-lang#68 and is necessary for `proc-macro`s/build scripts to compile, without additional configuration/setup. It also is apparently just a 2% size increase which many consumers are already incurring due to how only effectively bare-metal compilation is possible without it.
Copy link
Member

@Muscraft Muscraft left a comment

Choose a reason for hiding this comment

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

I looked into this for a while last night, and I think that this is a good change to make. The improved user experience is well worth the ~2% size increase in my opinion, especially when you consider how many people pull it in themselves.


RUN apk add --no-cache \
ca-certificates \
musl-dev \
Copy link
Member

Choose a reason for hiding this comment

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

Can you add this to the Alpine Dockerfiles in both nightly/ and stable/?

You should be able to update all of them at once by running:

./x.py update

@kayabaNerve
Copy link
Contributor Author

Updated. Apologies for not doing so when I first made the PR, and thanks for telling me how to :)

@Muscraft Muscraft merged commit 0f475a4 into rust-lang:master Dec 3, 2025
18 checks passed
@Muscraft
Copy link
Member

Muscraft commented Dec 3, 2025

docker-library/official-images#20402

@kayabaNerve kayabaNerve deleted the patch-1 branch December 3, 2025 22:42
tyranron added a commit to instrumentisto/rust-docker-image that referenced this pull request Dec 4, 2025
paolobarbolini added a commit to M4SS-Code/range-requests that referenced this pull request Dec 12, 2025
It's already included by default starting from rust-lang/docker-rust#259
paolobarbolini added a commit to M4SS-Code/watermelon that referenced this pull request Dec 12, 2025
It's already included by default starting from rust-lang/docker-rust#259
paolobarbolini added a commit to M4SS-Code/benzina that referenced this pull request Dec 12, 2025
It's already included by default starting from rust-lang/docker-rust#259
paolobarbolini added a commit to M4SS-Code/static-serve that referenced this pull request Dec 12, 2025
It's already included by default starting from rust-lang/docker-rust#259
paolobarbolini added a commit to M4SS-Code/cargo-goggles that referenced this pull request Dec 12, 2025
It's already included by default starting from rust-lang/docker-rust#259
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